Numbeo API endpoint
Returns the global city ranking for a Numbeo index family, either the continuously-updated current index or a historical periodic snapshot.
/numbeo/indices/rankingsQuery parameters:
index (required). Allowed values: quality-of-life, crime, health-care, pollution, traffic, property-investment.scope (optional, default current). Allowed values: current, historical.period (required when scope=historical) — a Numbeo snapshot id, formatted YYYY or YYYY-mid, e.g. 2026-mid, 2025.Response includes index, scope, period (echoed back when provided), cities[] (rank, city, city_slug, indices[] with name/value — column count varies by index, e.g. 2 for crime, up to 9 for quality-of-life), source_url.
Example response (index=crime):
{"code":200,"msg":"OK","data":{"index":"crime","scope":"current","cities":[{"rank":1,"city":"Pretoria, South Africa","city_slug":"Pretoria","indices":[{"name":"Crime Index","value":81.7},{"name":"Safety Index","value":18.3}]}],"source_url":"https://www.numbeo.com/crime/rankings_current.jsp"}}
| Field | Filled in, of 403 checked | Values in the sample |
|---|---|---|
| rank | 403 | 1 to 403, median 202 |
| city | 403 | “Port Moresby, Papua New Guinea” and 402 other values |
| city_slug | 403 | |
| indices | 403 | median 2 entries |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| index | string | Yes | Index family Allowed values: quality-of-life, crime, health-care, pollution, traffic, property-investment. | quality-of-life | |
| scope | string | No | current (default) or historical Allowed values: current, historical. | ||
| period | string | No | Required when scope=historical, e.g. 2026-mid or 2025 | 2026-mid | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/numbeo/indices/rankings?index=quality-of-life&scope=current" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"index": "crime",
"scope": "current",
"cities": [
{
"rank": 1,
"city": "Pretoria, South Africa",
"city_slug": "Pretoria",
"indices": [
{
"name": "Crime Index",
"value": 81.7
},
{
"name": "Safety Index",
"value": 18.3
}
]
}
],
"source_url": "https://www.numbeo.com/crime/rankings_current.jsp"
}
}Request schema
No body schema
Response schema
#/definitions/numbeo.indicesRankingsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | numbeo.IndicesRankingsResponse | No | ||||
| data.cities | array | No | IndexRankingEntry record, 7 fields: city, city_slug, country, indices, rank. Described under Numbeo Indices Rankings By Country API. | |||
| data.index | string | No | ||||
| data.period | string | No | ||||
| data.scope | string | No | ||||
| data.source_url | string | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/numbeo/indices/rankings?index=quality-of-life&scope=current" \
-H "x-api-key: $CRAWLORA_API_KEY"