Fare Range

The Fare Range API returns the median, highest, and lowest published fares that were ticketed via the Sabre® GDS during the previous 4 weeks for each of the future departure dates in a range, using the specific origin, destination, and length of stay in the request.

API Information

Target Audience
Sabre Travel Network
Current Version
v1
Authentication
Sessionless Token
Method/Endpoint
GET /v1/historical/flights/fares

In detail: in the request, future departure dates can range from 0–90 days, from the day of the API request. Length of stay is any single value from 0–16 days. The API also returns a rating of high, medium, or low, which represents the quantity of tickets that the API referenced to obtain the published fare values.

The Fare Range API provides information about prices for ticketed published fares within a specific time frame and is not a shopping or booking solution. You can use the response with other tools of your choice to create your own solutions. For example:

  • Online travel agencies can promote a special price for a fare by comparing what others paid, or by stating that their fares are a specific percentage less than fares that others paid.
  • Online travel agencies can encourage consumers to purchase a fare now, with a note that some consumers paid more for the same fare.

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

Published fares and count in the response

The median, highest, and lowest published fares represent ticketed fares from points of sale in every country in which they were ticketed via the Sabre GDS during the previous 4 weeks.

  • MaximumFare–the highest published ticketed fare
  • MinimumFare–the lowest published ticketed fare
  • MedianFare–the median published ticketed fare
  • Count–the rating for the count of ticketed fares that the API used to compute the median, highest, and lowest published fares (based on the range of ticketed fare counts)

If the available data for ticketed published fares is sparse, it is possible for the API to return fares that are all the same.

Ratings for the ticket counts

The ratings for the quantity of tickets that the Fare Range API referenced to obtain the fares are based on the following:

  • low–less than 1000 ticketed fares
  • medium–1000–10,000 ticketed fares
  • high–more than 10,000 ticketed fares

Buckets used to calculate ticketed fares

The calculations for the ticketed fares are based on buckets of advance purchase days and lengths of stay instead of an individual advance purchase window and length of stay. Each calculation uses the buckets that match the data in the request.

Advance purchase bucket in days

  • 0-6
  • 7-13
  • 14-20
  • 21 or more

Length of stay bucket in days

  • 0-3
  • 4-7
  • More than 7

Data used for the Fare Range API

  • Published fares for roundtrip travel in the economy class of service for a single adult. All departure and arrival times of day. All flight types: direct, non-stop, connecting, and flights with stops. Fare must have been ticketed via the Sabre GDS within the 4 weeks before the date of the API request, and must have been ticketed in the country where the origin airport is located. (E.g., if origin airport is located in Germany, fare must have been ticketed in Germany to be included in the data.)
  • All departure and arrival times of day
  • All flight types: direct, nonstop, connecting, and flights with stops
  • Origin: major airports throughout the world that we support.
  • Destination: major airports throughout the world that we support.
  • The ticketed fares are total fares. Total fares include all taxes and fees, however, ancillary fees charged by airlines, such as baggage and preferred seating, are not included.
  • Point of sale: No limitations on locations from which fares are ticketed.

Request

origin

string, required

3-letter IATA code of the origin airport or multi-airport city (MAC) code

Sample value: origin=ATL

See usage notes: for more information on retrieving a list of our supported city pairs of origin and destination airports using the City Pairs Lookup API, multi-airport city (MAC) codes using the Multi-Airport City Lookup API, or to identify the airports associated with a MAC using the Airports at Cities Lookup API.

destination

string, required

3-letter IATA code of the origin airport or multi-airport city (MAC) code

Sample value: destination=LAS

See usage notes: for more information on retrieving a list of our supported city pairs of origin and destination airports using the City Pairs Lookup API, multi-airport city (MAC) codes using the Multi-Airport City Lookup API, or to identify the airports associated with a MAC using the Airports at Cities Lookup API.

earliestdeparturedate

string, required

The earliest date in the departure date range

Only one value is accepted

Maximum value: current date + 90 (days)

Sample value: earliestdeparturedate=2015-10-31

latestdeparturedate

string, required

The latest date in the departure date range

Only one value is accepted

Maximum value: current date + 90 (days)

Sample value: latestdeparturedate=2015-10-31

lengthofstay

number, required

Duration of the stay or trip, in days

Valid values: 0–16

A value of 0 returns a DepartureDateTime and ReturnDateTime on the same day for each day in the date range.

excludelcc

string, optional

Excludes low cost carriers (LCC) from fare data set

Default value: n (includes low cost carriers)

Valid values: y or n

Sample values: excludelcc=y

