Documentation / API reference
Find the right endpoint.
A guide to the files available in API v1, from country lists to city search shards.
https://cdn.jsdelivr.net/npm/geo-data-api@latest/dist/api/v1/Paths below are relative to this URL. Use lowercase codes in
filenames.
Endpoint reference
Countries
Start with the list, then request a country or browse by region.
countries.json
All countries with essential fields. Open example ↗
countries/{iso2}.json
Full details for a country. Open example ↗
countries/regions.json
Index of regions and their endpoints. Open example ↗
countries/region/{region}.json
Countries in a region, such as asia. Open example ↗
countries/subregion/{subregion}.json
Countries in a subregion.
Endpoint reference
States & provinces
Use country ISO2 codes and ISO 3166-2 state codes in lowercase.
states/all.json
Complete list of states. Open example ↗
states/country/{iso2}.json
States in one country. Open example ↗
states/{iso3166_2}.json
Full details for one state. Open example ↗
states/types.json
Index of available administrative types. Open example ↗
states/type/{type}.json
States for an administrative type. Open example ↗
states/timezones.json
Index of state timezone endpoints. Open example ↗
states/timezone/{timezone}.json
States in a timezone. Use the index to discover filenames.
Endpoint reference
Cities
Use a state list for a picker, or the batch index to look up an individual city.
cities/country/{iso2}.json
Complete city list for a country. Open example ↗
cities/country/{iso2}/index.json
Chunk index for large countries; omitted for smaller countries.
cities/country/{iso2}/{chunk}.json
A chunk listed by the country index.
cities/state/{iso3166_2}.json
Cities for one state. Open example ↗
cities/batches.json
City ID ranges and API-relative batch filenames. Open example ↗
cities/batch/{batch-filename}
Detailed city records keyed by ID. The batch index provides the full path relative to the API base.
cities/timezones.json
City timezone index, present only when the dataset supplies city timezones.
cities/timezone/{timezone}.json
City timezone files, when available. Use the index to discover filenames.
Endpoint reference
Search indexes
These are static files: fetch an index and filter its records in your application.
search/countries.json
Searchable country records. Open example ↗
search/states.json
Searchable state records. Open example ↗
search/cities/index.json
Available country city-search shards. The index metadata reports whether the global file is available. Open example ↗
search/cities/country/{iso2}.json
City search records for one country. Open example ↗
search/cities.json
Complete global city index for ordinary builds. Cloudflare Pages omits this large file; use all country shards for complete global search.
search/combined-sample.json
A sample, limited to 1,000 states and 5,000 cities. Open example ↗
search/combined.json
Compatibility alias for the combined sample.
name_normalized for
case-insensitive, diacritic-folded matching.
Endpoint reference
Dataset & discovery
Inspect the generated dataset and learn more about the available files.
api-info.json
Dataset statistics and endpoint index. Open example ↗
documentation.json
Machine-readable endpoint descriptions. Open example ↗
manifest.json
Dataset version, file inventory, and checksums. Open example ↗
build-report.json
Source validation and build report. Open example ↗