Get Brands Report
Changed onGet a report on Brands.
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 formulas:
- sentiment: ((sum(sentiment_sum) / sum(sentiment_count)) / 2 + 0.5) * 100
- position: sum(position_sum) / sum(position_count)
- visibility: sum(visibility_count) / sum(visibility_total)
- share_of_voice: mention_count / sum(mention_count)
- win_rate: sum(win_count) / sum(visibility_total)
filters vs having
filters are pre-aggregation row filters (applied as WHERE before GROUP BY). They shrink both the numerator and the denominator of ratio metrics. Allowed fields: model_id (deprecated), model_channel_id, country_code, prompt_id, tag_id, topic_id, chat_id, brand_id. Note that brand_id in filters shrinks share_of_voice's denominator too — so filtering to one brand collapses SoV to 1.0. Use having for brand_id if you want SoV preserved.
having are post-aggregation row filters (applied as HAVING after GROUP BY). They select which aggregated rows are returned and do not shrink ratio-metric denominators. Filtering {field: "brand_id", values: [X]} here returns only brand X's row, but share_of_voice still divides X's mentions by mentions across all in-scope brands — so SoV stays in [0, 1]. Allowed fields: model_id (deprecated), model_channel_id, country_code, prompt_id, tag_id, topic_id, chat_id, brand_id.
Population fields (model_id etc.) are also allowed in having but require the matching value in dimensions so the column appears in GROUP BY; otherwise the request is rejected.
When dimensions are requested, the share_of_voice denominator follows the same grouping as the numerator. Requesting prompt_id as a dimension produces per-(brand × prompt) rows whose share_of_voice is the brand's mentions in that prompt divided by all brands' mentions in that prompt.
Request
- Base URLhttps://api.peec.ai/customer/v1
- URLhttps://api.peec.ai/customer/v1/reports/brands
- 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": "brand_id",
"operator": "in",
"values": [
"kw_abc123"
]
},
{
"field": "visibility",
"operator": "gte",
"value": 0.1
},
{
"field": "visibility",
"operator": "lte",
"value": 0.9
}
],
"order_by": [
{
"field": "visibility",
"direction": "desc"
}
]
}Response
Success
Example response
{
"data": [
{
"brand": {
"id": "kw_915e742b-396d-4a86-ad57-8bc84e8c2232",
"name": "Peec AI"
},
"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"
},
"date": "2025-03-15",
"week": "2025-03-10",
"month": "2025-03-01",
"share_of_voice": 0.15,
"mention_count": 42,
"visibility": 0.5,
"visibility_count": 5,
"visibility_total": 10,
"win_rate": 0.2,
"win_count": 2,
"sentiment": 50,
"sentiment_count": 10,
"position": 1.5,
"position_sum": 15,
"position_count": 10,
"previous": {
"date": "2025-03-15",
"share_of_voice": 0.15,
"mention_count": 42,
"visibility": 0.5,
"visibility_count": 5,
"visibility_total": 10,
"win_rate": 0.2,
"win_count": 2,
"sentiment": 50,
"sentiment_count": 10,
"position": 1.5,
"position_sum": 15,
"position_count": 10
}
}
]
}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 #6from the/request propertyanyOflist (media type: application/json) - breaking
removed
subschema #1subschema #2subschema #3subschema #6from the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - breaking
removed
subschema #1subschema #2subschema #3subschema #6from the/request propertyanyOflist (media type: multipart/form-data) - breaking
removed
subschema #1subschema #2subschema #3subschema #6from the/request propertyanyOflist (media type: application/json) - breaking
removed
subschema #1subschema #2subschema #3subschema #6from the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - breaking
removed
subschema #1subschema #2subschema #3subschema #6from 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 to500000.00(media type: application/json) - warning
the
request property's max was set to500000.00(media type: application/x-www-form-urlencoded) - warning
the
request property's max was set to500000.00(media type: multipart/form-data) - info
added the new optional request property
(media type: application/json) - info
added the new optional request property
(media type: application/x-www-form-urlencoded) - info
added the new optional request property
(media type: multipart/form-data) - info
added the new optional request property
(media type: application/json) - info
added the new optional request property
(media type: application/x-www-form-urlencoded) - info
added the new optional request property
(media type: multipart/form-data) - info
added the new optional request property
(media type: application/json) - info
added the new optional request property
(media type: application/x-www-form-urlencoded) - info
added the new optional request property
(media type: multipart/form-data) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #9to the/request propertyanyOflist (media type: application/json) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #9to the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #9to the/request propertyanyOflist (media type: multipart/form-data) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #9subschema #10to the/request propertyanyOflist (media type: application/json) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #9subschema #10to the/request propertyanyOflist (media type: application/x-www-form-urlencoded) - info
added
subschema #1subschema #2subschema #3subschema #6subschema #9subschema #10to the/request propertyanyOflist (media type: multipart/form-data) - info
added the new
win_rateenum value to the request property//(media type: application/json) - info
added the new
win_rateenum value to the request property//(media type: application/x-www-form-urlencoded) - info
added the new
win_rateenum value to the request property//(media type: multipart/form-data) - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- breaking