Note: The carriers that have been designated as low cost carriers are EasyJet (U2) and Spirit Airlines (NK).

Response

OriginLocation

string

Returns the specified 3-letter IATA origin airport or multi-airport city (MAC) code

DestinationLocation

string

Returns the specified 3-letter IATA destination airport or multi-airport city (MAC) code

FareData

array

Repeats MaximumFare, MinimumFare, MedianFare, DepartureDateTime, ReturnDatetime, Count, and CurrencyCode, OriginLocation, DestinationLocation for each departure date in the range

FareData.MaximumFare

number

The highest published fare ticketed via the Sabre GDS during the 4 weeks before the API request date

FareData.MinimumFare

number

The lowest published fare ticketed via the Sabre GDS, during the 4 weeks before the API request date

FareData.MedianFare

number

The median published fare ticketed via the Sabre GDS, during the 4 weeks before the API request date

FareData.DepartureDateTime

string

The date of departure

Data format: YYYY-MM-DDTHH:MM:SS

Time zones are specific to departure and arrival airports.

FareData.ReturnDateTime

string

The date of return

Calculates ReturnDateTime by adding the value in lengthofstay to DepartureDateTime

Data format: YYYY-MM-DDTHH:MM:SS

Time zones are specific to departure and arrival airports.

FareData.CurrencyCode

string

3-letter currency code

Sample value:  USD

FareData.Count

string

Return values:

  • low
  • medium
  • high

See API description: for information on published fares and count in the response.

FareData.OriginLocation

3-letter IATA origin airport code associated with the fare range in FareData

If a multi-airport city (MAC) code was used as origin in the request, then the airport code associated with the MAC is returned.

FareData.DestinationLocation

3-letter IATA destination airport code associated with the fare range in FareData

If a multi-airport city (MAC) code was used as destination in the request, then the airport code associated with the MAC is returned.

Links

array

Includes shop and forecast links for each departure date

shop

object

Invokes the InstaFlights Search API with the origin, destination, and departure and return dates in the Fare Range API request

Adds the value in lengthofstay to DepartureDateTime to calculate ReturnDateTime

forecast

object

Invokes the Low Fare Forecast API with the origin, destination, and departure and return dates in the Fare Range API request

Overall response links array
self

object

Returns the URL of the request that generated the response

linkTemplate

object

Formats a Fare Range request with placeholders for every parameter in a request

Sample code

Request

This example demonstrates a request with required parameters for published fares from "SFO" (San Francisco International) to "DFW" (Dallas/Fort Worth International).

GET https://api.havail.sabre.com/v1/historical/flights/fares?origin=SFO&destination=DFW&earliestdeparturedate=2015-04-20&latestdeparturedate=2015-04-22&lengthofstay=3 HTTP/1.1

Response

{
    OriginLocation: "SFO",
    DestinationLocation: "DFW",
    FareData: [{
        MaximumFare: 487.2,
        MinimumFare: 118.1,
        MedianFare: 310.2,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-20T00:00:00",
        ReturnDateTime: "2015-04-23T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=SFO&destination=DFW&departuredate=2015-04-20&returndate=2015-04-23&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=SFO&destination=DFW&departuredate=2015-04-20&returndate=2015-04-23"
        }],
        OriginLocation: "SFO",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 487.2,
        MinimumFare: 118.1,
        MedianFare: 310.2,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-21T00:00:00",
        ReturnDateTime: "2015-04-24T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=SFO&destination=DFW&departuredate=2015-04-21&returndate=2015-04-24&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=SFO&destination=DFW&departuredate=2015-04-21&returndate=2015-04-24"
        }],
        OriginLocation: "SFO",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 487.2,
        MinimumFare: 118.1,
        MedianFare: 310.2,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-22T00:00:00",
        ReturnDateTime: "2015-04-25T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=SFO&destination=DFW&departuredate=2015-04-22&returndate=2015-04-25&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=SFO&destination=DFW&departuredate=2015-04-22&returndate=2015-04-25"
        }],
        OriginLocation: "SFO",
        DestinationLocation: "DFW"
    }],
    Links: [{
        rel: "self",
        href: "https://api.havail.sabre.com/v1/historical/flights/fares?origin=SFO&destination=DFW&earliestdeparturedate=2015-04-20&latestdeparturedate=2015-04-22&lengthofstay=3"
    }, {
        rel: "linkTemplate",
        href: "https://api.havail.sabre.com/v1/historical/flights/fares?origin=<origin>&destination=<destination>&earliestdeparturedate=<earliestdeparturedate>&latestdeparturedate=<latestdeparturedate>&lengthofstay=<lengthofstay>&excludelcc=<excludelcc>"
    }]
}

