Cities Data Reference
Cities GEO Data API — IATA and ICAO codes of 9,855 cities. City data fields returned as nested objects in every airport response.
On this page
API Reference
Authentication
All API requests require a valid API key. Pass it as a Bearer token in the Authorization header, or via the X-API-Key header. Keys are delivered immediately after subscribing.
Don't have an API key yet? Get started — you'll have a key in minutes.
# Bearer token (recommended)
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.airhex.com/v1/airports?iata=JFK"
# Alternative: X-API-Key header
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.airhex.com/v1/airports?iata=JFK"
https://api.airhex.com/v1
Each airport object returned by
GET /airports includes a nested city object with the fields listed below.
Nested city object
Every airport response includes a nested city object. These are the available fields, filtered by your plan tier.
| Field | Type | Plan | Description |
|---|---|---|---|
code |
string | All | IATA city code (e.g. "LON") |
name |
string | All | City name (e.g. "London") |
country_code |
string | All | ISO 3166-1 alpha-2 country code |
state_short |
string | All | State or province abbreviation (e.g. "ENG") |
state_full |
string | All | State or province full name (e.g. "England") |
latitude |
string | Growth Enterprise | City center decimal latitude |
longitude |
string | Growth Enterprise | City center decimal longitude |
timezone |
string | Growth Enterprise | IANA timezone identifier |
gmt |
string | Growth Enterprise | GMT offset (e.g. "0", "5.5") |
population |
string | Growth Enterprise | City population |
popularity |
string | Growth Enterprise | Traffic-based popularity score |
city_photo |
string | Growth Enterprise | City photo URL |
Response Example
{
"code": "NYC",
"name": "New York City",
"country_code": "US",
"state_short": "NY",
"state_full": "New York",
"latitude": "40.7143528",
"longitude": "-74.0059731",
"timezone": "America/New_York",
"gmt": "-4",
"population": "8992908",
"popularity": "39128143",
"city_photo": "https://content.airhex.com/content/city_photos/5333.jpg"
}
Error Codes
| Code | Description |
|---|---|
400 | Bad request — invalid query parameters (e.g. name or city search under 2 characters) |
401 | Unauthorized — missing or invalid API key. Check your Authorization header. |
403 | Forbidden — your plan does not permit this operation (e.g. bulk listing on Starter, inactive API key) |
429 | Too many requests — per-second rate limit exceeded. Back off and retry. |
503 | Service temporarily unavailable. Retry after a few seconds. |
Rate Limits
All plans include unlimited monthly requests with fair-use rate limiting enforced per second. Standard rate headers (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset) are included in every response. Responses also include Cache-Control headers — caching responses locally is recommended to stay well within limits.
https://content.airhex.com/api/v3.7.3/cities
Retrieve geographic and demographic details for specific cities or export the complete cities database in JSON, XML, or CSV formats.
Example Request:
https://content.airhex.com/api/v3.7.3/cities?apikey=YOUR_API_KEY&code=NYC
Request Parameters
| Name | Required | Range | Type | Default | Description |
|---|---|---|---|---|---|
apikey |
Yes | Any | String | none | Your assigned API key |
code |
No | AAA-ZZZ | String | none | Three-letter IATA city code |
country_code |
No | AA-ZZ | String | none | Two-letter ISO 3166-1 Alpha-2 country code |
name |
No | Any | String | none | City name or partial substring for search matching |
dump |
No | 0 or 1 | Integer | 0 | Set to 1 to export the complete database (ignores other parameters) |
response_type |
No | JSON, XML, CSV | String | JSON | Response format: JSON, XML, or CSV (CSV initiates file download) |
Response Fields
| Field | Example | Description |
|---|---|---|
code |
NYC | City's three-letter IATA code |
country_code |
US | ISO 3166-1 Alpha-2 country code |
name |
New York City | City's name |
state_short |
NY | State/province abbreviation (US, CA, AU cities only) |
state_full |
New York | Full state/province name (US, CA, AU cities only) |
latitude |
40.7143528 | Geographic latitude of the city center |
longitude |
-74.0059731 | Geographic longitude of the city center |
city_photo |
https://content.airhex.com/content/city_photos/5333.jpg | Licensed, commercially usable city image URL |
timezone |
America/New_York | City's timezone identifier |
gmt |
-4 | City's time offset from GMT |
population |
8992908 | Population count |
popularity |
39128143 | Relative popularity index (higher = more popular destination) |
Response Example (JSON)
[
{
"code": "NYC",
"country_code": "US",
"name": "New York City",
"state_short": "NY",
"state_full": "New York",
"latitude": "40.7143528",
"longitude": "-74.0059731",
"city_photo": "https://content.airhex.com/content/city_photos/5333.jpg",
"timezone": "America/New_York",
"gmt": "-4",
"population": "8992908",
"popularity": "39128143"
}
]
Ready to integrate airport & city data?
Get your API key and start querying airport & city data in minutes.
Get Started
Trusted by leading aviation & travel companies









