Population history
GET
/v1/population/{iso}/historyOne population field for a country, year by year from 1960: the total when no field is named.
On every plan, Free includedKey requiredJSON or CSVCached until the next release
Parameters
| Name | Type | Description |
|---|---|---|
| isorequired | string path | ISO 3166 two-letter country code e.g. CL |
| fieldoptional | string query | One population field, such as total, female, older_pct or life_expectancy (total when left out) e.g. total |
| fromoptional | integer query | First year e.g. 2000 |
| tooptional | integer query | Last year e.g. 2024 |
Request
# One population figure, year by year
curl "https://api.tourismapi.com/v1/population/CL/history" \
-H "X-API-Key: $TOURISM_API_KEY"const res = await fetch("https://api.tourismapi.com/v1/population/CL/history", {
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/population/CL/history",
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/population/CL/history");
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_25c337fd4d",
"data_as_of": "2026-10-21T17:42:33Z",
"count": 66,
"iso": "CL",
"field": "total",
"label": "Population",
"unit": "people"
},
"data": [
{
"year": 1960,
"value": 8153350
},
{
"year": 1961,
"value": 8324802
},
{
"year": 1962,
"value": 8497059
}
]
}Response fields
| Field | Type | Example |
|---|---|---|
| year | number | 1960 |
| value | number | 8153350 |