REST API / Views
ranking_daily
View
Best observed search position by project, query, engine, UTC day and ownership. Multiple captures in one day collapse to the best position; competitor and third-party positions remain separate. For dashboard-identical headline numbers, anchored windows and deltas, use read report_ranking_series.
- 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. | ✓ | – |
query | string | Tracked search query. | ✓ | ✓ |
engine | string | Search engine. | ✓ | ✓ |
day | datetime | UTC calendar day. Filter this field to select complete daily buckets. | ✓ | ✓ |
ownership | string | OWNED, COMPETITOR or THIRD_PARTY. | ✓ | ✓ |
owned | boolean | Whether these rankings belong to the project brand. | ✓ | ✓ |
best_position | integer | Lowest observed SERP position for this day and ownership. | ✓ | ✓ |
observations | integer | Ranking rows observed in this group. | ✓ | ✓ |
Examples
Example
SELECT id, project_id, query, engine, day
FROM ranking_daily
WHERE project_id = $1
ORDER BY day DESC
LIMIT 25Calling it
MCP
Tool call
query({"sql":"SELECT id, project_id, query, engine, day FROM ranking_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, query, engine, day FROM ranking_daily WHERE project_id = $1 ORDER BY day DESC LIMIT 25",
"params": [
"<value 1>"
]
}
JSONRow JSON Schema
json
{
"type": "object",
"description": "Best observed search position by project, query, engine, UTC day and ownership. Multiple captures in one day collapse to the best position; competitor and third-party positions remain separate. For dashboard-identical headline numbers, anchored windows and deltas, use read report_ranking_series.",
"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
},
"query": {
"type": "string",
"description": "Tracked search query.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"engine": {
"type": "string",
"description": "Search engine.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"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
},
"ownership": {
"type": "string",
"description": "OWNED, COMPETITOR or THIRD_PARTY.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"owned": {
"type": "boolean",
"description": "Whether these rankings belong to the project brand.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"best_position": {
"type": "integer",
"description": "Lowest observed SERP position for this day and ownership.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
},
"observations": {
"type": "integer",
"description": "Ranking rows observed in this group.",
"x-sensorhub-indexed": false,
"x-sensorhub-searchable": false,
"x-sensorhub-aggregatable": true,
"x-sensorhub-filterable": true,
"x-sensorhub-sortable": true
}
},
"additionalProperties": false
}