Skip to main content
POST
Run a dimensional analytics query for a product

Authorizations

x-api-key
string
header
required

Organization-scoped API key. Available scopes:

  • content:read: Read site pages, markdown content, and llms.txt files
  • content:write: Create, update, and delete site pages and content
  • prompts:read: Read prompts, topics, and prompt analysis results
  • prompts:write: Create, update, archive prompts
  • simulations:read: Read agent-simulation tasks, runs, environments, and analytics
  • simulations:write: Create and trigger simulation runs
  • logs:read: Read AI-traffic logs and request-level audit events
  • analytics:read: Read analytics aggregates (rankings, mentions, sources, SOV)
  • analytics:write: Write events to analytics
  • products:read: Read product metadata and competitor data
  • products:write: Update product settings and competitor lists

Body

application/json
productId
string
required

Product ID to scope the query to.

Minimum string length: 1
metric
enum<string>
required

Metric to query. Ungrouped and date-dimension SoV use trailing-30-day snapshots rather than additive period totals.

Available options:
sov,
citations,
traffic,
sentiment
dimensions
string[]

At most one dimension to group by. Omit or pass [] for a summary. For metric=sov when dimensions are omitted or dimensions=[date], sov, mentions, and runs are trailing-30-day snapshot values. Omit dimensions to return only the latest available snapshot in the requested window, or use dimensions=[date] to return one snapshot per date. The window selects eligible snapshot dates; it is not a period aggregation. Do not sum mentions or runs across dated rows because their rolling windows overlap. Capabilities — sov: dimensions [date, prompt, topic, engine, competitor], filters [viewId, promptId, topicId, engine, regionId], sortBy [sov, mentions, runs, label]; citations: dimensions [source, category, type, author, model, date], filters [viewId, topicId, regionId, category, contentType, model, author, searchTerm, productMentioned], sortBy [citations, mentions]; traffic: dimensions [date, page, model, category], filters [trafficType, provider, category]; sentiment: dimensions [prompt], filters [viewId, promptId, topicId].

Maximum array length: 1
Minimum string length: 1
filters
object
window
object

Date window; both start and end or neither. Defaults to the last 30 days. For metric=sov when dimensions are omitted or dimensions=[date], sov, mentions, and runs are trailing-30-day snapshot values. Omit dimensions to return only the latest available snapshot in the requested window, or use dimensions=[date] to return one snapshot per date. The window selects eligible snapshot dates; it is not a period aggregation. Do not sum mentions or runs across dated rows because their rolling windows overlap.

granularity
enum<string>

Time bucket for metric=traffic with the date dimension. Defaults to day.

Available options:
day,
week,
month
compare
enum<string>

Week-over-week comparison, metric=sentiment only.

Available options:
wow
page
integer
Required range: x >= 1
pageSize
integer
Required range: 1 <= x <= 100
sortBy
string
Minimum string length: 1
sortDirection
enum<string>
Available options:
asc,
desc

Response

Successful response

ok
enum<boolean>
required
Available options:
true
data
object
required