Locapi
APIs
-
GET /country/{iso2}/cities
Retrieves a list of cities for a specific country using its ISO2 code.
{ countryIso2: string; cityName: string; latitude: string; longitude: string; timezone: string; timezoneOffset: string; admin1Code?: string; admin2Code?: string; admin3Code?: string; admin4Code?: string; elevation?: string; population?: number; } -
GET /country/{iso2}/all
Retrieves all available data for a specific country using its ISO2 code.
{ countryIso2: string; countryName: string; countryIso3: string; currencyName: string; currencyCode: string; voltage: string; electricalFrequency: string[]; plug: string[]; drinkableTapWater: boolean; emergencyGeneral?: string; emergencyPolice?: string; emergencyAmbulance?: string; emergencyFire?: string; facts: string[]; risks: string[]; vaccinations: string[]; languages: string[]; greetings: { countryIso2: string; hello: string[]; goodMorning: string[]; thankYou: string[]; goodbye: string[]; }; } -
GET /country/{iso2}/facts
Retrieves fun facts about a specific country using its ISO2 code.
{ countryIso2: string; countryName: string; facts: string[]; } -
GET /country/{iso2}/greetings
Retrieves common greetings for a specific country using its ISO2 code.
{ countryIso2: string; hello: string[]; goodMorning: string[]; thankYou: string[]; goodbye: string[]; } -
GET /city/{name}
Retrieves data for a specific city using its name.
{ countryIso2: string; cityName: string; latitude: string; longitude: string; timezone: string; timezoneOffset: string; admin1Code?: string; admin2Code?: string; admin3Code?: string; admin4Code?: string; elevation?: string; population?: number; }
Credits
-
Countries
- By Simple Maps
- Dataset: World Cities Database
- caa 11 May 2025
- https://data.opendatasoft.com/explore/dataset/geonames-all-cities-with-a-population-1000%40public/information/
-
Cities
- By Geonames (with contributions from Opendatasoft)
- Dataset: geonames-all-cities-with-a-population-1000@public
- caa 10 Mar 2024
- https://simplemaps.com/data/world-cities