GET /api/analytics
Fetches analytics data from OpenPanel: visitors, sessions, page views, bounce rate, top pages, referrers, and live visitor count.Query parameters
Response
Cache
- TTL: 60 seconds
- Live visitors TTL: 15 seconds
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Fetch web analytics data from OpenPanel.
| Parameter | Type | Required | Description |
|---|---|---|---|
range | string | No | Time range: 7d, 15d, 30d (default), 3m, 1y, all |
platform | string | No | Platform identifier (e.g., goshuin-com) |
project | string | No | Project slug (e.g., goshuin-atlas) |
{
"visitors": 1234,
"sessions": 2345,
"pageViews": 5678,
"bounceRate": 45.2,
"avgDuration": 120,
"liveVisitors": 12,
"topPages": [
{ "path": "/", "views": 500, "uniqueVisitors": 300 }
],
"referrers": [
{ "source": "google.com", "visitors": 200 }
]
}