Skip to content

Get site analytics

GET /api/sites/{id}/analytics

Returns the site's analytics for the last 7, 30 or 90 days, as JSON: one row a day for the whole site, the top 100 pages over the range, and the top 20 searches that found nothing. Needs a key with the analytics:read scope. A key may make 60 calls a minute.

Authorization

Authorizationheaderrequired

Bearer token

Path parameters

idstringrequired

The site's ID, which is in its dashboard address.

Query parameters

daysenum<integer>default: 30

How many days to include, counting today. Any other value gives 30.

Available options: 7, 30, 90

Responses

application/json

The site's analytics.

sitestringrequired

The site's ID.

daysintegerrequired

The number of days in the range.

sincestring<date>required

The first day in the range (UTC).

dailyobject[]required

One row for each day that has data, oldest first.

ShowHide child attributes
daystring<date>
viewsinteger

Page views.

readersinteger

Readers

agent_readsobject

Reads by AI agents, as a count for each agent.

searchesinteger
searches_foundinteger

Searches that found a page.

helpfulinteger

"Yes" answers to "Was this helpful?".

not_helpfulinteger

"No" answers to "Was this helpful?".

pagesobject[]required

The 100 most viewed pages over the range.

ShowHide child attributes
pathstring
viewsinteger
agent_readsinteger
helpfulinteger
not_helpfulinteger
searches_without_resultsobject[]required

The 20 most searched queries that found nothing.

ShowHide child attributes
querystring
searchesinteger
last_daystring<date>

Request

cURL
curl --request GET \
--url 'https://app.specly.xyz/api/sites/{id}/analytics?days=30' \
--header 'Authorization: Bearer <token>'

Response

200
{
"site": "2f6c1b8e-7d3a-4e55-b1c9-3a9d0c4e8f12",
"days": 7,
"since": "2026-10-20",
"daily": [
{
"day": "2026-10-25",
"views": 412,
"readers": 138,
"agent_reads": {
"ChatGPT": 12
},
"searches": 40,
"searches_found": 36,
"helpful": 9,
"not_helpful": 1
}
],
"pages": [
{
"path": "/get-started/quickstart",
"views": 190,
"agent_reads": 5,
"helpful": 6,
"not_helpful": 0
}
],
"searches_without_results": [
{
"query": "sso",
"searches": 4,
"last_day": "2026-10-24"
}
]
}
Was this page helpful?