Skip to main content

InstaFlights Search

1.0
Air
Search
REST API
Try now

What is it?

In detail: the API uses the Travel Insight engine to retrieve shopped fare data for a given origin available in the Sabre® cache. In total, the API returns 300 of the lowest-priced itineraries, with 50 itineraries per request, then sorts the itineraries by fare in ascending rank order (from low to high).

Multiple search preferences are available to sort and filter results, including the ability to: filter itineraries to exclude particular airlines (excludedcarriers); retrieve online itineraries only (onlineitinerariesonly); limit the response to only those options with enough seats available to support the passenger count (passengercount); or to retrieve itineraries with a total fare that is less than or equal to a given price (maxfare).

How it works?

Data used by the InstaFlights Search API

  • Shopping response data from the Sabre® GDS, which includes published fares and itineraries, that is refreshed on a regular basis using pre-configured points of sale for pre-configured sets of city pairs, pre-configured advance purchase windows, and pre-configured lengths of stay, all as determined by Sabrein its discretion.
  • Flight types: nonstop, connecting, and flights with stops
  • Origin: major airports throughout the world that we support
  • Destination: major airports throughout the world that we support
  • Advance fares: A maximum of 192 days
  • Total fares: All taxes and fees are included, however, ancillary fees charged by airlines, such as baggage and preferred seating, are not included.
  • All fares are for single adult, roundtrip or one-way travel in the economy class of service. The combined total for all passengers (all fares plus tax) is returned in ItinTotalFare.TotalFare.Amount.

How to use?

Country and airport codes

Point of sale

The point of sale is the geographic location in which the fare itinerary is eligible to be ticketed. The default point of sale (US) can be overridden with any supported point of sale country specified in the pointofsalecountry parameter. For example, the following will retrieve fare data specific to the Germany (DE) point of sale: pointofsalecountry=DE. The response will be fares eligible for sale in Germany.

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.

City Pairs Lookup API

To get a list of our supported city pairs of origin and destination airports, use the City Pairs Lookup API. You can pass any of these origin and destination airport codes in an InstaFlights Search API request.

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 codes can be used with applicable REST APIs.

Example: Within the InstaFlights Search 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

Compress response

To reduce network latency, whenever an InstaFlights Search request specifies a limit that exceeds 50, request a compressed response. Format the HTTP header field as follows:

Accept-Encoding: gzip

Paginate itineraries with "limit" and "offset"

Paginate search results by specifying how many itineraries to return per request in limit and specifying the starting position to begin retrieving itineraries in offset. This allows you to more quickly retrieve and return search queries for mobile application requests. Rather than returning all itineraries, you could return 10 itineraries per request in limit (limit=10) and specify a starting position of 1 in offset (offset=1). Then you can select a starting position of 11 (offset=11) to retrieve the next 10 results (limit=10).

  1. The first request retrieves itineraries from 1 to 10.

GET https://api.havail.sabre.com/v1/shop/flights?enabletagging=true&limit=10&offset=1 HTTP/1.1

  1. The next request retrieves itineraries from 11 to 20.

GET https://api.havail.sabre.com/v1/shop/flights?limit=10&offset=11 HTTP/1.1

  1. The last request retrieves itineraries from 21 to 30.

GET https://api.havail.sabre.com/v1/shop/flights?limit=10&offset=21 HTTP/1.1

Retrieve a specific itinerary for a given tag ID from the Tag ID Lookup URL

  1. The first request returns a Tag ID with each itinerary (enabletagging=true).

GET https://api.havail.sabre.com/v1/shop/flights?enabletagging=true HTTP/1.1

  1. The next request retrieves an itinerary from the Tag ID Lookup URL.

GET https://api.havail.sabre.com/v1/shop/flights/tags/[TAGID] HTTP/1.1

Limit the response to seats remaining

To limit the response to a minimum quantity of seats required, pass the minimum quantity in the passengercount parameter. This option limits the response to include only itineraries that support the required passengers.

This parameter corresponds to SeatsRemaining in the response, which includes only itineraries where this number is equal to or greater than the passengercount value passed in the request. If no passengercount is passed, all flight itinerary options will be returned.

The following URI illustrates a request for itineraries with 3 seats (required) on a flight from DFW (Dallas - Fort Worth) to LAS (Las Vegas).

GET https://api.havail.sabre.com/v1/shop/flights?origin=DFW&destination=LAS&departuredate=2014-11-20&returndate=2014-11-29&passengercount=3 HTTP/1.1