https://api.visitors.now/v1/analytics/pagesReturns top pages ranked by visitors. Supports cursor-based pagination.
const res = await fetch("https://api.visitors.now/v1/analytics/pages?period=7d&limit=10", {
headers: { Authorization: `Bearer ${VISITORS_API_KEY}` },
});
const { items, nextCursor } = await res.json();Time period. Default: 30d.
Custom start date (ISO 8601).
Custom end date (ISO 8601).
Timezone. Default: UTC.
JSON-encoded filter object.
Pagination cursor from a previous response.
Number of results per page. Default: 50.
Filter pages by pathname.
{
"items": [
{
"pathname": "/",
"people": 1204,
"views": 3891
},
{
"pathname": "/pricing",
"people": 542,
"views": 1203
},
{
"pathname": "/docs",
"people": 389,
"views": 876
}
// ...
],
"nextCursor": "eyJwIjozODksInYiOiIvZG9jcyJ9"
}