Request

This example demonstrates a request for published fares from multi-airport city (MAC) code "NYC" (New York City) to multi-airport city "QDF" (Dallas-Fort Worth).

GET https://api.havail.sabre.com/v1/historical/flights/fares?origin=NYC&destination=QDF&earliestdeparturedate=2015-04-20&latestdeparturedate=2015-04-22&lengthofstay=3 HTTP/1.1

Response

{
    OriginLocation: "NYC",
    DestinationLocation: "QDF",
    FareData: [{
        MaximumFare: 479.2,
        MinimumFare: 92.07,
        MedianFare: 305.68,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-20T00:00:00",
        ReturnDateTime: "2015-04-23T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=EWR&destination=DFW&departuredate=2015-04-20&returndate=2015-04-23&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=EWR&destination=DFW&departuredate=2015-04-20&returndate=2015-04-23"
        }],
        OriginLocation: "EWR",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 372.6,
        MinimumFare: 70.73,
        MedianFare: 250.2,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-20T00:00:00",
        ReturnDateTime: "2015-04-23T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=JFK&destination=DFW&departuredate=2015-04-20&returndate=2015-04-23&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=JFK&destination=DFW&departuredate=2015-04-20&returndate=2015-04-23"
        }],
        OriginLocation: "JFK",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 640.2,
        MinimumFare: 107.1,
        MedianFare: 270.2,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-20T00:00:00",
        ReturnDateTime: "2015-04-23T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=LGA&destination=DFW&departuredate=2015-04-20&returndate=2015-04-23&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=LGA&destination=DFW&departuredate=2015-04-20&returndate=2015-04-23"
        }],
        OriginLocation: "LGA",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 479.2,
        MinimumFare: 92.07,
        MedianFare: 305.68,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-21T00:00:00",
        ReturnDateTime: "2015-04-24T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=EWR&destination=DFW&departuredate=2015-04-21&returndate=2015-04-24&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=EWR&destination=DFW&departuredate=2015-04-21&returndate=2015-04-24"
        }],
        OriginLocation: "EWR",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 372.6,
        MinimumFare: 70.73,
        MedianFare: 250.2,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-21T00:00:00",
        ReturnDateTime: "2015-04-24T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=JFK&destination=DFW&departuredate=2015-04-21&returndate=2015-04-24&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=JFK&destination=DFW&departuredate=2015-04-21&returndate=2015-04-24"
        }],
        OriginLocation: "JFK",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 640.2,
        MinimumFare: 107.1,
        MedianFare: 270.2,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-21T00:00:00",
        ReturnDateTime: "2015-04-24T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=LGA&destination=DFW&departuredate=2015-04-21&returndate=2015-04-24&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=LGA&destination=DFW&departuredate=2015-04-21&returndate=2015-04-24"
        }],
        OriginLocation: "LGA",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 479.2,
        MinimumFare: 92.07,
        MedianFare: 305.68,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-22T00:00:00",
        ReturnDateTime: "2015-04-25T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=EWR&destination=DFW&departuredate=2015-04-22&returndate=2015-04-25&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=EWR&destination=DFW&departuredate=2015-04-22&returndate=2015-04-25"
        }],
        OriginLocation: "EWR",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 372.6,
        MinimumFare: 70.73,
        MedianFare: 250.2,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-22T00:00:00",
        ReturnDateTime: "2015-04-25T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=JFK&destination=DFW&departuredate=2015-04-22&returndate=2015-04-25&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=JFK&destination=DFW&departuredate=2015-04-22&returndate=2015-04-25"
        }],
        OriginLocation: "JFK",
        DestinationLocation: "DFW"
    }, {
        MaximumFare: 640.2,
        MinimumFare: 107.1,
        MedianFare: 270.2,
        CurrencyCode: "USD",
        Count: "High",
        DepartureDateTime: "2015-04-22T00:00:00",
        ReturnDateTime: "2015-04-25T00:00:00",
        Links: [{
            rel: "shop",
            href: "https://api.havail.sabre.com/v1/shop/flights?origin=LGA&destination=DFW&departuredate=2015-04-22&returndate=2015-04-25&pointofsalecountry=US"
        }, {
            rel: "forecast",
            href: "https://api.havail.sabre.com/v1/forecast/flights/fares?origin=LGA&destination=DFW&departuredate=2015-04-22&returndate=2015-04-25"
        }],
        OriginLocation: "LGA",
        DestinationLocation: "DFW"
    }],
    Links: [{
        rel: "self",
        href: "https://api.havail.sabre.com/v1/historical/flights/fares?origin=NYC&destination=QDF&earliestdeparturedate=2015-04-20&latestdeparturedate=2015-04-22&lengthofstay=3"
    }, {
        rel: "linkTemplate",
        href: "https://api.havail.sabre.com/v1/historical/flights/fares?origin=<origin>&destination=<destination>&earliestdeparturedate=<earliestdeparturedate>&latestdeparturedate=<latestdeparturedate>&lengthofstay=<lengthofstay>&excludelcc=<excludelcc>"
    }]
}

