Top pages endpoint
GET /api/v1/sites/{site}/pages
Returns top pages, entry pages, and exit pages ranked by visitor count.
Example request
curl -H "Authorization: Bearer your-token" "https://pageviews.ai/api/v1/sites/{site_id}/pages?from=2026-03-01&to=2026-03-07"
Response
Returns an object with three arrays:
topPages— Most visited pagesentryPages— Pages where visitors first landedexitPages— Pages where visitors left the site
Each item contains a path and visitors count. When comparison dates are provided, a comparison field indicates the direction (positive or negative).
Example response
{
"data": {
"topPages": [
{ "path": "/", "visitors": 542 },
{ "path": "/blog/my-post", "visitors": 231 },
{ "path": "/pricing", "visitors": 189 }
],
"entryPages": [
{ "path": "/", "visitors": 412 },
{ "path": "/blog/my-post", "visitors": 98 }
],
"exitPages": [
{ "path": "/pricing", "visitors": 156 },
{ "path": "/", "visitors": 134 }
]
}
}