← Back to docs
endpoints
GET locci/geo/city/

All cities. Filter by region using the region_slug query parameter.

Locci Geography

Overview

Returns a paginated list of all cities in the database. Each city record includes its name, slug, coordinates (latitude and longitude), population, country, region (state or province), timezone, and continent. The database covers cities worldwide sourced from GeoNames. Use the search, nearest, or autocomplete endpoints for lookup by name or coordinates rather than paginating the full list.


Request parameters

Name Type In Required Description Example
region_slug String Query Optional Slug of a region record. When supplied, the city list is filtered to return only cities within that region. Obtain valid region slugs from the region list endpoint. 75

Response fields

Name Type Nullable Description Example
continent_id String Primary key of the parent continent. 5
continent_name String Name of the parent continent. North America
continent_slug String URL-friendly continent name. north-america
country String Yes Hyperlinked URL to the parent country record. /locci/geo/country/38/
country_flag String Emoji flag for the parent country. 🇨🇦
country_id String Primary key of the parent country. 38
country_name String Name of the parent country. Canada
country_slug String URL-friendly country name. canada
formatted_latitude String Latitude in degrees-minutes-seconds with hemisphere indicator. 48° 25' 42.0" N
formatted_longitude String Longitude in degrees-minutes-seconds with hemisphere indicator. 123° 21' 56.0" W
lat String Yes City latitude in decimal degrees. 48.4284
lon String Yes City longitude in decimal degrees. -123.3656
name String Official city name. Victoria
pk Integer Database primary key of the city record. 42
point String Yes GeoJSON point representation of the city coordinates (internal spatial field). POINT (-123.3656 48.4284)
population Integer City population as recorded in GeoNames. 92141
population_formatted String Population formatted with comma separators for display. 92,141
region String Yes Hyperlinked URL to the parent region record. /locci/geo/region/492/
region_code String GeoNames admin1 code for the region (e.g. CA.BC). CA.BC
region_id String Primary key of the parent administrative region (state or province). 492
region_name String Name of the parent administrative region. British Columbia
slug String Yes URL-friendly version of the city name. victoria
timezone String Yes Hyperlinked URL to the associated timezone record. /locci/tz/timezone/77/
timezone_formatted String IANA timezone name with underscores replaced by spaces. America/Vancouver
timezone_id String Primary key of the associated timezone. 77
timezone_name String IANA timezone name for the city. America/Vancouver
timezone_slug String URL-friendly IANA timezone name. america-vancouver