Censuses
GET
/v1/censusThe year of each country's latest population census, its latest household survey and whether births and deaths are fully registered.
On every plan, Free includedKey requiredJSON or CSVCached until the next release
Parameters
| Name | Type | Description |
|---|---|---|
| limitoptional | integer query | Rows per page, 1 to 1000 e.g. 100 |
| cursoroptional | string query | The next value from the previous page |
Request
# Every country's latest census
curl "https://api.tourismapi.com/v1/census" \
-H "X-API-Key: $TOURISM_API_KEY"const res = await fetch("https://api.tourismapi.com/v1/census", {
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/census",
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/census");
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_d7d9b7cd31",
"data_as_of": "2026-10-21T17:42:33Z",
"count": 237,
"census_older_than_10_years": 67,
"census_note": "set when the census line says more than a year (a register-based count, say)"
},
"data": [
{
"iso": "AF",
"name": "Afghanistan",
"latest_census": 1979,
"census_note": null,
"latest_household_survey": "Multiple Indicator Cluster Survey 2022-2023",
"births_and_deaths_fully_registered": null
},
{
"iso": "AL",
"name": "Albania",
"latest_census": 2023,
"census_note": null,
"latest_household_survey": "Demographic and Health Survey 2017 - 2018",
"births_and_deaths_fully_registered": true
},
{
"iso": "DZ",
"name": "Algeria",
"latest_census": 2022,
"census_note": null,
"latest_household_survey": "Multiple Indicator Cluster Survey 2018-2019",
"births_and_deaths_fully_registered": null
}
]
}Response fields
| Field | Type | Example |
|---|---|---|
| iso | string | AF |
| name | string | Afghanistan |
| latest_census | number | 1979 |
| census_note | null | null |
| latest_household_survey | string | Multiple Indicator Cluster Survey 2022-2023 |
| births_and_deaths_fully_registered | null | null |