Cities

Look up metadata for cities worldwide including population, IANA timezone, and geographic coordinates. Covers ~22,000 cities with a population above 15,000 from the GeoNames dataset.

Get API Key

Overview

Use Cases

  • Display city info in a travel or relocation app
  • Resolve a city name to coordinates for further lookups
  • Determine the timezone of a user-selected city
  • Power city-autocomplete search with population context

Features

~22,000 cities worldwide (population > 15,000)
Population, timezone, country, and coordinates in one response
Case-insensitive city name lookup
When multiple cities share a name, the most populous one is returned

API Endpoints

Get City Info

Returns metadata for a city by name. Lookup is case-insensitive.

GET
https://api.requiems.xyz/v1/places/cities/{city}

Parameters

Name Type Required Description
city string Required City name to look up (e.g. london, tokyo, new york city)

Try it out

Live Demo
Request

City name to look up (e.g. london, tokyo, new york city)

Response Fields

Field Type Description
name string Official city name as listed in the GeoNames dataset
country string ISO 3166-1 alpha-2 country code (uppercase)
population integer City population from the GeoNames dataset
timezone string IANA timezone identifier for the city (e.g. "America/New_York")
lat number Latitude of the city centre
lon number Longitude of the city centre

Code Examples

curl "https://api.requiems.xyz/v1/places/cities/london" \
  -H "requiems-api-key: YOUR_API_KEY"

Error Responses

not_found

No city with that name was found in the dataset.

internal_error

Unexpected server error.

Frequently Asked Questions