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.
The server response is always sent in json format with the following structure:
- success – true for successful queries, false in case of errors
- data – result of the query; in case of an error is equal to null
- error – short description of the error that prevented query completion; for successful queries is equal to null
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.
To obtain access to the API for searching for plane tickets and hotels, send a request.