> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peec.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Domains Report

> Get a report on Source Domains.

## Aggregation Formulas

When aggregating results across multiple rows/dimensions, use the following formulas:

- **citation_rate**: `sum(citation_count) / sum(retrieval_count)`
- **retrieval_rate**: `sum(retrieval_count) / sum(total_chat_count)`
- **retrieval_percentage**: `sum(retrieved_chat_count) / sum(total_chat_count)`

## `filters` vs `having`

`filters` are **pre-aggregation** row filters (applied as WHERE before GROUP BY) on the source-row table. Allowed fields: `model_id` (deprecated), `model_channel_id`, `country_code`, `prompt_id`, `tag_id`, `topic_id`, `chat_id`, `domain`, `domain_classification`, `url`, `url_classification`, `mentioned_brand_id`, `mentioned_brand_count`, `gap`.
- Population (`model_id`, `model_channel_id`, `country_code`, `prompt_id`, `tag_id`, `topic_id`, `chat_id`) shrink both numerator and denominator (`total_chat_count`).
- Source-side (`domain`, `domain_classification`, `url`, `url_classification`) and per-row mentioned-brand predicates (`mentioned_brand_id`, `mentioned_brand_count`, `gap`) shrink the source-row scope feeding aggregation. `total_chat_count` is computed from a chat-level table that doesn't carry these columns, so the denominator narrows only on chat-level fields.

`having` are **post-aggregation** row filters (applied as HAVING after GROUP BY). Allowed fields: `model_id` (deprecated), `model_channel_id`, `country_code`, `prompt_id`, `tag_id`, `topic_id`, `chat_id`, `domain`, `domain_classification`, `mentioned_brand_id`, `mentioned_brand_count`, `gap`. They select which aggregated rows are returned and do not affect denominators.



## OpenAPI

````yaml https://api.peec.ai/customer/v1/openapi/json post /reports/domains
openapi: 3.0.3
info:
  title: Peec AI Customer API
  description: Development documentation
  version: 1.0.0
  contact:
    name: Peec AI Team
    email: support@peec.ai
servers:
  - url: https://api.peec.ai/customer/v1
