3 Min. Lesedauer
GET /analytics/:websiteId/pages
Retrieve the top pages by view count for a website. Each page includes the total number of views and an average visitor value score indicating engagement quality.
GET
/api/external/v1/analytics/:websiteId/pagesGet top pages by view count
Authentication
AuthenticationBash
curl -X GET 'https://api.zenovay.com/api/external/v1/analytics/a1b2c3d4-e5f6-7890-abcd-ef1234567890/pages?range=7d&limit=10' \
-H 'X-API-Key: YOUR_API_KEY'Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
websiteId | string (path) | Yes | - | The UUID of the website |
range | string (query) | No | 7d | Time range: 24h, 7d, 30d, 90d, 1y |
limit | integer (query) | No | 20 | Number of pages to return (max: 100) |
Response
Response (200 OK)JSON
{
"success": true,
"data": {
"pages": [
{
"url": "/",
"views": 5423,
"avg_value_score": 45.32
},
{
"url": "/pricing",
"views": 2134,
"avg_value_score": 72.18
},
{
"url": "/features",
"views": 1876,
"avg_value_score": 58.45
},
{
"url": "/blog/getting-started",
"views": 1245,
"avg_value_score": 34.67
},
{
"url": "/docs",
"views": 987,
"avg_value_score": 61.23
}
]
},
"timestamp": "2026-02-07T12:00:00.000Z"
}Response Fields
| Field | Type | Description |
|---|---|---|
pages | array | List of page statistics sorted by views descending |
pages[].url | string | Page URL path |
pages[].views | number | Total page views in the time range |
pages[].avg_value_score | number | Average visitor value score for this page (0-100) |
TypeScript Interface
PagesResponseTypeScript
interface PageStat {
url: string;
views: number;
avg_value_score: number;
}
interface PagesResponse {
success: true;
data: {
pages: PageStat[];
};
timestamp: string;
}HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - API key does not have access to this website |
| 404 | Not Found - Website not found |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Code Examples
cURLBash
curl -X GET 'https://api.zenovay.com/api/external/v1/analytics/a1b2c3d4-e5f6-7890-abcd-ef1234567890/pages?range=7d&limit=10' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json'Error Handling
Error Response (500 Internal Server Error)JSON
{
"success": false,
"error": {
"message": "Failed to fetch page data",
"code": "INTERNAL_ERROR",
"timestamp": "2026-02-07T12:00:00.000Z"
}
}War diese Seite hilfreich?