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

ParameterTypeRequiredDescription
rangestringnoRelative range such as 7d, 30d, or 90d
startAtstringnoISO date for a custom range start (requires endAt)
endAtstringnoISO date for a custom range end (requires startAt)
timezonestringnoIANA timezone for date bucketing, defaults to the site timezone
platformstringnoFilter by platform: web, ios, or android
countrystringnoComma-separated country codes
channelstringnoComma-separated traffic channels
pagestringnoComma-separated page paths
utmSourcestringnoComma-separated UTM sources
utmMediumstringnoComma-separated UTM mediums
utmCampaignstringnoComma-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?