Skip to main content
GET
https://api.flystack.dev
/
v1
/
cities
Cities Dataset
curl --request GET \
  --url https://api.flystack.dev/v1/cities \
  --header 'x-api-key: <x-api-key>'
[
  {
    "name": "Singapore",
    "city_code": "SIN",
    "un_locode": "SGSIN",
    "lat": 1.28967,
    "lng": 103.85007,
    "alt": 22,
    "timezone": "Asia/Singapore",
    "country_code": "SG",
    "population": 3547809,
    "names": {
      "en": "Singapore",
      "fr": "Singapour",
      "de": "Singapur",
      "es": "Singapur"
    },
    "wikipedia": "https://en.wikipedia.org/wiki/Singapore",
    "slug": "singapore-sin-sg"
  }
]
City data complements airport data. If you need destination functionality that does not depend on a specific airport, you can use cities—or combine both to build richer travel experiences. Cities are especially useful for maps and clustering (grouping multiple airports under a metro area), and for search in booking, hotel, and GDS-like workflows where an IATA city code represents “all airports in a city”.

Authentication

x-api-key
string
required
Your FlyStack API token. You can create one from the dashboard (see Authentication).

Query parameters

city_code
string
Filter by IATA city code (e.g., SIN).
country_code
string
Filter by country ISO-2 code (e.g., SG).
_fields
string
Comma-separated list of fields to return (e.g., name,city_code,lat,lng,country_code).
The response can be shortened for readability when using _fields. Data coverage may vary by city.

Response

The endpoint returns a list of cities.

Cities dataset response fields

name
string
City name.
city_code
string
Metropolitan area IATA code.
un_locode
string
United Nations location code (when available).
lat
number
Latitude.
lng
number
Longitude.
alt
number
City elevation (meters, when available).
timezone
string
IANA timezone (when available).
country_code
string
ISO-2 country code.
slug
string
Unique city identifier.
[
  {
    "name": "Singapore",
    "city_code": "SIN",
    "un_locode": "SGSIN",
    "lat": 1.28967,
    "lng": 103.85007,
    "alt": 22,
    "timezone": "Asia/Singapore",
    "country_code": "SG",
    "population": 3547809,
    "names": {
      "en": "Singapore",
      "fr": "Singapour",
      "de": "Singapur",
      "es": "Singapur"
    },
    "wikipedia": "https://en.wikipedia.org/wiki/Singapore",
    "slug": "singapore-sin-sg"
  }
]

See also