sensorhubDevelopers
Open SensorhubGet an API key
Browse documentation
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

FieldTypeDescriptionFilterSort
id
stringStable identifier for this aggregate row.–✓
project_id
indexed
stringProject ID from projects.✓–
query
stringTracked search query.✓✓
engine
stringSearch engine.✓✓
day
datetimeUTC calendar day. Filter this field to select complete daily buckets.✓✓
ownership
stringOWNED, COMPETITOR or THIRD_PARTY.✓✓
owned
booleanWhether these rankings belong to the project brand.✓✓
best_position
integerLowest observed SERP position for this day and ownership.✓✓
observations
integerRanking 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 25

Calling 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>"
  ]
}
JSON
Row 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
}