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_4c9d20",
"data_as_of": "2026-10-14T12:00:00Z",
"count": 1,
"next": null
},
"data": [
{
"country": "VN",
"name": "Vietnam",
"measure": "arrivals",
"series": "sr_k2v8x0q1",
"first": "2008-01",
"latest": "2026-09",
"months_held": 220,
"months_missing": 0,
"months_not_published": 0,
"months_withheld": 0,
"months_pending": 0,
"complete_pct": 100,
"missing": [],
"not_published": [],
"withheld": [],
"checked_at": "2026-10-14T12:00:00Z"
}
]
}Response fields
| Field | Type | Example |
|---|---|---|
| country | string | VN |
| name | string | Vietnam |
| measure | string | arrivals |
| series | string | sr_k2v8x0q1 |
| first | string | 2008-01 |
| latest | string | 2026-09 |
| months_held | number | 220 |
| months_missing | number | 0 |
| months_not_published | number | 0 |
| months_withheld | number | 0 |
| months_pending | number | 0 |
| complete_pct | number | 100 |
| missing | array | 0 items |
| not_published | array | 0 items |
| withheld | array | 0 items |
| checked_at | string | 2026-10-14T12:00:00Z |