security: []
paths:
  /reports/domains:
    post:
      tags:
        - Reports
      summary: Get Domains Report
      description: >-
        Get a report on Source Domains.


        ## Aggregation Formulas


        When aggregating results across multiple rows/dimensions, use the
        following formulas:


        - **citation_rate**: `sum(citation_count) / sum(retrieval_count)`

        - **retrieval_rate**: `sum(retrieval_count) / sum(total_chat_count)`

        - **retrieval_percentage**: `sum(retrieved_chat_count) /
        sum(total_chat_count)`


        ## `filters` vs `having`


        `filters` are **pre-aggregation** row filters (applied as WHERE before
        GROUP BY) on the source-row table. Allowed fields: `model_id`
        (deprecated), `model_channel_id`, `country_code`, `prompt_id`, `tag_id`,
        `topic_id`, `chat_id`, `domain`, `domain_classification`, `url`,
        `url_classification`, `mentioned_brand_id`, `mentioned_brand_count`,
        `gap`.

        - Population (`model_id`, `model_channel_id`, `country_code`,
        `prompt_id`, `tag_id`, `topic_id`, `chat_id`) shrink both numerator and
        denominator (`total_chat_count`).

        - Source-side (`domain`, `domain_classification`, `url`,
        `url_classification`) and per-row mentioned-brand predicates
        (`mentioned_brand_id`, `mentioned_brand_count`, `gap`) shrink the
        source-row scope feeding aggregation. `total_chat_count` is computed
        from a chat-level table that doesn't carry these columns, so the
        denominator narrows only on chat-level fields.


        `having` are **post-aggregation** row filters (applied as HAVING after
        GROUP BY). Allowed fields: `model_id` (deprecated), `model_channel_id`,
        `country_code`, `prompt_id`, `tag_id`, `topic_id`, `chat_id`, `domain`,
        `domain_classification`, `mentioned_brand_id`, `mentioned_brand_count`,
        `gap`. They select which aggregated rows are returned and do not affect
        denominators.
      operationId: postReportsDomains
      parameters:
        - name: project_id
          in: query
          required: false
          schema:
            description: Required if using a company api key
            example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                limit:
                  default: 1000
                  type: number
                  minimum: 1
                  maximum: 10000
                offset:
                  default: 0
                  type: number
                  minimum: 0
                start_date:
                  default: '2026-01-01'
                  description: >-
                    full-date notation as defined by RFC 3339, section 5.6, for
                    example, 2017-07-21
                  example: '2025-09-22'
                  type: string
                  format: date
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                end_date:
                  default: '2026-01-01'
                  description: >-
                    full-date notation as defined by RFC 3339, section 5.6, for
                    example, 2017-07-21
                  example: '2025-09-22'
                  type: string
                  format: date
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                dimensions:
                  example:
                    - tag_id
                    - model_id
                  description: Dimensions to break down the report by.
                  type: array
                  items:
                    type: string
                    enum:
                      - prompt_id
                      - model_id
                      - model_channel_id
                      - tag_id
                      - topic_id
                      - date
                      - week
                      - month
                      - country_code
                      - chat_id
                filters:
                  description: >-
                    Pre-aggregation row filters (applied as WHERE before
                    grouping). Allowed fields: `model_id` (deprecated),
                    `model_channel_id`, `country_code`, `prompt_id`, `tag_id`,
                    `topic_id`, `chat_id`, `domain`, `domain_classification`,
                    `url`, `url_classification`, `mentioned_brand_id`,
                    `mentioned_brand_count`, `gap`. Population fields
                    (model/country/prompt/tag/topic/chat) shrink both numerator
                    and denominator. Source-side fields and per-row
                    mentioned-brand predicates shrink the source-row scope
                    feeding aggregation; `total_chat_count` comes from a
                    chat-level table that doesn't carry these columns, so they
                    narrow the numerator only. Multiple filters are AND'd.
                  example:
                    - field: model_id
                      operator: in
                      values:
                        - gpt-4o-search
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - chatgpt-scraper
                                - gpt-4o
                                - gpt-4o-search
                                - gpt-3.5-turbo
                                - llama-sonar
                                - perplexity-scraper
                                - sonar
                                - gemini-2.5-flash
                                - gemini-scraper
                                - google-ai-overview-scraper
                                - google-ai-mode-scraper
                                - llama-3.3-70b-instruct
                                - deepseek-r1
                                - deepseek-v4-pro
                                - claude-3.5-haiku
                                - claude-haiku-4.5
                                - claude-sonnet-4
                                - grok-scraper
                                - microsoft-copilot-scraper
                                - grok-4
                                - grok-4.3
                                - qwen-3-6-plus
                                - qwen-3-7-plus
                                - amazon-rufus-scraper
                        required:
                          - field
                          - operator
                          - values
                        deprecated: true
                        description: 'Deprecated: use model_channel_id filter instead'
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_channel_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - openai-0
                                - openai-1
                                - qwen-0
                                - openai-2
                                - perplexity-0
                                - perplexity-1
                                - google-0
                                - google-1
                                - google-2
                                - google-3
                                - anthropic-0
                                - anthropic-1
                                - deepseek-0
                                - meta-0
                                - xai-0
                                - xai-1
                                - microsoft-0
                                - amazon-0
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - tag_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - topic_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - prompt_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - country_code
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - AE
                                - AL
                                - AM
                                - AR
                                - AT
                                - AU
                                - BA
                                - BE
                                - BG
                                - BH
                                - BO
                                - BR
                                - BS
                                - BY
                                - CA
                                - CH
                                - CL
                                - CN
                                - CO
                                - CR
                                - CY
                                - CZ
                                - DE
                                - DK
                                - DO
                                - EC
                                - EE
                                - EG
                                - ES
                                - FI
                                - FR
                                - GB
                                - GE
                                - GH
                                - GR
                                - GT
                                - HK
                                - HN
                                - HR
                                - HU
                                - ID
                                - IE
                                - IL
                                - IN
                                - IQ
                                - IS
                                - IT
                                - JO
                                - JP
                                - KR
                                - KW
                                - LB
                                - LI
                                - LT
                                - LU
                                - LV
                                - MA
                                - MD
                                - ME
                                - MK
                                - MT
                                - MX
                                - MY
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NZ
                                - OM
                                - PK
                                - PA
                                - PE
                                - PH
                                - PL
                                - PT
                                - PY
                                - PS
                                - QA
                                - RO
                                - RS
                                - SA
                                - SE
                                - SG
                                - SI
                                - SK
                                - SV
                                - TH
                                - TN
                                - TR
                                - TW
                                - UA
                                - US
                                - UY
                                - VE
                                - VN
                                - ZA
                                - AD
                                - AF
                                - AS
                                - AZ
                                - BB
                                - BQ
                                - CG
                                - CI
                                - CM
                                - CW
                                - DM
                                - DZ
                                - FO
                                - GF
                                - GP
                                - JM
                                - KG
                                - KH
                                - KI
                                - KZ
                                - LK
                                - LR
                                - LS
                                - MW
                                - NC
                                - PG
                                - TD
                                - TF
                                - UG
                                - VU
                                - ZW
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - chat_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain_classification
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                            description: >-
                              Built-in classification (CORPORATE, EDITORIAL,
                              INSTITUTIONAL, OTHER, REFERENCE, UGC, COMPETITOR,
                              OWN, RELATED) or a custom domain classification
                              name.
                            example:
                              - CORPORATE
                              - EDITORIAL
                              - INSTITUTIONAL
                              - OTHER
                              - REFERENCE
                              - UGC
                              - COMPETITOR
                              - OWN
                              - RELATED
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - url
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - url_classification
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                            description: >-
                              Built-in classification (HOMEPAGE, CATEGORY_PAGE,
                              PRODUCT_PAGE, LISTICLE, COMPARISON, PROFILE,
                              ALTERNATIVE, DISCUSSION, HOW_TO_GUIDE, ARTICLE,
                              OTHER) or a custom URL classification name.
                            example:
                              - HOMEPAGE
                              - CATEGORY_PAGE
                              - PRODUCT_PAGE
                              - LISTICLE
                              - COMPARISON
                              - PROFILE
                              - ALTERNATIVE
                              - DISCUSSION
                              - HOW_TO_GUIDE
                              - ARTICLE
                              - OTHER
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_count
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - gap
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                having:
                  description: >-
                    Post-aggregation row filters (applied as HAVING after
                    grouping). Select which aggregated domain rows are returned.
                    Allowed fields: `model_id` (deprecated), `model_channel_id`,
                    `country_code`, `prompt_id`, `tag_id`, `topic_id`,
                    `chat_id`, `domain`, `domain_classification`,
                    `mentioned_brand_id`, `mentioned_brand_count`, `gap` —
                    population fields require the matching value in
                    `dimensions`. Multiple filters are AND'd.
                  example:
                    - field: domain
                      operator: in
                      values:
                        - example.com
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - chatgpt-scraper
                                - gpt-4o
                                - gpt-4o-search
                                - gpt-3.5-turbo
                                - llama-sonar
                                - perplexity-scraper
                                - sonar
                                - gemini-2.5-flash
                                - gemini-scraper
                                - google-ai-overview-scraper
                                - google-ai-mode-scraper
                                - llama-3.3-70b-instruct
                                - deepseek-r1
                                - deepseek-v4-pro
                                - claude-3.5-haiku
                                - claude-haiku-4.5
                                - claude-sonnet-4
                                - grok-scraper
                                - microsoft-copilot-scraper
                                - grok-4
                                - grok-4.3
                                - qwen-3-6-plus
                                - qwen-3-7-plus
                                - amazon-rufus-scraper
                        required:
                          - field
                          - operator
                          - values
                        deprecated: true
                        description: 'Deprecated: use model_channel_id filter instead'
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_channel_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - openai-0
                                - openai-1
                                - qwen-0
                                - openai-2
                                - perplexity-0
                                - perplexity-1
                                - google-0
                                - google-1
                                - google-2
                                - google-3
                                - anthropic-0
                                - anthropic-1
                                - deepseek-0
                                - meta-0
                                - xai-0
                                - xai-1
                                - microsoft-0
                                - amazon-0
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - tag_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - topic_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - prompt_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - country_code
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - AE
                                - AL
                                - AM
                                - AR
                                - AT
                                - AU
                                - BA
                                - BE
                                - BG
                                - BH
                                - BO
                                - BR
                                - BS
                                - BY
                                - CA
                                - CH
                                - CL
                                - CN
                                - CO
                                - CR
                                - CY
                                - CZ
                                - DE
                                - DK
                                - DO
                                - EC
                                - EE
                                - EG
                                - ES
                                - FI
                                - FR
                                - GB
                                - GE
                                - GH
                                - GR
                                - GT
                                - HK
                                - HN
                                - HR
                                - HU
                                - ID
                                - IE
                                - IL
                                - IN
                                - IQ
                                - IS
                                - IT
                                - JO
                                - JP
                                - KR
                                - KW
                                - LB
                                - LI
                                - LT
                                - LU
                                - LV
                                - MA
                                - MD
                                - ME
                                - MK
                                - MT
                                - MX
                                - MY
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NZ
                                - OM
                                - PK
                                - PA
                                - PE
                                - PH
                                - PL
                                - PT
                                - PY
                                - PS
                                - QA
                                - RO
                                - RS
                                - SA
                                - SE
                                - SG
                                - SI
                                - SK
                                - SV
                                - TH
                                - TN
                                - TR
                                - TW
                                - UA
                                - US
                                - UY
                                - VE
                                - VN
                                - ZA
                                - AD
                                - AF
                                - AS
                                - AZ
                                - BB
                                - BQ
                                - CG
                                - CI
                                - CM
                                - CW
                                - DM
                                - DZ
                                - FO
                                - GF
                                - GP
                                - JM
                                - KG
                                - KH
                                - KI
                                - KZ
                                - LK
                                - LR
                                - LS
                                - MW
                                - NC
                                - PG
                                - TD
                                - TF
                                - UG
                                - VU
                                - ZW
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - chat_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain_classification
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                            description: >-
                              Built-in classification (CORPORATE, EDITORIAL,
                              INSTITUTIONAL, OTHER, REFERENCE, UGC, COMPETITOR,
                              OWN, RELATED) or a custom domain classification
                              name.
                            example:
                              - CORPORATE
                              - EDITORIAL
                              - INSTITUTIONAL
                              - OTHER
                              - REFERENCE
                              - UGC
                              - COMPETITOR
                              - OWN
                              - RELATED
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_count
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - gap
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                order_by:
                  description: >-
                    Sort results by one or more fields. Multiple entries create
                    a multi-key sort. Direction defaults to desc. When omitted,
                    a default ordering is applied.
                  example:
                    - field: citation_rate
                      direction: desc
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                        enum:
                          - citation_rate
                          - retrieval_count
                          - citation_count
                          - date
                          - week
                          - month
                      direction:
                        default: desc
                        type: string
                        enum:
                          - asc
                          - desc
                    required:
                      - field
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                limit:
                  default: 1000
                  type: number
                  minimum: 1
                  maximum: 10000
                offset:
                  default: 0
                  type: number
                  minimum: 0
                start_date:
                  default: '2026-01-01'
                  description: >-
                    full-date notation as defined by RFC 3339, section 5.6, for
                    example, 2017-07-21
                  example: '2025-09-22'
                  type: string
                  format: date
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                end_date:
                  default: '2026-01-01'
                  description: >-
                    full-date notation as defined by RFC 3339, section 5.6, for
                    example, 2017-07-21
                  example: '2025-09-22'
                  type: string
                  format: date
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                dimensions:
                  example:
                    - tag_id
                    - model_id
                  description: Dimensions to break down the report by.
                  type: array
                  items:
                    type: string
                    enum:
                      - prompt_id
                      - model_id
                      - model_channel_id
                      - tag_id
                      - topic_id
                      - date
                      - week
                      - month
                      - country_code
                      - chat_id
                filters:
                  description: >-
                    Pre-aggregation row filters (applied as WHERE before
                    grouping). Allowed fields: `model_id` (deprecated),
                    `model_channel_id`, `country_code`, `prompt_id`, `tag_id`,
                    `topic_id`, `chat_id`, `domain`, `domain_classification`,
                    `url`, `url_classification`, `mentioned_brand_id`,
                    `mentioned_brand_count`, `gap`. Population fields
                    (model/country/prompt/tag/topic/chat) shrink both numerator
                    and denominator. Source-side fields and per-row
                    mentioned-brand predicates shrink the source-row scope
                    feeding aggregation; `total_chat_count` comes from a
                    chat-level table that doesn't carry these columns, so they
                    narrow the numerator only. Multiple filters are AND'd.
                  example:
                    - field: model_id
                      operator: in
                      values:
                        - gpt-4o-search
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - chatgpt-scraper
                                - gpt-4o
                                - gpt-4o-search
                                - gpt-3.5-turbo
                                - llama-sonar
                                - perplexity-scraper
                                - sonar
                                - gemini-2.5-flash
                                - gemini-scraper
                                - google-ai-overview-scraper
                                - google-ai-mode-scraper
                                - llama-3.3-70b-instruct
                                - deepseek-r1
                                - deepseek-v4-pro
                                - claude-3.5-haiku
                                - claude-haiku-4.5
                                - claude-sonnet-4
                                - grok-scraper
                                - microsoft-copilot-scraper
                                - grok-4
                                - grok-4.3
                                - qwen-3-6-plus
                                - qwen-3-7-plus
                                - amazon-rufus-scraper
                        required:
                          - field
                          - operator
                          - values
                        deprecated: true
                        description: 'Deprecated: use model_channel_id filter instead'
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_channel_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - openai-0
                                - openai-1
                                - qwen-0
                                - openai-2
                                - perplexity-0
                                - perplexity-1
                                - google-0
                                - google-1
                                - google-2
                                - google-3
                                - anthropic-0
                                - anthropic-1
                                - deepseek-0
                                - meta-0
                                - xai-0
                                - xai-1
                                - microsoft-0
                                - amazon-0
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - tag_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - topic_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - prompt_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - country_code
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - AE
                                - AL
                                - AM
                                - AR
                                - AT
                                - AU
                                - BA
                                - BE
                                - BG
                                - BH
                                - BO
                                - BR
                                - BS
                                - BY
                                - CA
                                - CH
                                - CL
                                - CN
                                - CO
                                - CR
                                - CY
                                - CZ
                                - DE
                                - DK
                                - DO
                                - EC
                                - EE
                                - EG
                                - ES
                                - FI
                                - FR
                                - GB
                                - GE
                                - GH
                                - GR
                                - GT
                                - HK
                                - HN
                                - HR
                                - HU
                                - ID
                                - IE
                                - IL
                                - IN
                                - IQ
                                - IS
                                - IT
                                - JO
                                - JP
                                - KR
                                - KW
                                - LB
                                - LI
                                - LT
                                - LU
                                - LV
                                - MA
                                - MD
                                - ME
                                - MK
                                - MT
                                - MX
                                - MY
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NZ
                                - OM
                                - PK
                                - PA
                                - PE
                                - PH
                                - PL
                                - PT
                                - PY
                                - PS
                                - QA
                                - RO
                                - RS
                                - SA
                                - SE
                                - SG
                                - SI
                                - SK
                                - SV
                                - TH
                                - TN
                                - TR
                                - TW
                                - UA
                                - US
                                - UY
                                - VE
                                - VN
                                - ZA
                                - AD
                                - AF
                                - AS
                                - AZ
                                - BB
                                - BQ
                                - CG
                                - CI
                                - CM
                                - CW
                                - DM
                                - DZ
                                - FO
                                - GF
                                - GP
                                - JM
                                - KG
                                - KH
                                - KI
                                - KZ
                                - LK
                                - LR
                                - LS
                                - MW
                                - NC
                                - PG
                                - TD
                                - TF
                                - UG
                                - VU
                                - ZW
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - chat_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain_classification
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                            description: >-
                              Built-in classification (CORPORATE, EDITORIAL,
                              INSTITUTIONAL, OTHER, REFERENCE, UGC, COMPETITOR,
                              OWN, RELATED) or a custom domain classification
                              name.
                            example:
                              - CORPORATE
                              - EDITORIAL
                              - INSTITUTIONAL
                              - OTHER
                              - REFERENCE
                              - UGC
                              - COMPETITOR
                              - OWN
                              - RELATED
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - url
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - url_classification
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                            description: >-
                              Built-in classification (HOMEPAGE, CATEGORY_PAGE,
                              PRODUCT_PAGE, LISTICLE, COMPARISON, PROFILE,
                              ALTERNATIVE, DISCUSSION, HOW_TO_GUIDE, ARTICLE,
                              OTHER) or a custom URL classification name.
                            example:
                              - HOMEPAGE
                              - CATEGORY_PAGE
                              - PRODUCT_PAGE
                              - LISTICLE
                              - COMPARISON
                              - PROFILE
                              - ALTERNATIVE
                              - DISCUSSION
                              - HOW_TO_GUIDE
                              - ARTICLE
                              - OTHER
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_count
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - gap
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                having:
                  description: >-
                    Post-aggregation row filters (applied as HAVING after
                    grouping). Select which aggregated domain rows are returned.
                    Allowed fields: `model_id` (deprecated), `model_channel_id`,
                    `country_code`, `prompt_id`, `tag_id`, `topic_id`,
                    `chat_id`, `domain`, `domain_classification`,
                    `mentioned_brand_id`, `mentioned_brand_count`, `gap` —
                    population fields require the matching value in
                    `dimensions`. Multiple filters are AND'd.
                  example:
                    - field: domain
                      operator: in
                      values:
                        - example.com
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - chatgpt-scraper
                                - gpt-4o
                                - gpt-4o-search
                                - gpt-3.5-turbo
                                - llama-sonar
                                - perplexity-scraper
                                - sonar
                                - gemini-2.5-flash
                                - gemini-scraper
                                - google-ai-overview-scraper
                                - google-ai-mode-scraper
                                - llama-3.3-70b-instruct
                                - deepseek-r1
                                - deepseek-v4-pro
                                - claude-3.5-haiku
                                - claude-haiku-4.5
                                - claude-sonnet-4
                                - grok-scraper
                                - microsoft-copilot-scraper
                                - grok-4
                                - grok-4.3
                                - qwen-3-6-plus
                                - qwen-3-7-plus
                                - amazon-rufus-scraper
                        required:
                          - field
                          - operator
                          - values
                        deprecated: true
                        description: 'Deprecated: use model_channel_id filter instead'
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_channel_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - openai-0
                                - openai-1
                                - qwen-0
                                - openai-2
                                - perplexity-0
                                - perplexity-1
                                - google-0
                                - google-1
                                - google-2
                                - google-3
                                - anthropic-0
                                - anthropic-1
                                - deepseek-0
                                - meta-0
                                - xai-0
                                - xai-1
                                - microsoft-0
                                - amazon-0
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - tag_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - topic_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - prompt_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - country_code
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - AE
                                - AL
                                - AM
                                - AR
                                - AT
                                - AU
                                - BA
                                - BE
                                - BG
                                - BH
                                - BO
                                - BR
                                - BS
                                - BY
                                - CA
                                - CH
                                - CL
                                - CN
                                - CO
                                - CR
                                - CY
                                - CZ
                                - DE
                                - DK
                                - DO
                                - EC
                                - EE
                                - EG
                                - ES
                                - FI
                                - FR
                                - GB
                                - GE
                                - GH
                                - GR
                                - GT
                                - HK
                                - HN
                                - HR
                                - HU
                                - ID
                                - IE
                                - IL
                                - IN
                                - IQ
                                - IS
                                - IT
                                - JO
                                - JP
                                - KR
                                - KW
                                - LB
                                - LI
                                - LT
                                - LU
                                - LV
                                - MA
                                - MD
                                - ME
                                - MK
                                - MT
                                - MX
                                - MY
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NZ
                                - OM
                                - PK
                                - PA
                                - PE
                                - PH
                                - PL
                                - PT
                                - PY
                                - PS
                                - QA
                                - RO
                                - RS
                                - SA
                                - SE
                                - SG
                                - SI
                                - SK
                                - SV
                                - TH
                                - TN
                                - TR
                                - TW
                                - UA
                                - US
                                - UY
                                - VE
                                - VN
                                - ZA
                                - AD
                                - AF
                                - AS
                                - AZ
                                - BB
                                - BQ
                                - CG
                                - CI
                                - CM
                                - CW
                                - DM
                                - DZ
                                - FO
                                - GF
                                - GP
                                - JM
                                - KG
                                - KH
                                - KI
                                - KZ
                                - LK
                                - LR
                                - LS
                                - MW
                                - NC
                                - PG
                                - TD
                                - TF
                                - UG
                                - VU
                                - ZW
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - chat_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain_classification
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                            description: >-
                              Built-in classification (CORPORATE, EDITORIAL,
                              INSTITUTIONAL, OTHER, REFERENCE, UGC, COMPETITOR,
                              OWN, RELATED) or a custom domain classification
                              name.
                            example:
                              - CORPORATE
                              - EDITORIAL
                              - INSTITUTIONAL
                              - OTHER
                              - REFERENCE
                              - UGC
                              - COMPETITOR
                              - OWN
                              - RELATED
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_count
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - gap
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                order_by:
                  description: >-
                    Sort results by one or more fields. Multiple entries create
                    a multi-key sort. Direction defaults to desc. When omitted,
                    a default ordering is applied.
                  example:
                    - field: citation_rate
                      direction: desc
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                        enum:
                          - citation_rate
                          - retrieval_count
                          - citation_count
                          - date
                          - week
                          - month
                      direction:
                        default: desc
                        type: string
                        enum:
                          - asc
                          - desc
                    required:
                      - field
          multipart/form-data:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                limit:
                  default: 1000
                  type: number
                  minimum: 1
                  maximum: 10000
                offset:
                  default: 0
                  type: number
                  minimum: 0
                start_date:
                  default: '2026-01-01'
                  description: >-
                    full-date notation as defined by RFC 3339, section 5.6, for
                    example, 2017-07-21
                  example: '2025-09-22'
                  type: string
                  format: date
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                end_date:
                  default: '2026-01-01'
                  description: >-
                    full-date notation as defined by RFC 3339, section 5.6, for
                    example, 2017-07-21
                  example: '2025-09-22'
                  type: string
                  format: date
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                dimensions:
                  example:
                    - tag_id
                    - model_id
                  description: Dimensions to break down the report by.
                  type: array
                  items:
                    type: string
                    enum:
                      - prompt_id
                      - model_id
                      - model_channel_id
                      - tag_id
                      - topic_id
                      - date
                      - week
                      - month
                      - country_code
                      - chat_id
                filters:
                  description: >-
                    Pre-aggregation row filters (applied as WHERE before
                    grouping). Allowed fields: `model_id` (deprecated),
                    `model_channel_id`, `country_code`, `prompt_id`, `tag_id`,
                    `topic_id`, `chat_id`, `domain`, `domain_classification`,
                    `url`, `url_classification`, `mentioned_brand_id`,
                    `mentioned_brand_count`, `gap`. Population fields
                    (model/country/prompt/tag/topic/chat) shrink both numerator
                    and denominator. Source-side fields and per-row
                    mentioned-brand predicates shrink the source-row scope
                    feeding aggregation; `total_chat_count` comes from a
                    chat-level table that doesn't carry these columns, so they
                    narrow the numerator only. Multiple filters are AND'd.
                  example:
                    - field: model_id
                      operator: in
                      values:
                        - gpt-4o-search
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - chatgpt-scraper
                                - gpt-4o
                                - gpt-4o-search
                                - gpt-3.5-turbo
                                - llama-sonar
                                - perplexity-scraper
                                - sonar
                                - gemini-2.5-flash
                                - gemini-scraper
                                - google-ai-overview-scraper
                                - google-ai-mode-scraper
                                - llama-3.3-70b-instruct
                                - deepseek-r1
                                - deepseek-v4-pro
                                - claude-3.5-haiku
                                - claude-haiku-4.5
                                - claude-sonnet-4
                                - grok-scraper
                                - microsoft-copilot-scraper
                                - grok-4
                                - grok-4.3
                                - qwen-3-6-plus
                                - qwen-3-7-plus
                                - amazon-rufus-scraper
                        required:
                          - field
                          - operator
                          - values
                        deprecated: true
                        description: 'Deprecated: use model_channel_id filter instead'
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_channel_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - openai-0
                                - openai-1
                                - qwen-0
                                - openai-2
                                - perplexity-0
                                - perplexity-1
                                - google-0
                                - google-1
                                - google-2
                                - google-3
                                - anthropic-0
                                - anthropic-1
                                - deepseek-0
                                - meta-0
                                - xai-0
                                - xai-1
                                - microsoft-0
                                - amazon-0
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - tag_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - topic_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - prompt_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - country_code
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - AE
                                - AL
                                - AM
                                - AR
                                - AT
                                - AU
                                - BA
                                - BE
                                - BG
                                - BH
                                - BO
                                - BR
                                - BS
                                - BY
                                - CA
                                - CH
                                - CL
                                - CN
                                - CO
                                - CR
                                - CY
                                - CZ
                                - DE
                                - DK
                                - DO
                                - EC
                                - EE
                                - EG
                                - ES
                                - FI
                                - FR
                                - GB
                                - GE
                                - GH
                                - GR
                                - GT
                                - HK
                                - HN
                                - HR
                                - HU
                                - ID
                                - IE
                                - IL
                                - IN
                                - IQ
                                - IS
                                - IT
                                - JO
                                - JP
                                - KR
                                - KW
                                - LB
                                - LI
                                - LT
                                - LU
                                - LV
                                - MA
                                - MD
                                - ME
                                - MK
                                - MT
                                - MX
                                - MY
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NZ
                                - OM
                                - PK
                                - PA
                                - PE
                                - PH
                                - PL
                                - PT
                                - PY
                                - PS
                                - QA
                                - RO
                                - RS
                                - SA
                                - SE
                                - SG
                                - SI
                                - SK
                                - SV
                                - TH
                                - TN
                                - TR
                                - TW
                                - UA
                                - US
                                - UY
                                - VE
                                - VN
                                - ZA
                                - AD
                                - AF
                                - AS
                                - AZ
                                - BB
                                - BQ
                                - CG
                                - CI
                                - CM
                                - CW
                                - DM
                                - DZ
                                - FO
                                - GF
                                - GP
                                - JM
                                - KG
                                - KH
                                - KI
                                - KZ
                                - LK
                                - LR
                                - LS
                                - MW
                                - NC
                                - PG
                                - TD
                                - TF
                                - UG
                                - VU
                                - ZW
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - chat_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain_classification
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                            description: >-
                              Built-in classification (CORPORATE, EDITORIAL,
                              INSTITUTIONAL, OTHER, REFERENCE, UGC, COMPETITOR,
                              OWN, RELATED) or a custom domain classification
                              name.
                            example:
                              - CORPORATE
                              - EDITORIAL
                              - INSTITUTIONAL
                              - OTHER
                              - REFERENCE
                              - UGC
                              - COMPETITOR
                              - OWN
                              - RELATED
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - url
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - url_classification
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                            description: >-
                              Built-in classification (HOMEPAGE, CATEGORY_PAGE,
                              PRODUCT_PAGE, LISTICLE, COMPARISON, PROFILE,
                              ALTERNATIVE, DISCUSSION, HOW_TO_GUIDE, ARTICLE,
                              OTHER) or a custom URL classification name.
                            example:
                              - HOMEPAGE
                              - CATEGORY_PAGE
                              - PRODUCT_PAGE
                              - LISTICLE
                              - COMPARISON
                              - PROFILE
                              - ALTERNATIVE
                              - DISCUSSION
                              - HOW_TO_GUIDE
                              - ARTICLE
                              - OTHER
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_count
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - gap
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                having:
                  description: >-
                    Post-aggregation row filters (applied as HAVING after
                    grouping). Select which aggregated domain rows are returned.
                    Allowed fields: `model_id` (deprecated), `model_channel_id`,
                    `country_code`, `prompt_id`, `tag_id`, `topic_id`,
                    `chat_id`, `domain`, `domain_classification`,
                    `mentioned_brand_id`, `mentioned_brand_count`, `gap` —
                    population fields require the matching value in
                    `dimensions`. Multiple filters are AND'd.
                  example:
                    - field: domain
                      operator: in
                      values:
                        - example.com
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - chatgpt-scraper
                                - gpt-4o
                                - gpt-4o-search
                                - gpt-3.5-turbo
                                - llama-sonar
                                - perplexity-scraper
                                - sonar
                                - gemini-2.5-flash
                                - gemini-scraper
                                - google-ai-overview-scraper
                                - google-ai-mode-scraper
                                - llama-3.3-70b-instruct
                                - deepseek-r1
                                - deepseek-v4-pro
                                - claude-3.5-haiku
                                - claude-haiku-4.5
                                - claude-sonnet-4
                                - grok-scraper
                                - microsoft-copilot-scraper
                                - grok-4
                                - grok-4.3
                                - qwen-3-6-plus
                                - qwen-3-7-plus
                                - amazon-rufus-scraper
                        required:
                          - field
                          - operator
                          - values
                        deprecated: true
                        description: 'Deprecated: use model_channel_id filter instead'
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - model_channel_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - openai-0
                                - openai-1
                                - qwen-0
                                - openai-2
                                - perplexity-0
                                - perplexity-1
                                - google-0
                                - google-1
                                - google-2
                                - google-3
                                - anthropic-0
                                - anthropic-1
                                - deepseek-0
                                - meta-0
                                - xai-0
                                - xai-1
                                - microsoft-0
                                - amazon-0
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - tag_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - topic_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - prompt_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - country_code
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                              enum:
                                - AE
                                - AL
                                - AM
                                - AR
                                - AT
                                - AU
                                - BA
                                - BE
                                - BG
                                - BH
                                - BO
                                - BR
                                - BS
                                - BY
                                - CA
                                - CH
                                - CL
                                - CN
                                - CO
                                - CR
                                - CY
                                - CZ
                                - DE
                                - DK
                                - DO
                                - EC
                                - EE
                                - EG
                                - ES
                                - FI
                                - FR
                                - GB
                                - GE
                                - GH
                                - GR
                                - GT
                                - HK
                                - HN
                                - HR
                                - HU
                                - ID
                                - IE
                                - IL
                                - IN
                                - IQ
                                - IS
                                - IT
                                - JO
                                - JP
                                - KR
                                - KW
                                - LB
                                - LI
                                - LT
                                - LU
                                - LV
                                - MA
                                - MD
                                - ME
                                - MK
                                - MT
                                - MX
                                - MY
                                - NG
                                - NI
                                - NL
                                - 'NO'
                                - NZ
                                - OM
                                - PK
                                - PA
                                - PE
                                - PH
                                - PL
                                - PT
                                - PY
                                - PS
                                - QA
                                - RO
                                - RS
                                - SA
                                - SE
                                - SG
                                - SI
                                - SK
                                - SV
                                - TH
                                - TN
                                - TR
                                - TW
                                - UA
                                - US
                                - UY
                                - VE
                                - VN
                                - ZA
                                - AD
                                - AF
                                - AS
                                - AZ
                                - BB
                                - BQ
                                - CG
                                - CI
                                - CM
                                - CW
                                - DM
                                - DZ
                                - FO
                                - GF
                                - GP
                                - JM
                                - KG
                                - KH
                                - KI
                                - KZ
                                - LK
                                - LR
                                - LS
                                - MW
                                - NC
                                - PG
                                - TD
                                - TF
                                - UG
                                - VU
                                - ZW
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - chat_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - domain_classification
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                            description: >-
                              Built-in classification (CORPORATE, EDITORIAL,
                              INSTITUTIONAL, OTHER, REFERENCE, UGC, COMPETITOR,
                              OWN, RELATED) or a custom domain classification
                              name.
                            example:
                              - CORPORATE
                              - EDITORIAL
                              - INSTITUTIONAL
                              - OTHER
                              - REFERENCE
                              - UGC
                              - COMPETITOR
                              - OWN
                              - RELATED
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_id
                          operator:
                            type: string
                            enum:
                              - in
                              - not_in
                          values:
                            minItems: 1
                            type: array
                            items:
                              type: string
                        required:
                          - field
                          - operator
                          - values
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - mentioned_brand_count
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                      - type: object
                        properties:
                          field:
                            type: string
                            enum:
                              - gap
                          operator:
                            type: string
                            enum:
                              - gt
                              - gte
                              - lt
                              - lte
                          value:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - field
                          - operator
                          - value
                order_by:
                  description: >-
                    Sort results by one or more fields. Multiple entries create
                    a multi-key sort. Direction defaults to desc. When omitted,
                    a default ordering is applied.
                  example:
                    - field: citation_rate
                      direction: desc
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                        enum:
                          - citation_rate
                          - retrieval_count
                          - citation_count
                          - date
                          - week
                          - month
                      direction:
                        default: desc
                        type: string
                        enum:
                          - asc
                          - desc
                    required:
                      - field
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        domain:
                          type: string
                          example: example.com
                        classification:
                          nullable: true
                          description: >-
                            Built-in classification (CORPORATE, EDITORIAL,
                            INSTITUTIONAL, OTHER, REFERENCE, UGC, COMPETITOR,
                            OWN, RELATED) or the name of a custom domain
                            classification.
                          example: UGC
                          type: string
                        prompt:
                          type: object
                          properties:
                            id:
                              type: string
                              example: pr_93f790de-5b7a-45ee-b782-61103c81f20d
                          required:
                            - id
                        model:
                          deprecated: true
                          description: 'Deprecated: use model_channel instead'
                          type: object
                          properties:
                            id:
                              type: string
                              example: gpt-4o-search
                          required:
                            - id
                        model_channel:
                          type: object
                          properties:
                            id:
                              type: string
                              example: openai-1
                          required:
                            - id
                        tag:
                          type: object
                          properties:
                            id:
                              type: string
                              example: tg_23abec5b-100a-4261-9ee7-1effe68f0149
                          required:
                            - id
                        topic:
                          type: object
                          properties:
                            id:
                              type: string
                              example: to_e6b8cdd3-a51b-4d94-a866-28dbe6b830a6
                          required:
                            - id
                        country_code:
                          example: US
                          type: string
                        chat:
                          type: object
                          properties:
                            id:
                              type: string
                              example: ch_abc123
                          required:
                            - id
                        date:
                          type: string
                        week:
                          example: '2025-03-10'
                          description: Start (Monday) of the ISO week bucket.
                          type: string
                        month:
                          example: '2025-03-01'
                          description: First day of the month bucket.
                          type: string
                        usage_rate:
                          type: number
                          example: 0.8
                          deprecated: true
                          description: >-
                            Deprecated: use retrieved_percentage or
                            retrieval_rate instead
                        citation_avg:
                          type: number
                          example: 2.5
                          deprecated: true
                          description: 'Deprecated: use citation_rate instead'
                        retrieved_percentage:
                          type: number
                          example: 0.6
                        retrieval_rate:
                          type: number
                          example: 1.2
                        citation_rate:
                          example: 1.5
                          type: number
                        retrieval_count:
                          type: number
                          example: 24
                          description: >-
                            Total number of distinct URL retrievals from this
                            domain across all chats
                        citation_count:
                          type: number
                          example: 12
                          description: Total number of citations from this domain
                        retrieved_chat_count:
                          type: number
                          example: 18
                          description: >-
                            Number of distinct chats in which at least one URL
                            from this domain was retrieved
                        total_chat_count:
                          type: number
                          example: 30
                          description: >-
                            Total number of chats in scope for this row, used as
                            the denominator for `retrieval_rate` and
                            `retrieval_percentage`. Pre-aggregation `filters`
                            shrink this count; post-aggregation `having` filters
                            (e.g. `domain`, `domain_classification`) do not.
                        mentioned_brands:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                          description: Brand IDs mentioned alongside URLs from this domain
                      required:
                        - domain
                        - classification
                        - usage_rate
                        - citation_avg
                        - retrieved_percentage
                        - retrieval_rate
                        - citation_rate
                        - retrieval_count
                        - citation_count
                        - retrieved_chat_count
                        - total_chat_count
                        - mentioned_brands
                required:
                  - data
                description: Success
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
        - BearerAuth: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````