Geography
Query analytics data by geographic information.
Countries
Group results by country code.
Returns a list of results with the 2 character ISO 3166-1 country code and the name of the country (in English) alongside requested metrics.
Regions
Group results by country "region" or province.
Uses the list of ISO3166-2 principal sub-divisions.
<base>/stream/totals/regions?range=last_7_days&countries=GB,DE
"results": [
{
"country": "United Kingdom",
"country_code": "GB",
"region": "England",
"region_code": "ENG",
"users": 2615,
},
{
"country": "Germany",
"country_code": "DE",
"region": "Hesse",
"region_code": "HE",
"users": 233,
},
{
"country": "South Africa",
"country_code": "ZA",
"region": "Western Cape",
"region_code": "WC",
"users": 17026,
},
...
]
Cities
Group results by city name.
Cities has no official list of codes, names used directly from IP lookup result.
Combined geography
Group results by combining country code, region code and city name.
UN Regions
Group results by combining the region and sub-region from the UN geoschema codes.
H3 Geopoints
Group results by their H3 cell ID. Allows rendering geographic density maps without relying on discrete latitude/longitude markers.
The API uses the level 5 resolution, dividing the globe into ~2m hexagonal cells of ±250 km2. Each cell is approximately 16km in diameter.