Forecast
GET
/v1/stats/forecastHolt-Winters seasonal smoothing on log values, fitted from each country's post-pandemic reopening, with 80% and 95% ranges. Every forecast carries the date it was made and its error on the last 12 published months. 47 countries.
Intel plan and upKey requiredJSON or CSVCached until the next release
Parameters
| Name | Type | Description |
|---|---|---|
| countryrequired | string query | ISO code of a country that carries this statistic (listed at /v1/countries/{iso}) e.g. JP |
| horizonoptional | integer query | Months ahead, 1 to 24 e.g. 12 |
| leveloptional | 80 | 95 query | Width of the range returned with each value e.g. 80 |
Request
# Up to 24 months ahead, with ranges
curl "https://api.tourismapi.com/v1/stats/forecast?country=JP" \
-H "X-API-Key: $TOURISM_API_KEY"const res = await fetch("https://api.tourismapi.com/v1/stats/forecast?country=JP", {
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/stats/forecast?country=JP",
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/stats/forecast?country=JP");
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_cc634468fe",
"data_as_of": "2026-10-20T04:48:18Z",
"count": 24,
"country": "JP",
"method": {
"series": "Visitor arrivals to Japan from Total",
"unit": "visitors",
"first": "2003-01",
"last": "2026-08",
"made": "2026-10-20",
"fitted_from": "2022-12",
"horizon_months": 24,
"backtest_mape_pct": 7.6,
"method": "Holt-Winters on logs, damped slope 0.9, season started from 2017 to 2019"
}
},
"data": [
{
"period": "2026-09",
"value": 2799576,
"low": 2581010,
"high": 3036651
},
{
"period": "2026-10",
"value": 3194684,
"low": 2847754,
"high": 3583880
},
{
"period": "2026-11",
"value": 2975169,
"low": 2584435,
"high": 3424976
}
]
}Response fields
| Field | Type | Example |
|---|---|---|
| period | string | 2026-09 |
| value | number | 2799576 |
| low | number | 2581010 |
| high | number | 3036651 |