Data gaps
GET
/v1/gapsEvery monthly country from its first figure to last month: the months held, missing, not published by the source and withheld, with the missing runs. Nothing before a country's first figure counts as missing. Free.
On every plan, Free includedKey requiredJSON or CSVCached until the next release
Parameters
| Name | Type | Description |
|---|---|---|
| countryoptional | string query | One or more ISO codes, comma separated e.g. CL,BA,AT |
Request
# Which months each country is missing
curl "https://api.tourismapi.com/v1/gaps?country=CL" \
-H "X-API-Key: $TOURISM_API_KEY"const res = await fetch("https://api.tourismapi.com/v1/gaps?country=CL", {
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/gaps?country=CL",
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/gaps?country=CL");
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_9fd48108e8",
"data_as_of": "2026-11-07T04:51:52Z",
"count": 1,
"months": "from each series' first figure to last month; nothing before the first figure is counted as missing",
"kinds": {
"missing": "inside the series, not held: being looked for",
"not_published": "the source has no figure for the month",
"withheld": "the source answered with no value (confidential or not available)",
"pending": "after the latest figure: not published yet"
},
"page": "https://tourismapi.com/data-gaps"
},
"data": [
{
"country": "CL",
"name": "Chile",
"measure": "nights",
"series": "sr_za1n785e",
"first": "2020-07",
"latest": "2026-08",
"months_held": 62,
"months_missing": 12,
"months_not_published": 0,
"months_withheld": 0,
"months_pending": 2,
"complete_pct": 83.8,
"missing": [
[
"2025-02",
"2025-04"
],
[
"2025-08",
"2026-01"
],
[
"2026-04",
"2026-04"
]
],
"not_published": [],
"withheld": [],
"checked_at": "2026-11-06T09:37:10Z"
}
]
}Response fields
| Field | Type | Example |
|---|---|---|
| country | string | CL |
| name | string | Chile |
| measure | string | nights |
| series | string | sr_za1n785e |
| first | string | 2020-07 |
| latest | string | 2026-08 |
| months_held | number | 62 |
| months_missing | number | 12 |
| months_not_published | number | 0 |
| months_withheld | number | 0 |
| months_pending | number | 2 |
| complete_pct | number | 83.8 |
| missing | array | 3 items |
| not_published | array | 0 items |
| withheld | array | 0 items |
| checked_at | string | 2026-11-06T09:37:10Z |