Geo Code

The Geo Code API returns the geographic information of a given location.

API Information

Target Audience
Sabre Travel Network
Current Version
v1
Authentication
Sessionless Token
Method/Endpoint
POST /v1/lists/utilities/geocode/locations/

In detail: the API uses the description of a location to retrieve geographic details (like geographical coordinates). The location description can be a postal address, point of interest landmark (like Disneyland) or a place ID (such as an airport, multi-airport city (MAC) code or Sabre ID). These geographic details could then be used to plot locations on a graphical map.

Optional search preferences are available to sort and filter results, including the ability to specify a category (such as "AIR" for airports) and a limit on the number of search results to return per category.

See usage notes: for more information on the Destination Finder API.

Ready to try the APIs?

Ready to get your hands dirty?

 Register Try the APIs

Ready to launch?

Ready to step up to the production level service? We're standing by to fit you for your spacesuit.

Request Production Key

Sample use case

You could use this API with the Destination Finder API to display destinations on a graphical map. For example, the application could use the Destination Finder API to get a list of destinations. Then the application could make a call to the Geo Code API to get the geographic information for each of the destinations and use the response to display destinations on a graphical map.

Geocode data response

The response contains details about each place, including: a name, category, location information (such as a postal address, geographical coordinates), an ID (such as an airport, multi-airport city (MAC) code or Sabre ID) and a confidence factor. There are 10 possible values for confidence factor, ranging from a specific location with a high degree of accuracy (e.g. a street address indicated by confidence factor "ADDRESS_QUALITY"), to a nonspecific location (e.g. a country like Brazil indicated by confidence factor "COUNTRY_QUALITY").

Note: Geographic information, including latitude and longitude, is provided by a third party geocoding entity. Sabre makes no representation or warranty regarding the accuracy of the geographic information provided by the geocoding entity.

Resources

Request

Request headers

Content-Type
required, must be 'application/json'
Accept-Encoding
optional, highly recommended to use 'gzip'
To reduce network latency for large responses, request a compressed response. Include the "Accept-Encoding" HTTP header field in the request as follows: Accept-Encoding: gzip.

Sample code

Request

This example demonstrates a request for the geographical coordinates (latitude/longitude) of airports "DFW" (Dallas/Fort Worth International) and "ATL" (Hartsfield Jackson Atlanta International). The following optional parameters are also specified: a category of AIR (for airports).

[{
  "GeoCodeRQ":{
    "PlaceById":{
      "Id":"DFW",
      "BrowseCategory": {
        "name": "AIR"
      }
    }
  }
},
{
  "GeoCodeRQ":{
    "PlaceById":{
      "Id":"ATL",
      "BrowseCategory": {
        "name": "AIR"
      }
    }
  }
}]

Response

{
  "Results":[
    {
      "GeoCodeRS":{
        "status":"ONE_PLACE_FOUND",
        "Place":[
          {
            "confidenceFactor":"ADDRESS_QUALITY",
            "latitude":32.896111,
            "longitude":-97.041111,
            "Name":"Dallas/Fort Worth Intl.",
            "Category":"AIR",
            "Id":"DFW",
            "City":"Dallas",
            "State":"TX",
            "Country":"US"
          }
        ]
      }
    },
    {
      "GeoCodeRS":{
        "status":"ONE_PLACE_FOUND",
        "Place":[
          {
            "confidenceFactor":"ADDRESS_QUALITY",
            "latitude":33.640278,
            "longitude":-84.426944,
            "Name":"Atlanta",
            "Category":"AIR",
            "Id":"ATL",
            "City":"Atlanta",
            "State":"GA",
            "Country":"US"
          }
        ]
      }
    }
  ],
  "Links":[
    {
      "rel":"self",
      "href":"https://api.havail.sabre.com/v1/lists/utilities/geocode/locations"
    },
    {
      "rel":"linkTemplate",
      "href":"https://api.havail.sabre.com/v1/lists/utilities/geocode/locations"
    }
  ]
}

Request

This example demonstrates a request to get the geographical coordinates (latitude/longitude) of a specified address.

[{
    "GeoCodeRQ": {
        "PlaceByAddress": {
            "Street": "24 Madison St",
            "Zip": "10038",
            "City": "New York",
            "Region": "New York County",
            "State": "NY",
            "Country": "US"
        }
    }
}]

Response

{
    "GeoCodeRS": {
        "status": "ONE_PLACE_FOUND",
        "Place": [{
            "confidenceFactor": "ADDRESS_QUALITY",
            "latitude": 40.711616,
            "longitude": -74.002121,
            "Name": "New York",
            "Category": "ADDRESS",
            "Street": "24 Madison St",
            "Zip": "10038",
            "City": "New York",
            "Region": "New York County",
            "State": "NY",
            "Country": "US"
        }]
    },
    "Links": [{
        "rel": "self",
        "href": "https://api.havail.sabre.com/v1/lists/utilities/geocode/locations"
    }, {
        "rel": "linkTemplate",
        "href": "https://api.havail.sabre.com/v1/lists/utilities/geocode/locations"
    }]
}

Request

This example demonstrates a request for the geographical coordinates (latitude/longitude) of a rental car location. The following optional parameters are also specified: a BrowseCategory of Sabre:CRL (for Sabre rental car locations).

[{
    "GeoCodeRQ": {
        "PlaceById": {
            "Id": "ZIHHHHHH",
            "BrowseCategory": {
                "name": "Sabre:CRL"
            }
        }
    }
}]

Response

{
    "GeoCodeRS": {
        "status": "ONE_PLACE_FOUND",
        "Place": [{
            "confidenceFactor": "ADDRESS_QUALITY",
            "latitude": 32.2284,
            "longitude": -80.7002,
            "Name": "HILTON HEAD AIRPORT",
            "Category": "Sabre:CRL",
            "Id": "ZIHHHHHH",
            "Street": "120 BEACH CITY ROAD",
            "Zip": "29925-0000",
            "City": "HILTON HEAD",
            "Region": "",
            "State": "SC",
            "Country": "US",
            "Attribute": [{
                "name": "AIRPORT CODE",
                "value": "HHH"
            }, {
                "name": "VENDOR CODE",
                "value": "ZI"
            }]
        }]
    },
    "Links": [{
        "rel": "self",
        "href": "https://api.havail.sabre.com/v1/lists/utilities/geocode/locations"
    }, {
        "rel": "linkTemplate",
        "href": "https://api.havail.sabre.com/v1/lists/utilities/geocode/locations"
    }]
}

Usage notes

Destination Finder API

To get the lowest published fares available to destinations from a given origin, use the Destination Finder API. The Destination Finder API retrieves a then current nonstop lead fare and an overall lead fare available to destinations from a specific origin on roundtrip travel dates from the Sabre cache. Numerous optional search preferences are available to sort and filter results, including the ability to specify a region, theme or multiple lengths of stay. The Geo Code API could be then be used to get the geographic information for each of the destinations and use the response to display destinations on a graphical map.

Errors

A general HTTP status code is always returned.

404 NOT_FOUND

No results were found
The service cannot find data to fulfill the parameters in the request. For example, there is no data available for the dates specified.

400 BAD REQUEST

The size of the request payload array must be less than or equal to 10
This API permits a maximum of 10 GeoCodeRQ objects.

Docs Navigation