Usage notes

Country and airport codes

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 a Fare Range API request.

There are multiple endpoints for the City Pairs Lookup API. One endpoint is for city pairs that apply to the Fare Range API. See the City Pairs Lookup API page for the specific HTTP method and endpoint.

InstaFlights Search API

The InstaFlights Search API retrieves roundtrip flight itineraries with published fares and fare breakdowns available from the Sabre® cache for a certain origin, destination, and roundtrip travel dates. The origins and destinations are airport codes.

Low Fare Forecast API

The Low Fare Forecast API forecasts the price range into which the lowest published fare that is available via the Sabre® GDS is predicted to fall within the next 7 days, from a specific origin and destination on specific roundtrip travel dates.

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.

Not every airport code that is associated with a multi-airport city (MAC) is supported by the Fare Range API. Use the City Pairs Lookup API and the endpoint that applies exclusively to the Fare Range API to get a list of supported city pairs.

Example: Within the Fare Range 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.

Errors

An HTTP status code is always returned. For information about the error response format, see the: Sabre APIs: errors page.

404 NOT_FOUND

No results were found

The service cannot find data to fulfill the parameters in the request. For example, data is not available for the origin or dates.

An origin or destination in the request is not a valid IATA airport code.

The origin or destination are not supported.

400 BAD REQUEST

Parameter 'origin' must be specified

origin is missing.

origin is missing a value.

A request is missing multiple required parameters. The service inserts the first missing parameter that it encounters within ' '.

Parameter 'destination' must be specified

destination is missing.

destination is missing a value.

A request is missing multiple required parameters. The service inserts the first missing parameter that it encounters within ' '.

Parameter 'earliestdeparturedate' must have a format of 'yyyy-MM-dd' and be a valid date"

The date is not valid, for example, departuredate is yyyy-02-29 when the year is not leap year.

The month is not valid, for example, 13.

The day is not valid for the month, for example 2015-04-31.

The date has an incorrect format, for example, a hyphen character is omitted.

Although the data type is string, the service detected non-numeric characters for yyyy, mm, or dd.

A date is formatted as yyyy-dd-mm instead of yyyy-mm-dd.

The value in dd is a single digit.

The value in mm is a single digit.

Parameter 'latestdeparturedate' must have a format of 'yyyy-MM-dd' and be a valid date

The date is not valid, for example, the departuredate is yyyy-02-29 when the year is not leap year.

The month is not valid, for example, 13.

The day is not valid for the month, for example 2015-04-31.

The date has an incorrect format, for example, a hyphen character is omitted.

A date is formatted as yyyy-dd-mm instead of yyyy-mm-dd.

The value in dd is a single digit.

The value in mm is a single digit.

Parameter 'earliestdeparturedate' must be specified

earliestdeparturedate is missing.

earliestdeparturedate is missing a value.

latestdeparturedate and lengthofstay are missing in the request.

earliestdeparturedate, latestdeparturedate, and lengthofstay are missing in the request.

Parameter 'latestdeparturedate' must be specified

latestdeparturedate is missing.

latestdeparturedate is missing a value.

Parameter 'earliestdeparturedate' must be before 'latestdeparturedate'

A date range is not valid, for example, earliestdeparturedate is later than latestdeparturedate.

Parameter '{parameter name}' exceeds the maximum days allowed

{parameter name} applies to earliestdeparturedate and latestdeparturedate.

For the maximum parameter values, see Request.

Parameter 'lengthofstay' must be specified

lengthofstay is missing.

lengthofstay is missing a value.

Parameter 'lengthofstay' must be between 0 and 16

A value is outside the range of valid values, for example, the value is a negative number or greater than 16.

Parameter 'lengthofstay' must be of type 'number'

A string or type other than number is passed as 15.0 instead of 15.

Parameter 'excludelcc' must contain either a 'y' or 'n' value

Value is not a valid excludelcc value.

Docs Navigation