curl --request POST \
--url https://app.promptingco.com/api/v1/analytics/explore \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"productId": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({productId: '<string>'})
};
fetch('https://app.promptingco.com/api/v1/analytics/explore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.promptingco.com/api/v1/analytics/explore"
payload = { "productId": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"metric": "sov",
"dimensions": [
"<string>"
],
"scope": {
"product": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
}
},
"window": {
"start": "<string>",
"end": "<string>"
},
"columns": [
{
"key": "<string>",
"label": "<string>",
"kind": "dimension",
"type": "string"
}
],
"rows": [
{}
],
"granularity": "day",
"rollingWindow": 15,
"compare": "wow",
"pagination": {
"page": 123,
"pageSize": 123,
"total": 123,
"totalPages": 123
},
"totals": {}
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Run a dimensional analytics query for a product
Query one analytics metric (sov, citations, traffic, sentiment) grouped by at most one dimension, scoped by filters and a date window. Returns flat rows plus column metadata for generic rendering.
curl --request POST \
--url https://app.promptingco.com/api/v1/analytics/explore \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"productId": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({productId: '<string>'})
};
fetch('https://app.promptingco.com/api/v1/analytics/explore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.promptingco.com/api/v1/analytics/explore"
payload = { "productId": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"metric": "sov",
"dimensions": [
"<string>"
],
"scope": {
"product": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
}
},
"window": {
"start": "<string>",
"end": "<string>"
},
"columns": [
{
"key": "<string>",
"label": "<string>",
"kind": "dimension",
"type": "string"
}
],
"rows": [
{}
],
"granularity": "day",
"rollingWindow": 15,
"compare": "wow",
"pagination": {
"page": 123,
"pageSize": 123,
"total": 123,
"totalPages": 123
},
"totals": {}
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Authorizations
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, prompt suggestions, and prompt analysis results
- prompts:write: Create, update, archive prompts and generate, edit, or review prompt suggestions
- 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
Product ID to scope the query to.
1Metric to query. Ungrouped and date-dimension SoV use configurable trailing snapshots rather than additive period totals.
sov, citations, traffic, sentiment At most one dimension to group by. Omit or pass [] for a summary. For metric=sov when dimensions are omitted or dimensions=[date] or dimensions=[engine], sov, mentions, and runs are trailing-window snapshot values. granularity selects day, week, or month buckets and rollingWindow counts those buckets; they default to day and 30. Omit dimensions to return the latest product snapshot, use dimensions=[date] for one snapshot per date, or use dimensions=[engine] for the latest snapshot per engine. The window selects eligible snapshot dates; it is not a period aggregation. Custom rolling settings are supported for product, date, and engine SOV series. 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].
11Show child attributes
Show child attributes
Date window; both start and end or neither. Defaults to the last 30 days. For metric=sov when dimensions are omitted or dimensions=[date] or dimensions=[engine], sov, mentions, and runs are trailing-window snapshot values. granularity selects day, week, or month buckets and rollingWindow counts those buckets; they default to day and 30. Omit dimensions to return the latest product snapshot, use dimensions=[date] for one snapshot per date, or use dimensions=[engine] for the latest snapshot per engine. The window selects eligible snapshot dates; it is not a period aggregation. Custom rolling settings are supported for product, date, and engine SOV series. Do not sum mentions or runs across dated rows because their rolling windows overlap.
Show child attributes
Show child attributes
UTC bucket and rollingWindow unit for metric=sov, or time bucket for metric=traffic with dimensions=[date]. Defaults to day.
day, week, month Number of granularity buckets in each metric=sov snapshot. Defaults to 30.
1 <= x <= 30Week-over-week comparison, metric=sentiment only.
wow x >= 11 <= x <= 1001asc, desc