Get URLs Report
Changed onGet a report on Source URLs.
Prompt Scope
The report covers every prompt in the project that has not been deleted, archived prompts included, so history stays intact after a prompt is archived. Use a prompt_id filter to narrow it.
Aggregation Formulas
When aggregating results across multiple rows/dimensions, use the following formula:
- citation_rate: sum(citation_count) / sum(retrieval_count)
- citation_position: sum(citation_position_sum) / sum(citation_position_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, url_tag_id, domain_tag_id.
- 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.
Request
- Base URLhttps://api.peec.ai/customer/v1
- URLhttps://api.peec.ai/customer/v1/reports/urls
- Auth
- API key in header X-API-Key
- or API key in query parameter api_key
- or HTTP bearer
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": "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,
"citation_position": 2.4,
"citation_position_sum": 12,
"citation_position_count": 5
}
]
}Changes
- breaking
removed
subschema #1subschema #2from the/request propertyanyOflist (media type: application/json) - breaking
removed
subschema #1subschema #2from the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - breaking
removed
subschema #1subschema #2from the/request propertyanyOflist (media type: multipart/form-data) - breaking
removed
subschema #1subschema #2from the/request propertyanyOflist (media type: application/json) - breaking
removed
subschema #1subschema #2from the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - breaking
removed
subschema #1subschema #2from the/request propertyanyOflist (media type: multipart/form-data) - info
added
subschema #1subschema #2to the/request propertyanyOflist (media type: application/json) - info
added
subschema #1subschema #2to the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - info
added
subschema #1subschema #2to the/request propertyanyOflist (media type: multipart/form-data) - info
added
subschema #1subschema #2to the/request propertyanyOflist (media type: application/json) - info
added
subschema #1subschema #2to the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - info
added
subschema #1subschema #2to the/request propertyanyOflist (media type: multipart/form-data)
- breaking
- breaking
removed
subschema #1subschema #2subschema #3subschema #6subschema #11from the/request propertyanyOflist (media type: application/json) - breaking
removed
subschema #1subschema #2subschema #3subschema #6subschema #11from the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - breaking
removed
subschema #1subschema #2subschema #3subschema #6subschema #11from the/request propertyanyOflist (media type: multipart/form-data) - breaking
removed
subschema #1subschema #2subschema #3subschema #6subschema #11from the/request propertyanyOflist (media type: application/json) - breaking
removed
subschema #1subschema #2subschema #3subschema #6subschema #11from the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - breaking
removed
subschema #1subschema #2subschema #3subschema #6subschema #11from the/request propertyanyOflist (media type: multipart/form-data) - breaking
the
request property type changed fromnumbertointeger(media type: application/json) - breaking
the
request property type changed fromnumbertointeger(media type: application/x-www-form-urlencoded) - breaking
the
request property type changed fromnumbertointeger(media type: multipart/form-data) - breaking
the
request property type changed fromnumbertointeger(media type: application/json) - breaking
the
request property type changed fromnumbertointeger(media type: application/x-www-form-urlencoded) - breaking
the
request property type changed fromnumbertointeger(media type: multipart/form-data) - warning
the
request property's max was set to9007199254740991.00(media type: application/json) - warning
the
request property's max was set to9007199254740991.00(media type: application/x-www-form-urlencoded) - warning
the
request property's max was set to9007199254740991.00(media type: multipart/form-data) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #11to the/request propertyanyOflist (media type: application/json) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #11to the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #11to the/request propertyanyOflist (media type: multipart/form-data) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #11subschema #15subschema #16to the/request propertyanyOflist (media type: application/json) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #11subschema #15subschema #16to the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #11subschema #15subschema #16to the/request propertyanyOflist (media type: multipart/form-data) - info
added the new
citation_positionenum value to the request property//(media type: application/json) - info
added the new
citation_positionenum value to the request property//(media type: application/x-www-form-urlencoded) - info
added the new
citation_positionenum value to the request property//(media type: multipart/form-data) - info
added the required property
//to the response with the status - info
added the required property
//to the response with the status - info
added the required property
//to the response with the status
- breaking