curl "https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/analytics/breakdown?dimension=browser&startDate=2026-09-19T00:00:00Z&endDate=2026-09-26T00:00:00Z" \
-H "x-api-key: $STREAMPIXEL_API_KEY"
const u = new URL('https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/analytics/breakdown');
u.search = new URLSearchParams({ dimension: 'browser', startDate: '2026-09-19T00:00:00Z', endDate: '2026-09-26T00:00:00Z' });
const { breakdown } = await (await fetch(u, { headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } })).json();
import os, requests
r = requests.get(
"https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/analytics/breakdown",
params={"dimension": "browser", "startDate": "2026-09-19T00:00:00Z", "endDate": "2026-09-26T00:00:00Z"},
headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
)
print(r.json()["breakdown"])
{
"success": true,
"projectId": "664f1a2b3c4d5e6f7a8b9c0d",
"dimension": "browser",
"total": 143,
"count": 4,
"breakdown": [
{ "value": "Chrome", "count": 98, "percentage": 68.5 },
{ "value": "Safari", "count": 27, "percentage": 18.9 },
{ "value": "Edge", "count": 12, "percentage": 8.4 },
{ "value": "Firefox", "count": 6, "percentage": 4.2 }
]
}
Audience Breakdown
Sessions by country, city, browser, operating system or device.
GET
/
api
/
v1
/
analytics
/
projects
/
{projectId}
/
analytics
/
breakdown
curl "https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/analytics/breakdown?dimension=browser&startDate=2026-09-19T00:00:00Z&endDate=2026-09-26T00:00:00Z" \
-H "x-api-key: $STREAMPIXEL_API_KEY"
const u = new URL('https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/analytics/breakdown');
u.search = new URLSearchParams({ dimension: 'browser', startDate: '2026-09-19T00:00:00Z', endDate: '2026-09-26T00:00:00Z' });
const { breakdown } = await (await fetch(u, { headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } })).json();
import os, requests
r = requests.get(
"https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/analytics/breakdown",
params={"dimension": "browser", "startDate": "2026-09-19T00:00:00Z", "endDate": "2026-09-26T00:00:00Z"},
headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
)
print(r.json()["breakdown"])
{
"success": true,
"projectId": "664f1a2b3c4d5e6f7a8b9c0d",
"dimension": "browser",
"total": 143,
"count": 4,
"breakdown": [
{ "value": "Chrome", "count": 98, "percentage": 68.5 },
{ "value": "Safari", "count": 27, "percentage": 18.9 },
{ "value": "Edge", "count": 12, "percentage": 8.4 },
{ "value": "Firefox", "count": 6, "percentage": 4.2 }
]
}
Return the project’s sessions in a window grouped by one dimension, as counts and percentages.
Scope:
read. Unlike the other analytics endpoints, dimension, startDate and endDate are all required here; there is no default dimension.Path parameters
string
required
The project.
Query parameters
string
required
country, city, browser, os or device. Omitting it returns 400.string
With
dimension=city: restrict to one country code, e.g. DE.string
required
ISO 8601 start of the window. For API-key callers the window between
startDate and endDate is capped at 92 days; move the window to read a longer period.string
required
ISO 8601 end of the window.
Headers
string
required
Your Streampixel API key.
Response
string
The dimension used.
number
Sessions in the window with a value for the dimension.
array
value, count, percentage; for cities also country and countryCode.curl "https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/analytics/breakdown?dimension=browser&startDate=2026-09-19T00:00:00Z&endDate=2026-09-26T00:00:00Z" \
-H "x-api-key: $STREAMPIXEL_API_KEY"
const u = new URL('https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/analytics/breakdown');
u.search = new URLSearchParams({ dimension: 'browser', startDate: '2026-09-19T00:00:00Z', endDate: '2026-09-26T00:00:00Z' });
const { breakdown } = await (await fetch(u, { headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } })).json();
import os, requests
r = requests.get(
"https://platform.streampixel.io/api/v1/analytics/projects/664f1a2b3c4d5e6f7a8b9c0d/analytics/breakdown",
params={"dimension": "browser", "startDate": "2026-09-19T00:00:00Z", "endDate": "2026-09-26T00:00:00Z"},
headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
)
print(r.json()["breakdown"])
{
"success": true,
"projectId": "664f1a2b3c4d5e6f7a8b9c0d",
"dimension": "browser",
"total": 143,
"count": 4,
"breakdown": [
{ "value": "Chrome", "count": 98, "percentage": 68.5 },
{ "value": "Safari", "count": 27, "percentage": 18.9 },
{ "value": "Edge", "count": 12, "percentage": 8.4 },
{ "value": "Firefox", "count": 6, "percentage": 4.2 }
]
}
Errors
| Status | Cause |
|---|---|
400 | dimension missing or unknown ("Invalid dimension. Must be one of: country, city, browser, device, os"), or startDate / endDate missing ("startDate and endDate are required (ISO format)"). |
403 | The key lacks read, or the project belongs to another account. |
404 | No project with that id. |
400 | startDate/endDate not ISO 8601, startDate after endDate, or a window wider than 92 days. API-key callers only. |
429 | More than 300 reads in a minute (API-key callers). Retry-After is set. |