Analytics and attribution
Measure brand perception
Reads sentiment, mention counts, themes and up to 20 brand excerpts for a month.
- Path
datasetisbrand_perception.
Authentication and access
- Authentication
- Bearer API key
- Scopes
- analytics:read
- Roles
- approver, editor, owner, publisher, service, viewer
- Plans
- Optimizer, Analyzer
- Credits
- No credit charge.
Parameters
| Name | Where | Type | Required | Description |
|---|---|---|---|---|
dataset | path | "brand_perception" | Yes | |
brand_id | query | string (uuid) | Yes | |
month | query | string | null | No | |
engine | query | string | null | No | |
ai_search | query | string | null | No | The AI search product the answer came from, such as google_ai_overviews. |
topic_id | query | string | null | No | |
prompt_id | query | string (uuid) | null | No | |
location_id | query | string (uuid) | No | |
group_by | query | "location" | "city" | "region" | No |
Request body
Send this request without a body.
Request examples
Set AEO_API_BASE_URL to https://api.aeoapi.dev and AEO_API_KEY to your server-side API key. Set the other environment variables to the values for your request.
curl --fail-with-body --get "$AEO_API_BASE_URL/v2/analytics/brand_perception" \
-H "Authorization: Bearer $AEO_API_KEY" \
--data-urlencode "brand_id=$BRAND_ID"from os import environ
from aeo_sdk import AeoClient
with AeoClient(environ["AEO_API_KEY"], base_url=environ["AEO_API_BASE_URL"]) as client:
response = client.v2_get_analytics_dataset(
dataset="brand_perception",
brand_id=environ["BRAND_ID"],
)
print(response.body)import { AeoClient } from "@aeoapi/aeo-sdk";
const client = new AeoClient(process.env.AEO_API_KEY!, {
baseUrl: process.env.AEO_API_BASE_URL!,
});
const response = await client.v2GetAnalyticsDataset(
"brand_perception",
{
brand_id: process.env.BRAND_ID!,
},
);
console.log(response.body);Responses
HTTP 200
Successful Response
application/json
Response fields are listed below.
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | The requested result. See the fields below for its contents. |
data.brand_id | string (uuid) | Yes | Identifies the brand this result belongs to. |
data.month | string | null | Yes | |
data.aggregation | "selected_samples" | Yes | |
data.valid_answers | integer | Yes | |
data.recorded_mention_answers | integer | Yes | |
data.recorded_mentions | integer | Yes | |
data.classified_answers | integer | Yes | |
data.unclassified_mentions | integer | Yes | |
data.sentiment | object | Yes | |
data.sentiment.positive | integer | Yes | |
data.sentiment.neutral | integer | Yes | |
data.sentiment.negative | integer | Yes | |
data.answers_with_displayable_brand_excerpt | integer | Yes | |
data.theme_answer_counts | object | Yes | |
data.theme_answer_counts.[key] | integer | No | Value for each key. |
data.supporting_excerpts | array of object | Yes | |
data.supporting_excerpts[].observation_id | string (uuid) | Yes | |
data.supporting_excerpts[].prompt_id | string (uuid) | Yes | |
data.supporting_excerpts[].engine | string | Yes | |
data.supporting_excerpts[].ai_search | string | Yes | |
data.supporting_excerpts[].sentiment | string | null | Yes | |
data.supporting_excerpts[].themes | array of string | Yes | |
data.supporting_excerpts[].excerpt | string | Yes | |
data.location_breakdown | array of object | No | Results for each location, city or region when you set group_by. |
data.location_breakdown[].location_id | string (uuid) | No | |
data.location_breakdown[].country | string | null | No | |
data.location_breakdown[].region | string | null | No | |
data.location_breakdown[].city | string | null | No | |
data.location_breakdown[].valid_answers | integer | Conditional | |
data.location_breakdown[].recorded_mention_answers | integer | Conditional | |
data.location_breakdown[].recorded_mentions | integer | Conditional | |
data.location_breakdown[].classified_answers | integer | Conditional | |
data.location_breakdown[].unclassified_mentions | integer | Conditional | |
data.location_breakdown[].sentiment | object | Conditional | |
data.location_breakdown[].sentiment.positive | integer | Conditional | |
data.location_breakdown[].sentiment.neutral | integer | Conditional | |
data.location_breakdown[].sentiment.negative | integer | Conditional | |
data.location_breakdown[].answers_with_displayable_brand_excerpt | integer | Conditional | |
data.location_breakdown[].theme_answer_counts | object | Conditional | |
data.location_breakdown[].theme_answer_counts.[key] | integer | No | Value for each key. |
data.location_breakdown[].supporting_excerpts | array of object | Conditional | |
data.location_breakdown[].supporting_excerpts[].observation_id | string (uuid) | Conditional | |
data.location_breakdown[].supporting_excerpts[].prompt_id | string (uuid) | Conditional | |
data.location_breakdown[].supporting_excerpts[].engine | string | Conditional | |
data.location_breakdown[].supporting_excerpts[].ai_search | string | Conditional | |
data.location_breakdown[].supporting_excerpts[].sentiment | string | null | Conditional | |
data.location_breakdown[].supporting_excerpts[].themes | array of string | Conditional | |
data.location_breakdown[].supporting_excerpts[].excerpt | string | Conditional | |
data.ai_searches | object | Yes | The same perception measures for each AI search product. |
meta | object | Yes | Information about this response, including any warnings or pagination details. |
meta.as_of | string (date-time) | Yes | The point in time that the response represents. |
meta.cohort_version | string | null | No | Identifies the version of the group used to calculate the results. |
meta.collected_at | string (date-time) | null | Yes | When the data was collected, if available. |
meta.metric_version | string | null | No | The version of the metric definition used for these results. |
meta.next_cursor | string | null | Yes | When present, pass this value as cursor to request the next page with the same filters. |
meta.next_refresh_at | string (date-time) | null | Yes | |
meta.request_id | string (uuid) | Yes | Keep this ID when reporting a problem with the request. |
meta.restricted_fields | array of string | No | Fields that your current access does not allow the API to return. |
meta.rights_filtered | boolean | Yes | Indicates whether access rights affected the returned data. |
meta.schema_version | "1.0" | Yes | The version of the response format. |
meta.stale | boolean | Yes | |
meta.warnings | array of string | Yes | Read these notes for limitations that affect the results. |
Errors
Read code and message in the error response. Keep request_id when you contact support.
- HTTP 400
invalid_request - HTTP 401
unauthenticated - HTTP 403
forbidden - HTTP 404
not_found - HTTP 422
validation_error - HTTP 429
rate_limited