v1

latestOpenAPI 3.0.32026-07-26710398.3 KB
Reports

Get URLs Report

Get a report on Source URLs.

Aggregation Formulas

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

  • citation_rate: sum(citation_count) / sum(retrieval_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 scope.
  • 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.

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, url, url_classification, mentioned_brand_id, mentioned_brand_count, gap.

citation_rate is computed per row from numerator (citation_count) and denominator (retrieval_count) inside the same aggregation group, so neither filter placement can collapse it. The shared fields exist in both filters and having — use filters to prune source rows before aggregation (typically more efficient), use having to operate on the aggregated mentioned_brands union for entity-wide selection.

post/reports/urls

Query parameters

project_idstring

Required if using a company api key

Example:or_f45b94ba-5e35-4982-93ed-285e72ee14eb

Request body

project_idstring

Required if using a company api key

limitnumber
offsetnumber
start_datestring date

full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21

end_datestring date

full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21

dimensionsstring[]

Dimensions to break down the report by.

Example request

{
  "project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb",
  "start_date": "2025-09-22",
  "end_date": "2025-09-22",
  "dimensions": [
    "tag_id",
    "model_id"
  ],
  "filters": [
    {
      "field": "model_id",
      "operator": "in",
      "values": [
        "gpt-4o-search"
      ]
    }
  ],
  "having": [
    {
      "field": "url",
      "operator": "in",
      "values": [
        "https://example.com/page"
      ]
    }
  ],
  "order_by": [
    {
      "field": "retrieval_count",
      "direction": "desc"
    }
  ]
}

Response

Success

Example response

{
  "data": [
    {
      "url": "https://example.com/blog/page1#header",
      "classification": "HOMEPAGE",
      "prompt": {
        "id": "pr_93f790de-5b7a-45ee-b782-61103c81f20d"
      },
      "model": {
        "id": "gpt-4o-search"
      },
      "model_channel": {
        "id": "openai-1"
      },
      "tag": {
        "id": "tg_23abec5b-100a-4261-9ee7-1effe68f0149"
      },
      "topic": {
        "id": "to_e6b8cdd3-a51b-4d94-a866-28dbe6b830a6"
      },
      "country_code": "US",
      "chat": {
        "id": "ch_abc123"
      },
      "week": "2025-03-10",
      "month": "2025-03-01",
      "usage_count": 8,
      "citation_count": 4,
      "citation_avg": 2.5,
      "retrievals": 8,
      "retrieval_count": 8,
      "citation_rate": 0.5
    }
  ]
}