> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flystack.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Cities Dataset

> Retrieve cities worldwide using IATA city codes and location metadata.

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](https://docs.flystack.dev/authentication.md)).

### 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`).

> [!NOTE]
>
> The response can be shortened for readability when using `_fields`. Data coverage may vary by city.

#### Pagination

**limit** `number`

Max number of rows per response: 1,000 by default, up to 10,000 (limits may depend on your plan).

**offset** `number`

Pagination offset (0+). When more rows match, the response has the headers `X-Has-More: true` and `X-Next-Offset`: pass its value as `offset` to get the next page.

### 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.

**Enrichment**

**population** `number`

City population (when available).

**names** `object`

Alternative names in different languages (when available).

**wikipedia** `string`

Link to the city page on Wikipedia (when available).

**slug** `string`

Unique city identifier.

```json ?city_code=PAR theme={null}
[
  {
    "name": "Paris",
    "city_code": "PAR",
    "un_locode": "FRPAR",
    "lat": 48.85341,
    "lng": 2.3488,
    "alt": 42,
    "timezone": "Europe/Paris",
    "country_code": "FR",
    "population": 2138551,
    "names": {
      "de": "Paris",
      "en": "Paris",
      "es": "París",
      "fr": "Paris",
      "ja": "パリ"
    },
    "wikipedia": null,
    "slug": "paris-par-fr"
  }
]
```

### See also

* [Airports Dataset API](https://docs.flystack.dev/api-reference/endpoints/airports.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.