Sign Up

Log In

Flight Data

FREE
By Travelpayouts
Updated 19 hours ago
Travel
7.7/10
Popularity Score
464ms
Latency
41%
Success Rate

Flight Data API Documentation

To access the API you must pass your token in the X-Access-Token header or in the token parameter. To obtain a token for the Data Access API, go to http://www.travelpayouts.com/developers/api.

Dates are accepted in the formats YYYY-MM and YYYY-MM-DD.

Dates and times are given in UTC, formatted according to ISO 8601. Prices are given in rubles as of when the ticket is put in the search results. It is not recommended to use expired prices (the approximate expiration date is given in the value of the expires_at parameter).

Important. We strongly urge receiving data in compressed GZIP format, which saves a significant amount of time in receiving the response. To get data in compressed form, send the header Accept-Encoding: gzip, deflate.

View API Details

Supercharge your App

Discover and connect to thousands of APIs in the world's largest API Hub
GETGet_The prices for the alternative directions_
GETGet_Airline data in json format_
GETGet_Non-stop tickets_
GETGet_The popular directions from a city_
GETGet_The calendar of prices for a month_
GETGet_City data in json format_
GETGet_Tickets for each day of month_
GETGet_Airplane data in json format_
GETGet_Popular airline routes_
GETGet_Alliance data in json format_
GETGet_Special offers_
GETGet_The prices for the airline tickets_
GETGet_Airport data in json format_
GETGet_The calendar of prices for a week_
GETGet_Data of countries in json format_
GETGet_Cheapest tickets_
GETGet_The prices for the alternative directions_

Brings the prices for the directions between the nearest to the target cities back.

Authorization:

To use this API you need a token, which you can find on the Developers page. Every request requires authentication. To confirm your identity please pass this token using the X-Access-Token HTTP header.

Sign up to test this endpoint
Log in
Header Parameters
X-RapidAPI-KeySTRING
REQUIRED
X-Access-TokenHEADER
REQUIREDYOUR_API_TOKEN_HERE
Required Parameters
destinationNUMBER
REQUIREDthe point of destination. The IATA city code or the country code. The length - from 2 to 3 symbols
currencyNUMBER
REQUIREDthe airline tickets currency
depart_dateNUMBER
REQUIREDday or month of departure
return_dateNUMBER
REQUIREDday or month of return
originNUMBER
REQUIREDthe point of departure. The IATA city code or the country code. The length - from 2 to 3 symbols
Optional Parameters
flexibilityNUMBER
OPTIONALexpansion of the range of dates upward or downward. The value may vary from 0 to 7, where 0 shall show the variants for the dates specified, 7 – all the variants found for a week prior to the specified dates and a week after
show_to_affiliatesNUMBER
OPTIONALfalse - all the prices, true - just the prices, found using the partner marker (recommended)
limitNUMBER
OPTIONALthe number of variants entered, from 1 to 20. Where 1 – is just the variant with the specified points of departure and the points of destination
distanceNUMBER
OPTIONALthe number of variants entered, from 1 to 20. Where 1 – is just the variant with the specified points of departure and the points of destination
Request Snippet
unirest.get("https://travelpayouts-travelpayouts-flight-data-v1.p.rapidapi.com/v2/prices/nearest-places-matrix?flexibility=undefined&show_to_affiliates=undefined&limit=undefined&distance=undefined&destination=<required>&currency=<required>&depart_date=<required>&return_date=<required>&origin=<required>")
.header("X-RapidAPI-Key", "undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response

loading...

Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://travelpayouts-travelpayouts-flight-data-v1.p.rapidapi.com/v2/prices/nearest-places-matrix?flexibility=undefined&show_to_affiliates=undefined&limit=undefined&distance=undefined&destination=<required>&currency=<required>&depart_date=<required>&return_date=<required>&origin=<required>")
.header("X-RapidAPI-Key", "undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication

Sign up for free

to test this endpoint

Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
DiscoverAPIs
Testfrom the browser
Connectusing code snippets
Managefrom one dashboard