Analytics Countries
Returns scan data broken down by country, with optional filtering.
GET
/analytics/countriesHeaders
| Header | Required | Description |
|---|---|---|
X-API-Key | Required | Your API key |
QR-Version | Optional | API version (e.g., 2026-02-16) |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
start_date | string | 3 months ago | Start date in YYYY-MM-DD format |
end_date | string | today | End date in YYYY-MM-DD format |
qr_ids | string | — | Comma-separated list of QR code IDs to filter by |
country | string | — | Comma-separated list of country codes to filter by |
os | string | — | Comma-separated list of operating systems to filter by |
type | string | — | Comma-separated list of QR code types to filter by |
info
All filter parameters are optional. When omitted, the API returns data for the last 3 months across all QR codes.
Request
- cURL
- JavaScript
- Python
curl -X GET "https://integration-api.qr-build.com/analytics/countries?start_date=2026-01-01&end_date=2026-02-19" \
-H "X-API-Key: qrb_live_your_api_key_here"
const response = await fetch(
"https://integration-api.qr-build.com/analytics/countries?start_date=2026-01-01&end_date=2026-02-19",
{ headers: { "X-API-Key": "qrb_live_your_api_key_here" } }
);
const data = await response.json();
import requests
response = requests.get(
"https://integration-api.qr-build.com/analytics/countries",
headers={"X-API-Key": "qrb_live_your_api_key_here"},
params={"start_date": "2026-01-01", "end_date": "2026-02-19"},
)
data = response.json()
Response
{
"object": "analytics",
"success": true,
"data": [
{
"code": "US",
"name": "US",
"value": 4521,
"percentage": 35
},
{
"code": "GB",
"name": "GB",
"value": 2134,
"percentage": 17
},
{
"code": "DE",
"name": "DE",
"value": 1567,
"percentage": 12
}
]
}