/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Get Referrers

Get Referrers

Where readers come from, with the referrers that are new this window flagged.

GET/v1/projects/{projectId}/analytics/referrersTry it
Session token

Returns the top 20 referrers for the window, by page views, and marks the ones that sent no traffic in the window before it. This is the referrer list on Insights › Traffic.

Note

Session JWT and org membership required. Any role can read it — an API key gets 401, a non-member 403. Any plan.

Path Parameters

NameDescription
projectId:stringpathRequired
The project ID.

Query Parameters

NameDescription
days:integerquery
Window in days, 1–365. Any other value returns 400 validation_error.
Default30

Response — 200 OK

NameDescription
data:array
At most 20 referrers, most page views first. A referrer seen only in the previous window is not listed.
data[].referrer:string | null
The referring URL, or null for direct traffic.
data[].count:number
Page views from this referrer in the window.
data[].isNew:boolean
true when this referrer had no page views in the previous window of the same length (from 2 × days ago to days ago). Applies to null (direct) too. For a project with no traffic before this window, every referrer is new.

Error Responses

Statuserror.codeWhen
400validation_errordays is not an integer from 1 to 365. details.target is query
401unauthorizedNo session JWT, an invalid or expired one, or an API key
403forbiddenYou are not a member of the project's workspace
404not_foundThe project does not exist
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl "https://api.syntext.dev/v1/projects/3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c/analytics/referrers?days=30" \
-H "Authorization: Bearer $SYNTEXT_JWT"
Responseapplication/json
200OK
{
"data": [
{ "referrer": "https://www.google.com/", "count": 1840, "isNew": false },
{ "referrer": null, "count": 922, "isNew": false },
{ "referrer": "https://news.ycombinator.com/", "count": 311, "isNew": true }
]
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext