Analytics
Query analytics data for a Brand Kit with flexible metrics, dimensions, and filters.
The Brand Kit ID
The Brand Kit ID to query analytics for
Time granularity for aggregation. Default: total
Start date (YYYY-MM-DD). Default: 7 days ago
End date (YYYY-MM-DD). Defaults to yesterday. Must be before today because today's data may still be processing and is incomplete — yesterday is used to ensure robust, complete data. Leave blank unless a specific date is requested.
Filter by topic IDs
Filter by tags. A bare array of tag IDs matches ANY (IN). An object {"operator":"IN"|"HAS_ALL"|"NOT_IN","value":[ids]} selects the operator; HAS_ALL matches only items tagged with every listed tag; NOT_IN matches only items tagged with none of the listed tags.
Filter by persona IDs
Filter sentiment data by theme IDs. Only applies to sentiment_score metric.
Filter by prompt type. Options: category (generic prompts - recommended for accurate visibility metrics), brand (prompts mentioning the brand). Defaults to category if not specified
Maximum rows to return (1-5000). Default: 100
Number of records to skip for pagination. Default: 0. Use with limit to page through large result sets.
Custom sort order (e.g., "citation_count DESC")
Successful response
Query results with requested dimensions and metrics
Error message if query failed
QuickChart.io URL for visualizing the data. Useful for displaying charts or embedding in Notion/Google docs, etc. DO NOT DISPLAY THIS IMAGE DIRECTLY TO THE USER. Null when no data is available to visualize.
Bad request - invalid parameters, filters, or sort options
Unauthorized - invalid or missing authentication token
Not found - resource does not exist
Precondition failed - AEO not configured for this brand kit
POST /public_api/brand_kits/{brand_kit_id}/analytics HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 282
{
"brand_kit_id": 1,
"metrics": [
"mention_rate"
],
"dimensions": [
"date"
],
"grain": "daily",
"start_date": "text",
"end_date": "text",
"providers": [
"chat_gpt"
],
"topics": [
1
],
"tags": [
1
],
"countries": [
"AE"
],
"personas": [
1
],
"themes": [
1
],
"brand_mentioned": "brand",
"limit": 1,
"offset": 1,
"order_by": "text"
}{
"data": [
{}
],
"meta": {
"row_count": 1,
"total_count": 1,
"execution_time_ms": 1,
"start_date": "text",
"end_date": "text",
"data_availability": {
"earliest_data_date": "text",
"latest_data_date": "text",
"requested_period_has_data": true
}
},
"error": "text",
"query": {
"metrics": [
"text"
],
"dimensions": [
"text"
],
"filters": {},
"grain": "text",
"limit": 1,
"offset": 1
},
"chart_image_url": "text"
}Last updated
Was this helpful?