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
AuthorizationheaderrequiredBearer token
Path parameters
idstringrequiredThe site's ID, which is in its dashboard address.
Query parameters
daysenum<integer>How many days to include, counting today. Any other value gives 30.
Responses
application/json
The site's analytics.
sitestringrequiredThe site's ID.
daysintegerrequiredThe number of days in the range.
sincestring<date>requiredThe first day in the range (UTC).
dailyobject[]requiredOne row for each day that has data, oldest first.
pagesobject[]requiredThe 100 most viewed pages over the range.
searches_without_resultsobject[]requiredThe 20 most searched queries that found nothing.
application/json
The key is missing, malformed, unknown or revoked.
errorstringrequiredWhat went wrong.
application/json
The key can't be used on this site, or doesn't have the scope this call needs.
errorstringrequiredWhat went wrong.
application/json
Too many requests from your address, or with this key. Wait a minute.
errorstringrequiredWhat went wrong.
Request
curl --request GET \ --url 'https://app.specly.xyz/api/sites/{id}/analytics?days=30' \ --header 'Authorization: Bearer <token>'const options = { method: 'GET', headers: { "Authorization": "Bearer <token>" }};
fetch('https://app.specly.xyz/api/sites/{id}/analytics?days=30', options) .then((res) => res.json()) .then((res) => console.log(res)) .catch((err) => console.error(err));import requests
url = "https://app.specly.xyz/api/sites/{id}/analytics?days=30"
headers = { "Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import ( "fmt" "io" "net/http")
func main() { url := "https://app.specly.xyz/api/sites/{id}/analytics?days=30"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))}Response
{ "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" } ]}{ "error": "That key is unknown or revoked."}{ "error": "That key may not start a deploy."}{ "error": "Too many requests with this key. Wait a minute."}