Base URL https://api.tourismapi.com/v1, your key in the X-API-Key header, JSON in a meta and data envelope. First call:
curl "https://api.tourismapi.com/v1/arrivals?country=CL,BA&from=2026-01" \ -H "X-API-Key: $TOURISM_API_KEY"
$ch = curl_init("https://api.tourismapi.com/v1/arrivals?country=CL,BA&from=2026-01");
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"]);const res = await fetch("https://api.tourismapi.com/v1/arrivals?country=CL,BA&from=2026-01", {
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 { useEffect, useState } from "react";
export default function Arrivals() {
const [data, setData] = useState(null);
useEffect(() => {
fetch("/api/tourism?path=/v1/arrivals?country=CL,BA&from=2026-01") // your own server adds the key
.then(r => r.json())
.then(body => setData(body.data));
}, []);
if (!data) return <p>Loading</p>;
return <pre>{JSON.stringify(data, null, 2)}</pre>;
}import os, requests
r = requests.get(
"https://api.tourismapi.com/v1/arrivals?country=CL,BA&from=2026-01",
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"])