Airports at Cities Lookup

The Airports at Cities Lookup API returns the major airport, rail station and other codes that are associated with a single a multi-airport city (MAC) code. An example multi-airport city code is CHI, and the corresponding city name is Chicago.

Example

You could use this API to retrieve data for multiple major airports, as opposed to data for a single airport code. Simply call an air shopping or intelligence API of interest multiple times for each MAC airport code. See usage notes: for more information on retrieving multi-airport city (MAC) codes using the Multi-Airport City Lookup API.

Data used for multi-airport cities supplemental APIs

  • Sabre® defines the data returned by the Multi-Airport City Lookup and Airports at Cities Lookup (or MAC) supplemental APIs, including the unique MAC codes, the corresponding city names, and the mapping of the major airports to each city. A metropolitan city may have more airports than we mapped to a city's MAC code because our APIs retrieve the airports that we support.

API suitability

  • To get a reference list of airport, rail station and all other codes that are associated with a MAC code in the request. The MAC code is retrieved from a Multi-Airport City Lookup API response.
  • To provide the MAC airport codes in our other REST API requests, to request data for multiple airports that serve a MAC city instead of data for a single airport.
  • See usage notes: for more information on retrieving multi-airport city (MAC) codes using the Multi-Airport City Lookup API.

HTTP method and endpoint

GET /v1/lists/supported/cities/{city}/airports/

Request

city

string, required

The MAC code

Retrieves the airport, rail station and other codes associated with the MAC code

See usage notes: for more information on retrieving multi-airport city (MAC) codes using the Multi-Airport City Lookup API.

Response

The response is grouped by: Airports, Rail Stations, and Others.

Airports

Airports

array

Returns all airport information:

  • code, string
  • name, string
code

string

Returns the 3-letter IATA airport code

Repeats for every airport code that is associated with the MAC code in the request

name

string

Name of the airport that corresponds to the airport code

Rail Stations

Rail Stations

array

Returns all rail station information:

  • code, string
  • name, string
code

string

Returns the 3-letter rail station code

Repeats for every rail station code that is associated with the MAC code in the request

name

string

Name of the rail station that corresponds to the rail station code

Others

Others

array

Returns all other information:

  • code, string
  • name, string

Example: limo, heliport, sea port, bus station

code

string

Returns the 3-letter other code

Repeats for every other code that is associated with the MAC code in the request

name

string

Name that corresponds to the other code

Overall response Links array

For more information, see Links nodes in response payloads.

Links

array

Includes self and linkTemplate links

self

object

Returns the URL of the request that generated the response

linkTemplate

object

A link that formats a Airports at Cities Lookup API request

Example: request and response

This example requests all airport, rail station and other codes for LON (London).

GET https://api.sabre.com/v1/lists/supported/cities/LON/airports HTTP/1.1

The API returns the Airports, Rail Stations  and all Other  codes with their respective names.

{
    "Airports": [{
        "code": "BQH",
        "name": "Biggin Hill"
    }, {
        "code": "LGW",
        "name": "Gatwick"
    }, {
        "code": "LHR",
        "name": "Heathrow"
    }, {
        "code": "LCY",
        "name": "London City Airport"
    }, {
        "code": "LTN",
        "name": "Luton Airport"
    }, {
        "code": "SEN",
        "name": "Municipal"
    }, {
        "code": "STN",
        "name": "Stansted"
    }],
    "Rail stations": [{
        "code": "XQE",
        "name": "Ebbsfleet International Railway Station"
    }, {
        "code": "QQS",
        "name": "London St. Pancras"
    }, {
        "code": "QQK",
        "name": "Rail Service"
    }, {
        "code": "ZEP",
        "name": "Victoria Railway Stn."
    }],
    "Others": [],
    "Links": [{
        "rel": "self",
        "href": "https://api.sabre.com/v1/lists/supported/cities/LON/airports"
    }, {
        "rel": "linkTemplate",
        "href": "https://api.sabre.com/v1/lists/supported/cities/<city>/airports"
    }]
}  

Usage notes

Multi-Airport City Lookup API

To get a list of city codes that are served by more than one airport, use the Multi-Airport City Lookup API. These multi-airport city (MAC) codes can be used with applicable REST APIs.

Example: Within the Destination Finder API, to search for the lead fares from DFW to any airport associated with New York City, use "DFW" for origin and "NYC" for destination. The response will include the lowest fare and lowest nonstop fare. The lowest fare will be from DFW to any one of the airports that belong to NYC, e.g., DFW to LGA. The lowest nonstop fare will be from DFW to any one of the airports that belong to NYC, but may not be the same airport associated with the lowest fare, e.g., DFW to JFK.

Sample scenarios

Earlier request format with country code

If your application includes an earlier request format with a country code, the API ignores the country code. Therefore, you do not need to modify your code. The API evaluates the city only and ignores the country parameter, as shown in the following examples.

/v1/lists/airports?city=NYC - Evaluated
  
/v1/lists/airports?city=NYC&country=US - Ignored
  
/v1/lists/airports?city=NYC&country=PL - Ignored
  

Errors

An HTTP status code is always returned. For more information about HTTP status codes and error response formats, see Status codes and errors.

Status 404 NOT FOUND

No results were found 

The city code is not valid.

The city code is not supported.

city is missing a value.

Status 413 FULL head

The API returns this error when a request URI is too long. For example, the HTTP request’s query string exceeds the server limit.

The response will be empty as a result.

Please consider reducing the number of request parameters in the URI or separating parameters into multiple HTTP requests.

Status 400 BAD REQUEST

Required String parameter 'city' is not present

city is missing in from request.

Examples: /list/airports? or /list/airports

Docs Navigation