Analytics API
Authenticate and learn the common query parameters shared by all Analytics API endpoints.
Last updated June 3, 2026
Use the Analytics API to read the same data shown in the Grometrics dashboard. Create an API key from Settings > API Keys, then send it as a bearer token. All analytics endpoints share the query parameters documented below.
GET /api/analytics/overview
1curl "https://usegrometrics.com/api/analytics/overview?range=30d" \2-H "Authorization: Bearer YOUR_API_KEY"
Common query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| range | string | no | Relative range such as 7d, 30d, or 90d |
| startAt | string | no | ISO date for a custom range start (requires endAt) |
| endAt | string | no | ISO date for a custom range end (requires startAt) |
| timezone | string | no | IANA timezone for date bucketing, defaults to the site timezone |
| platform | string | no | Filter by platform: web, ios, or android |
| country | string | no | Comma-separated country codes |
| channel | string | no | Comma-separated traffic channels |
| page | string | no | Comma-separated page paths |
| utmSource | string | no | Comma-separated UTM sources |
| utmMedium | string | no | Comma-separated UTM mediums |
| utmCampaign | string | no | Comma-separated UTM campaigns |
What happens next
Try fetching overview metrics for the last 7 days, then pull time-series data for the same range.
Troubleshooting
Request is unauthorized
Check that the Authorization header uses a valid, unrevoked Grometrics API key.
Was this page helpful?