sensorhubDevelopers
Open SensorhubGet an API key
Browse documentation
REST API / Views

citation_facts

View

One row per stored visible citation event; a URL can repeat within an answer, with engine, prompt, time, ownership and provenance. Use COUNT(DISTINCT answer_id), COUNT(DISTINCT prompt_id) and GROUP BY url, engine for citation reach and engine splits. Synthetic source candidates are in considered_sources, never in these citation facts. For headline metrics use read report_top_cited. canonical_title is the most recent nonempty stored citation title for this URL in this project.

Max rows per query
100
Default order
run_at 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.✓–
url
stringCited URL.✓✓
domain
stringStored cited domain.✓✓
canonical_title
nullable
stringMost recent nonempty citation title for this URL in this project; LinkedIn titles are redacted.✓✓
answer_id
stringAnswer ID; use COUNT(DISTINCT answer_id) for distinct answer reach.✓✓
prompt_id
stringPrompt ID; use COUNT(DISTINCT prompt_id) for prompt breadth.✓✓
engine
stringAnswer engine.
CHATGPT GOOGLE_AIO
✓✓
run_at
datetimeAnswer capture time.✓✓
is_own
booleanProject-owned URL.✓✓
is_competitor
booleanCompetitor-owned URL.✓✓
competitor_name
nullable
stringCanonical competitor owner.✓✓
redacted_fields
jsonPopulated fields hidden by privacy policy, with reasons. Empty means no populated field was redacted.––
provenance
stringVISIBLE_CITATION means an engine-rendered citation; never a synthetic search candidate.✓✓

Examples

Example
SELECT id, project_id, url, domain, canonical_title
FROM citation_facts
WHERE project_id = $1
ORDER BY run_at DESC
LIMIT 25

Calling it

MCP

Tool call
query({"sql":"SELECT id, project_id, url, domain, canonical_title FROM citation_facts WHERE project_id = $1 ORDER BY run_at 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, url, domain, canonical_title FROM citation_facts WHERE project_id = $1 ORDER BY run_at DESC LIMIT 25",
  "params": [
    "<value 1>"
  ]
}
JSON
Row JSON Schema
json
{
  "type": "object",
  "description": "One row per stored visible citation event; a URL can repeat within an answer, with engine, prompt, time, ownership and provenance. Use COUNT(DISTINCT answer_id), COUNT(DISTINCT prompt_id) and GROUP BY url, engine for citation reach and engine splits. Synthetic source candidates are in considered_sources, never in these citation facts. For headline metrics use read report_top_cited. canonical_title is the most recent nonempty stored citation title for this URL in this project.",
  "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
    },
    "url": {
      "type": "string",
      "description": "Cited URL.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "domain": {
      "type": "string",
      "description": "Stored cited domain.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "canonical_title": {
      "type": [
        "string",
        "null"
      ],
      "description": "Most recent nonempty citation title for this URL in this project; LinkedIn titles are redacted.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "answer_id": {
      "type": "string",
      "description": "Answer ID; use COUNT(DISTINCT answer_id) for distinct answer reach.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "prompt_id": {
      "type": "string",
      "description": "Prompt ID; use COUNT(DISTINCT prompt_id) for prompt breadth.",
      "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
    },
    "run_at": {
      "type": "string",
      "description": "Answer capture time.",
      "format": "date-time",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "is_own": {
      "type": "boolean",
      "description": "Project-owned URL.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "is_competitor": {
      "type": "boolean",
      "description": "Competitor-owned URL.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "competitor_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Canonical competitor owner.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    },
    "redacted_fields": {
      "description": "Populated fields hidden by privacy policy, with reasons. Empty means no populated field was redacted.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": false,
      "x-sensorhub-filterable": false,
      "x-sensorhub-sortable": false
    },
    "provenance": {
      "type": "string",
      "description": "VISIBLE_CITATION means an engine-rendered citation; never a synthetic search candidate.",
      "x-sensorhub-indexed": false,
      "x-sensorhub-searchable": false,
      "x-sensorhub-aggregatable": true,
      "x-sensorhub-filterable": true,
      "x-sensorhub-sortable": true
    }
  },
  "additionalProperties": false
}