v1
latestOpenAPI 3.0.32026-07-26710398.3 KBGet 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.
Query parameters
Required if using a company api key
Request body
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": "domain",
"operator": "in",
"values": [
"example.com"
]
}
],
"order_by": [
{
"field": "citation_rate",
"direction": "desc"
}
]
}Response
Success
Example response
{
"data": [
{
"domain": "example.com",
"classification": "UGC",
"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_rate": 0.8,
"citation_avg": 2.5,
"retrieved_percentage": 0.6,
"retrieval_rate": 1.2,
"citation_rate": 1.5,
"retrieval_count": 24,
"citation_count": 12,
"retrieved_chat_count": 18,
"total_chat_count": 30
}
]
}