REST API / Views
competitor_visibility_daily
View
Competitor answer visibility by UTC day and engine. Each competitor counts once per answer, matching the visibility matrix. For dashboard-identical headline numbers, anchored windows and deltas, use read report_topics or report_visibility_overview.
- Max rows per query
- 100
- Default order
- day desc
- Required filter
- one of project_id
- Max offset
- 2000
- Cursor paging
- by id
Filter project_id and day where available. For dashboard-identical headline numbers, anchored windows and deltas, use read report_*.
Fields
| Field | Type | Description | Filter | Sort |
|---|---|---|---|---|
id | string | Stable identifier for this aggregate row. | – | ✓ |
project_id indexed | string | Project ID from projects. | ✓ | – |
day | datetime | UTC calendar day. Filter this field to select complete daily buckets. | ✓ | ✓ |
engine | string | Answer engine.CHATGPT GOOGLE_AIO | ✓ | ✓ |
brand | string | Canonical competitor name stored on the answer. | ✓ | ✓ |
answers | integer | All answer runs in this project, day and engine, including runs with no competitor. | ✓ | ✓ |
answers_with_brand | integer | Distinct answer runs naming this competitor. | ✓ | ✓ |
share | number | Competitor visibility as a fraction from 0 to 1: answers_with_brand / answers. | ✓ | ✓ |
Examples
Example
SELECT id, project_id, day, engine, brand
FROM competitor_visibility_daily
WHERE project_id = $1
ORDER BY day DESC
LIMIT 25Calling it
MCP
Tool call
query({"sql":"SELECT id, project_id, day, engine, brand FROM competitor_visibility_daily WHERE project_id = $1 ORDER BY day DESC LIMIT 25","params":["<value 1>"]})REST
curl
curl -X POST "https://app.sensorhub.ai/api/v1/query" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"sql": "SELECT id, project_id, day, engine, brand FROM competitor_visibility_daily WHERE project_id = $1 ORDER BY day DESC LIMIT 25",
"params": [
"<value 1>"
]
}
JSONRow JSON Schema
json
{
"type": "object",
"description": "Competitor answer visibility by UTC day and engine. Each competitor counts once per answer, matching the visibility matrix. For dashboard-identical headline numbers, anchored windows and deltas, use read report_topics or report_visibility_overview.",
"properties": {
"id": {
"type": "string",
"description": "Stable identifier for this aggregate row.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": false,
"x-sensorhub-sortable": true
},
"project_id": {
"type": "string",
"description": "Project ID from projects.",
"x-sensorhub-indexed": true,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": false
},
"day": {
"type": "string",
"description": "UTC calendar day. Filter this field to select complete daily buckets.",
"format": "date-time",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"engine": {
"type": "string",
"description": "Answer engine.",
"enum": [
"CHATGPT",
"GOOGLE_AIO"
],
"x-sensorhub-filter-operators": [
"=",
"!=",
"<>",
"IN",
"NOT IN",
"IS NULL",
"IS NOT NULL"
],
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"brand": {
"type": "string",
"description": "Canonical competitor name stored on the answer.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"answers": {
"type": "integer",
"description": "All answer runs in this project, day and engine, including runs with no competitor.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"answers_with_brand": {
"type": "integer",
"description": "Distinct answer runs naming this competitor.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"share": {
"type": "number",
"description": "Competitor visibility as a fraction from 0 to 1: answers_with_brand / answers.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
}
},
"additionalProperties": false
}