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
| Field | Type | Description | Filter | Sort |
|---|---|---|---|---|
id | string | Stable identifier for this aggregate row. | – | ✓ |
project_id indexed | string | Project ID from projects. | ✓ | – |
url | string | Cited URL. | ✓ | ✓ |
domain | string | Stored cited domain. | ✓ | ✓ |
canonical_titlenullable | string | Most recent nonempty citation title for this URL in this project; LinkedIn titles are redacted. | ✓ | ✓ |
answer_id | string | Answer ID; use COUNT(DISTINCT answer_id) for distinct answer reach. | ✓ | ✓ |
prompt_id | string | Prompt ID; use COUNT(DISTINCT prompt_id) for prompt breadth. | ✓ | ✓ |
engine | string | Answer engine.CHATGPT GOOGLE_AIO | ✓ | ✓ |
run_at | datetime | Answer capture time. | ✓ | ✓ |
is_own | boolean | Project-owned URL. | ✓ | ✓ |
is_competitor | boolean | Competitor-owned URL. | ✓ | ✓ |
competitor_namenullable | string | Canonical competitor owner. | ✓ | ✓ |
redacted_fields | json | Populated fields hidden by privacy policy, with reasons. Empty means no populated field was redacted. | – | – |
provenance | string | VISIBLE_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 25Calling 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>"
]
}
JSONRow 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
}