Geo Autocomplete
The Geo Autocomplete API returns a list of location predictions for text-based geographic search queries.
API Information
- Target Audience
- Sabre Travel Network
- Current Version
- v1
- Authentication
- Sessionless Token
- Method/Endpoint
- GET /v1/lists/utilities/geoservices/autocomplete/ HTTP/1.1
In detail: the API uses the full word or substring to search across all locations to match against a geographic search query. By default, it returns an on-the-fly list of up to five of the most relevant location predictions to aid the traveler in selecting a desired place. A location can be an airport, city, or rail station.
Optional search preferences are available to sort and filter results, including the ability to specify a category (such as "AIR" for airports, "CITY" for city name and "RAIL" for rail stations) and a limit on the number of search results to return per category.
Ready to 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 KeySample use case
You could use this API to provide autocomplete functionality for text-based airport name searches. From this data, travelers can select from a list of places that most closely match their search query. For example, if "Dall" is typed, then "Dallas/Fort Worth International" and "Dallas Love Field" airport information will be returned.
Geographic data response
The response is sorted by relevance and contains geographic details about each search result (place), including: a name, category, location information (such as geographical coordinates, a postal address, city, state and country), an ID (such as an airport, multi-airport city (MAC) code or Sabre ID), a rank and a confidence factor. A confidence factor indicates the degree of accuracy in the latitude and longitude (as provided by the geocoding entity). A rank (from 1-900) indicates the population density or traffic volume of the place. A city is ranked by population (900 indicates a large population). An airport is ranked by the number of nonstop flights served from the airport (900 indicates high traffic).
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.
Request
Query parameters
- query
-
string, required
The full word or substring to be autocompleted
A minimum of three characters is required
- category
-
optional, string
Retrieves places that are associated with this specified category
Valid values:
AIR
- AirportsCITY
- CitiesRAIL
- Rail stations
- limit
-
optional, number
The number of search results to return per category
Default value:
5
(places)Valid values: 1 to 30
Sample code
Request
The following example demonstrates a text-based airport name search for locations that begin with "Dall." The following optional parameters are also specified: a category of AIR (for airports).
https://api.havail.sabre.com/v1/lists/utilities/geoservices/autocomplete?query=Dall&category=AIR
Response
{ Response: { responseHeader: { status: 0, QTime: 4 }, grouped: { category: AIR: { matches: 181, doclist: { numFound: 10, start: 0, docs: [{ name: "Dallas/Fort Worth Intl.", city: "Dallas", country: "US", countryName: "United States Of America", stateName: "Texas", state: "TX", category: "AIR", id: "DFW", dataset: "AIR", datasource: "INNOVATA", confidenceFactor: "1", latitude: "32.896111", longitude: "-97.041111", iataCityCode: "QDF", ranking: 884 }, { name: "Love Field, Dallas", city: "Dallas", country: "US", countryName: "United States Of America", stateName: "Texas", state: "TX", category: "AIR", id: "DAL", dataset: "AIR", datasource: "INNOVATA", confidenceFactor: "1", latitude: "32.846944", longitude: "-96.851389", iataCityCode: "QDF", ranking: 826 }, { name: "Dallas NAS Hensley Field", city: "Enfidha", country: "US", countryName: "United States Of America", stateName: "Texas", state: "TX", category: "AIR", id: "NBE", dataset: "AIR", datasource: "INNOVATA", confidenceFactor: "1", latitude: "32.733333", longitude: "-96.966667", iataCityCode: "NBE", ranking: 413 }, { name: "Dallas North", city: "Dallas", country: "US", countryName: "United States Of America", stateName: "Texas", state: "TX", category: "AIR", id: "DNE", dataset: "AIR", datasource: "INNOVATA", confidenceFactor: "1", latitude: "33.078611", longitude: "-96.738056", iataCityCode: "DFW", ranking: 0 }, { name: "The Dalles", city: "The Dalles", country: "US", countryName: "United States Of America", stateName: "Oregon", state: "OR", category: "AIR", id: "DLS", dataset: "AIR", datasource: "INNOVATA", confidenceFactor: "1", latitude: "45.618611", longitude: "-121.166111", iataCityCode: "DLS", ranking: 0 }] } } } }, Links: [{ rel: "self", href: "https://api.havail.sabre.com/v1/lists/utilities/geoservices/autocomplete?query=Dall&category=AIR" }, { rel: "linkTemplate", href: " https://api.havail.sabre.com/v1/lists/utilities/geoservices/autocomplete?query=<query>&limit=<limit>&category=<category>" }] }
Request
The following example demonstrates a text-based airport name search for locations that begin with "Dallas." The following optional parameters are also specified: a limit of up to 3 (results per category).
https://api.havail.sabre.com/v1/lists/utilities/geoservices/autocomplete?query=Dallas&limit=3
Response
{ "Response": { "responseHeader": { "status": 0, "QTime": 4 }, "grouped": { "category:AIR": { "matches": 45, "doclist": { "numFound": 9, "start": 0, "docs": [{ "name": "Dallas/Fort Worth Intl.", "city": "Dallas", "country": "US", "countryName": "United States Of America", "stateName": "Texas", "state": "TX", "category": "AIR", "id": "DFW", "dataset": "AIR", "datasource": "INNOVATA", "confidenceFactor": "1", "latitude": "32.896111", "longitude": "-97.041111", "iataCityCode": "QDF", "ranking": 884 }, { "name": "Love Field, Dallas", "city": "Dallas", "country": "US", "countryName": "United States Of America", "stateName": "Texas", "state": "TX", "category": "AIR", "id": "DAL", "dataset": "AIR", "datasource": "INNOVATA", "confidenceFactor": "1", "latitude": "32.846944", "longitude": "-96.851389", "iataCityCode": "QDF", "ranking": 826 }, { "name": "Dallas NAS Hensley Field", "city": "Enfidha", "country": "US", "countryName": "United States Of America", "stateName": "Texas", "state": "TX", "category": "AIR", "id": "NBE", "dataset": "AIR", "datasource": "INNOVATA", "confidenceFactor": "1", "latitude": "32.733333", "longitude": "-96.966667", "iataCityCode": "NBE", "ranking": 413 }] } } } }, "Links": [{ "rel": "self", "href": "https://api.havail.sabre.com/v1/lists/utilities/geoservices/autocomplete?query=Dallas&limit=3&category=AIR" }, { "rel": "linkTemplate", "href": "https://api.havail.sabre.com/v1/lists/utilities/geoservices/autocomplete?query=<query>&limit=<limit>&category=<category>" }] }
Request
The following example demonstrates a text-based airport name search for locations that begin with "Dallas." The following optional parameters are also specified: a category of AIR (for airports), a limit of up to 3 (results per category).
https://api.havail.sabre.com/v1/lists/utilities/geoservices/autocomplete?query=Dallas&category=AIR&limit=3
Response
{ "Response": { "responseHeader": { "status": 0, "QTime": 15 }, "grouped": { "category:AIR": { "matches": 45, "doclist": { "numFound": 9, "start": 0, "docs": [{ "name": "Dallas/Fort Worth Intl.", "city": "Dallas", "country": "US", "countryName": "United States Of America", "stateName": "Texas", "state": "TX", "category": "AIR", "id": "DFW", "dataset": "AIR", "datasource": "INNOVATA", "confidenceFactor": "1", "latitude": "32.896111", "longitude": "-97.041111", "iataCityCode": "QDF", "ranking": 884 }, { "name": "Love Field, Dallas", "city": "Dallas", "country": "US", "countryName": "United States Of America", "stateName": "Texas", "state": "TX", "category": "AIR", "id": "DAL", "dataset": "AIR", "datasource": "INNOVATA", "confidenceFactor": "1", "latitude": "32.846944", "longitude": "-96.851389", "iataCityCode": "QDF", "ranking": 826 }, { "name": "Dallas NAS Hensley Field", "city": "Enfidha", "country": "US", "countryName": "United States Of America", "stateName": "Texas", "state": "TX", "category": "AIR", "id": "NBE", "dataset": "AIR", "datasource": "INNOVATA", "confidenceFactor": "1", "latitude": "32.733333", "longitude": "-96.966667", "iataCityCode": "NBE", "ranking": 413 }] } }, "category:CITY": { "matches": 45, "doclist": { "numFound": 34, "start": 0, "docs": [{ "name": "Dallas", "city": "Dallas", "country": "US", "countryName": "United States Of America", "stateName": "Texas", "state": "TX", "category": "CITY", "id": "26506087", "dataset": "CITY", "datasource": "OSM", "confidenceFactor": "1", "latitude": "32.780105", "longitude": "-96.800008", "ranking": 176 }, { "name": "Dallas", "city": "Dallas", "country": "US", "countryName": "United States Of America", "stateName": "Oregon", "state": "OR", "category": "CITY", "id": "150933242", "dataset": "CITY", "datasource": "OSM", "confidenceFactor": "1", "latitude": "44.918921", "longitude": "-123.31587", "ranking": 53 }, { "name": "Dallas", "city": "Dallas", "country": "CA", "countryName": "Canada", "stateName": "Manitoba", "state": "MB", "category": "CITY", "id": "52557302", "dataset": "CITY", "datasource": "OSM", "confidenceFactor": "1", "latitude": "51.383333", "longitude": "-97.483333", "ranking": 51 }] } }, "category:Rail": { "matches": 45, "doclist": { "numFound": 2, "start": 0, "docs": [{ "name": "Dallas", "stateName": "TX", "state": "TX", "category": "Rail:Amtrak", "id": "DAL", "dataset": "Rail", "datasource": "RAIL", "confidenceFactor": "1", "description": "Union Station", "latitude": "32.776094", "longitude": "-96.807235", "ranking": 1 }, { "name": "Dallas", "stateName": "TX", "state": "TX", "category": "Rail:Amtrak", "id": "DAG", "dataset": "Rail", "datasource": "RAIL", "confidenceFactor": "1", "description": "Greyhound Station", "latitude": "32.778637", "longitude": "-96.804121", "ranking": 1 }] } } } }, "Links": [{ "rel": "self", "href": "https://api.havail.sabre.com/v1/lists/utilities/geoservices/autocomplete?query=Dallas&limit=3" }, { "rel": "linkTemplate", "href": "https://api.havail.sabre.com/v1/lists/utilities/geoservices/autocomplete?query=<query>&limit=<limit>&category=<category>" }] }
Errors
An HTTP status code is always returned. For information about the error response format, see the: Sabre APIs: errors page.
400 BAD REQUEST
Required string parameter 'query' is not present
-
query
is missing.query
is missing a value. Unable to convert '{specified value}' to required type 'number'
-
The value provided in
limit
is not a valid data type.
Docs Navigation
- APIs
- Workflows
- Air Extras Search and Book
- Auto Price Air Exchange
- Book Air Segment
- Book Hotel Reservation
- Car Reservation
- End-to-End Exchanges Workflow (Shop, Book, Price, Ticket)
- Issue Air Ticket
- Issue Electronic Miscellaneous Documents for Air Extras and Paid Seats
- Low Fare Search and Book
- Modify Passenger Name Record
- Post Booking Transaction
- Reserve Air Seats (including Paid Seats)
- Sessionless and Session Tokens
- API Roadmap
- 2017 API Roadmap
- Security
- REST APIs
- SOAP APIs
- Air
- Search
- Air Availability
- Air Schedules And Availability
- Bargain Finder Max
- Basic Fare Shop
- Calculate Air Mileage
- Flight Schedules
- Get Air Connection Points
- Get Air Connection Times
- Get Ancillary Offers (Travel Agency)
- Get Brand Marketing Text
- Get Flight Details
- Get Seat Map Counts
- Revalidate Itinerary
- Shop by Specific Fare
- Shop Exchange Options
- Book
- Air Fare by City Pairs
- Air Fare Rules
- Air Fare Rules from Price
- Book Air Segment
- Book from Air Availability
- Calculate Air Tax for Itinerary
- Cancel Air Seat
- Cancel Itinerary Segments
- Create Passenger Name Record
- Delete Price Quote
- Display Price Quote
- Fare Rules from Air Price
- Flight Details
- Orchestrated Air Booking
- Price Air Itinerary
- Price with Itinerary
- Price With Multiple Brands
- Price Without Itinerary
- Reserve Air Seat
- Seat Map
- Sell Miscellaneous Segments
- Fulfill
- Auto Price Air Exchanges
- Create Manual Price Quote Ticket Record
- Create PhaseIV Ticket Record
- Display Audit Trail
- Enhanced Air Ticket
- Exchange Booking
- Get Credit Card Approval
- Get EMD Documents
- Get EMD Transactions
- Get eTicket Details
- Get Refund Report
- Get Unused eTickets
- Issue Air Ticket
- Revalidate eTicket
- Void Air Ticket
- Travel
- Utility
- Search
- Cruise
- Ground transportation
- Hotel
- Profiles
- Session Management
- Trip Management
- Itinerary
- Itinerary Common Resources
- Add Arrival Unknown Segment
- Add Accounting Line
- Add Itinerary Info
- Add Itinerary Remark
- Add Special Service
- Build Invoice and Itinerary
- Build Profile from Itinerary
- Create Itinerary
- Delete Special Service
- Divide Itinerary
- End Transaction
- Get ERP TripData
- Get ERP TripLocator Data
- Get Itinerary
- Get Itinerary History
- Get Itinerary Reports
- Ignore Transaction
- Modify Itinerary
- Modify Itinerary Remark
- Passenger Details
- Reconfirm Reservation
- Retrieve Itinerary
- Search for Itineraries
- Update Itinerary
- Verify Itinerary Address
- Queues
- Trip Proposal
- Utility
- Itinerary
- Air
- Digital Connect Service Engine
- SabreSonic APIs
- SOAP APIs
- Check-In
- Add Bag Tag Printer
- Add Boarding Pass Printer
- Add to Standby List
- Check-in Passenger
- Get Ancillary Offers
- Get Bag Messages
- Get Flight Information
- Get Passenger Data
- Get Passenger List
- Get Seat Map
- Issue Bag Tag
- Reprint Boarding Pass
- Request Seat Change
- Return Seat to Inventory
- Search by Specific Airport
- Select or Change Seat
- Update Passenger Details
- Update Passenger Security Information
- Customer Insight
- Exchanges
- Inventory
- Loyalty
- Payments
- Select Shop
- Ticketing
- Utility
- Check-In
- SOAP APIs
- Travel Insight APIs