Multi-Airport City Lookup

The Multi-Airport City Lookup API returns a list of multi-airport city (MAC) codes.

The response contains multi-airport cities located in the requested country(s), sorted by city name, in ascending rank order. If no country is specified, then all MAC codes and cities are returned. An example multi-airport city code is CHI, and the corresponding city name is Chicago. Note: Some city codes represent a metropolitan area that contains more than one major city. For example, the MAC code "QDF" represents Dallas and Ft. Worth, Texas. In this case, the city name is "Dallas / Ft. Worth".

Example

You could use this API in an Airports at Cities Lookup API request to retrieve airport codes associated with the MAC code. Some of our REST APIs also accept MAC codes, in addition to airport codes, as an origin and/or destination parameter. See usage notes: for more information on how to retrieve the airport codes and names that are associated with a MAC code using the Airports at Cities 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. More airports may exist in a metropolitan city than are mapped to that city’s MAC code, since we only mapped airports supported by our REST APIs.

API suitability

  • To retrieve a list of our MAC codes.
  • To get a reference list of our MAC codes by country.
  • To retrieve major airports that we associate with a MAC code by calling the Airports at Cities Lookup API.
  • To obtain airport codes that can be used in an InstaFlights search API request.

HTTP method and endpoint

GET /v1/lists/supported/cities

Request

country

string, optional

2-letter ISO 3166 country code(s)

Returns MACs for specified countries. If none are specified, all MACs will be returned.

Sample value: country=US,MX

See usage notes: for links to country code sources.

Response

The multi-airport cities listed in the response are sorted by city name, in ascending order.

Cities

array

Returns all multi-airport city information:

  • code, string
  • name, string
  • countryCode, string
  • countryName, string
  • regionName, string
code

string

Multi-airport city (MAC) code

name

string

City name that is associated with the city code in the code object

countryCode

string

Country code that is associated with the city code in the code object

countryName

string

The name of the country that corresponds to countryCode

regionName

string

The name of the region that is assigned to the country

Corresponds to countryCode

Links

array

Contains an airportsInCity link for every code object

airportsInCity

object

Invokes an Airports at Cities API request to retrieve all airports that are associated with the MAC code in the code object

See usage notes: for more information on how to retrieve the airport codes and names that are associated with a MAC code using the Airports at Cities Lookup API.

Overall response links

array

See usage notes: for more information on links nodes.

Links

array

Consists of self and linkTemplate links

self

object

Returns the URL of the request that generated the response

linkTemplate

object

A link that formats a Multi-Airport City Lookup API request

Example: request and response

This example demonstrates a request for all multi-airport city (MAC) codes in Germany ("DE").

https://api.sabre.com/v1/lists/supported/cities?country=DE HTTP/1.1

The response lists the multi-airport city (MAC) codes and corresponding city names.

{
       "Cities":
       [
           {
               "code": "BER",
               "name": "Berlin",
               "countryCode": "DE",
               "countryName": "Germany",
               "regionName": "Europe",
               "Links":
               [
                   {
                       "rel": "airportsInCity",
                       "href": "https://api.sabre.com/v1/lists/supported/cities/BER/airports"
                   }
               ]
           },
           {
               "code": "CGN",
               "name": "Cologne",
               "countryCode": "DE",
               "countryName": "Germany",
               "regionName": "Europe",
               "Links":
               [
                   {
                       "rel": "airportsInCity",
                       "href": "https://api.sabre.com/v1/lists/supported/cities/CGN/airports"
                   }
               ]
           },
           {
               "code": "DUS",
               "name": "Dusseldorf",
               "countryCode": "DE",
               "countryName": "Germany",
               "regionName": "Europe",
               "Links":
               [
                   {
                       "rel": "airportsInCity",
                       "href": "https://api.sabre.com/v1/lists/supported/cities/DUS/airports"
                   }
               ]
           },
           {
               "code": "STR",
               "name": "Stuttgart",
               "countryCode": "DE",
               "countryName": "Germany",
               "regionName": "Europe",
               "Links":
               [
                   {
                       "rel": "airportsInCity",
                       "href": "https://api.sabre.com/v1/lists/supported/cities/STR/airports"
                   }
               ]
           }
       ],
       "Links":
       [
           {
               "rel": "self",
               "href": "https://api.sabre.com/v1/lists/supported/cities?country=DE"
           },
           {
               "rel": "linkTemplate",
               "href": "https://api.sabre.com/v1/lists/supported/cities?country=<country>"
           }
       ]
    }       

Usage notes

Country and airport codes

Links nodes

  • Sabre© REST APIs have one or more Links nodes that combine related URI resources in a response. For more information, see the links nodes page.

Airports at Cities Lookup API

To identify the airports associated with a multi-airport city (MAC) code, use the Airports at Cities Lookup API and pass one of the MACs in the request. The Airports at Cities Lookup API retrieves our list of major airport, rail station and other codes that are associated with a single multi-airport city (MAC) code in the request.

For example, when you specify country=US, the Multi-Airport City Lookup API returns NYC (New York City). Call the Airports at Cities Lookup API to get the associated airport codes, i.e., JFK, LGA, and EWR.

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 service cannot find data to fulfill the request using the filters that you applied.

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

One of the 'country' has an unsupported value '{value}'

The country code is not valid.

The country code is not supported.

Country codes are not supported by ','

Docs Navigation