Nights by region
GET
/v1/nights/by-regionNights for each region inside a country, in the country's own regional units.
Developer plan and upKey requiredJSON or CSVCached until the next release
Parameters
| Name | Type | Description |
|---|---|---|
| isorequired | string path | ISO 3166 two-letter country code e.g. CL |
| periodoptional | period query | One period; defaults to the latest finished one e.g. 2026-08 |
Request
# Nights by province, county or region
curl "https://api.tourismapi.com/v1/nights/by-region?iso=SI" \
-H "X-API-Key: $TOURISM_API_KEY"const res = await fetch("https://api.tourismapi.com/v1/nights/by-region?iso=SI", {
headers: { "X-API-Key": process.env.TOURISM_API_KEY }
});
if (!res.ok) throw new Error(`Tourism API ${res.status}`);
const { meta, data } = await res.json();
console.log(meta.data_as_of, data);import os, requests
r = requests.get(
"https://api.tourismapi.com/v1/nights/by-region?iso=SI",
headers={"X-API-Key": os.environ["TOURISM_API_KEY"]},
timeout=10,
)
r.raise_for_status()
body = r.json()
print(body["meta"]["data_as_of"], body["data"])$ch = curl_init("https://api.tourismapi.com/v1/nights/by-region?iso=SI");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("TOURISM_API_KEY")],
]);
$body = json_decode(curl_exec($ch), true);
print_r($body["data"]);
Example response
{
"meta": {
"request_id": "req_1566e78b1e",
"data_as_of": "2026-10-20T04:48:14Z",
"count": 50,
"country": "SI",
"measure": "nights",
"breakdown": "region",
"period": "2025",
"freq": "A"
},
"data": [
{
"series": "sr_d1jex8kh",
"name": "SLOVENIA",
"unit": "",
"value": 17843311
},
{
"series": "sr_dtkwatyh",
"name": "Nights spent, NUTS 2 regions: Total, Hotels; holiday and other short-stay accommodation; camping grounds, recreational vehicle parks and trailer parks, Slovenija",
"unit": "Number",
"value": 17827408
},
{
"series": "sr_re4a2m9s",
"name": "SLOVENIA, Foreign, Overnight stays",
"unit": "",
"value": 13358792
}
]
}Response fields
| Field | Type | Example |
|---|---|---|
| series | string | sr_d1jex8kh |
| name | string | SLOVENIA |
| unit | string | |
| value | number | 17843311 |