NAV
shell ruby php python

Travelpayouts API

The way to get travel insights for your site or blog. You can get flight price trends and find popular destinations for your customers.

Data is transferred from the cache, which is formed on the basis of searches of users of sites Aviasales for the last 48 hours. So it is recommended that you use them to generate static pages.

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 your account.

Data by country (markets)

The API uses such a thing as a market. It depends on various factors, most often it is the language of the Aviasales website where users searched for tickets.

Each search is associated with a specific market. This means that if a user searched for something on the aviasales.ru site, then the data in the cache will be only for the ru market and there will be no data for the us market (which, for example, aviasales.com is associated with).

By default, the market is determined by the place of departure (the origin parameter in the API request). If it was not possible to determine the market, then the data for the ru-market will be returned.

In all requests, you can use the market parameter to specify the market you need (for different markets, different agencies can be connected, which means that it is better for partners in America to see the cache for the us market, and not for the ru market).

Grouped flights tickets V1 (deprecated)

The endpoints return groupted flights tickets by date and transfer number

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v1/airline-directions?airline_code=S7&limit=2'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v1/airline-directions?airline_code=S7&limit=2")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v1/airline-directions?airline_code=S7&limit=2",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v1/airline-directions?airline_code=S7&limit=2")
print(response.text)

Returns routes for which an airline operates flights, sorted by popularity.

HTTP Request

GET https://api.travelpayouts.com/v1/airline-directions?airline_code=S7&limit=2

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
airline_code string SU true A code of an airline
limit integer 100 true Limit of returned offers (Allowed value from 1 to 1000)
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": {
    "DME-LED": 8516012,
    "LED-DME": 6791746
  },
  "error": null,
  "success": true
}

200

Success response

Field Type Description
key string a direction: {origin}-{destination}
value integer a measure of popularity

Errors

Code Description
400 Incorrect request
500 A techinal trouble in our system

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v1/city-directions?origin=BKK&limit=2'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v1/city-directions?origin=BKK&limit=2")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v1/city-directions?origin=BKK&limit=2",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v1/city-directions?origin=BKK&limit=2")
print(response.text)

Brings the most popular directions from a specified city back.

HTTP Request

GET https://api.travelpayouts.com/v1/city-directions?origin=BKK&limit=2

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string MOW true An IATA code of a city or an airport of the origin
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
limit integer 500 true Limit of returned offers (Allowed value from 1 to 1000)
page integer 1 true A page of the result, it's used for chunked reading of a large result
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": {
    "CNX": {
      "airline": "WE",
      "departure_at": "2021-07-27T13:10:00+07:00",
      "destination": "CNX",
      "expires_at": "2021-07-21T09:00:20Z",
      "flight_number": 110,
      "origin": "BKK",
      "price": 6289,
      "return_at": "2021-07-30T13:15:00+07:00",
      "transfers": 0
    },
    "HKT": {
      "airline": "VZ",
      "departure_at": "2021-07-31T14:00:00+07:00",
      "destination": "HKT",
      "expires_at": "2021-07-21T09:00:20Z",
      "flight_number": 2300,
      "origin": "BKK",
      "price": 8941,
      "return_at": "2021-08-01T09:00:00+07:00",
      "transfers": 0
    }
  },
  "success": true
}

200

Success response

Field Type Description
return_at string A date of return departure (RFC3339 format)
transfers integer Number of transfers
airline string The code of an airline
departure_at string A date of departure (RFC3339 format)
destination string An IATA code of a city of the destination
flight_number integer The number of a flight
origin string An IATA code of a city of the origin
price number Ticket price

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Tickets for each day of a month (deprecated, see /aviasales/v3/grouped_prices)

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v1/prices/calendar?origin=LAS&destination=LON'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v1/prices/calendar?origin=LAS&destination=LON")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v1/prices/calendar?origin=LAS&destination=LON",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v1/prices/calendar?origin=LAS&destination=LON")
print(response.text)

Returns the cheapest non-stop, one-stop, and two-stop flights for the selected route for each day of the selected month.

HTTP Request

GET https://api.travelpayouts.com/v1/prices/calendar?origin=LAS&destination=LON

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 780000
1h 7200000

Query Parameters

Parameter Type Default Required Description
origin string MOW true An IATA code of a city or an airport of the origin
destination string false An IATA code of a city or an airport of the destination
calendar_type string departure_date true Type of grouping (allowed values: departure_date or return_date)
length integer false A length of stay in the destination place
departure_date string false A date of departure (2006-01 or 2006-01-02 format)
return_date string false A date of return departure (2006-01 or 2006-01-02 format)
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": {
    "2021-08-02": {
      "airline": "UA",
      "departure_at": "2021-08-02T13:15:00-07:00",
      "destination": "LON",
      "flight_number": 1961,
      "origin": "LAS",
      "price": 70162,
      "return_at": "2021-08-12T13:40:00+01:00",
      "transfers": 1
    },
    "2021-09-03": {
      "airline": "WS",
      "departure_at": "2021-09-03T12:45:00-07:00",
      "destination": "LON",
      "flight_number": 1401,
      "origin": "LAS",
      "price": 62636,
      "return_at": "2021-09-06T20:20:00+01:00",
      "transfers": 2
    },
    "2021-10-01": {
      "airline": "UA",
      "departure_at": "2021-10-01T13:55:00-07:00",
      "destination": "LON",
      "flight_number": 1497,
      "origin": "LAS",
      "price": 45263,
      "return_at": "2021-10-13T14:10:00+01:00",
      "transfers": 1
    }
  },
  "success": true
}

200

Success response

Field Type Description
airline string The code of an airline
departure_at string A date of departure (RFC3339 format)
destination string An IATA code of a city of the destination
flight_number integer The number of a flight
origin string An IATA code of a city of the origin
price number Ticket price
return_at string A date of return departure (RFC3339 format)
transfers integer Number of transfers

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

The cheapest tickets (deprecated, see /aviasales/v3//aviasales/v3/prices_for_dates)

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v1/prices/cheap?origin=LAS&destination=LON'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v1/prices/cheap?origin=LAS&destination=LON")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v1/prices/cheap?origin=LAS&destination=LON",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v1/prices/cheap?origin=LAS&destination=LON")
print(response.text)

Returns the cheapest non-stop tickets, as well as tickets with 1 or 2 stops, for the selected route with departure/return date filters.

HTTP Request

GET https://api.travelpayouts.com/v1/prices/cheap?origin=LAS&destination=LON

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string MOW true An IATA code of a city or an airport of the origin
destination string false An IATA code of a city or an airport of the destination
depart_date string false A date of departure (2006-01 or 2006-01-02 format)
return_date string false A date of return departure (2006-01 or 2006-01-02 format)
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": {
    "LON": {
      "1": {
        "airline": "UA",
        "departure_at": "2021-10-01T13:55:00-07:00",
        "flight_number": 1497,
        "price": 45263,
        "return_at": "2021-10-13T14:10:00+01:00"
      }
    }
  },
  "success": true
}

200

Success response

Field Type Description
airline string The code of an airline
departure_at string A date of departure (RFC3339 format)
first nested key string An IATA code of a city of the origin
flight_number integer The number of a flight
price number Ticket price
return_at string A date of return departure (RFC3339 format)
second nested key string Number of transfers

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Non-stop tickets

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v1/prices/direct?origin=LAS&destination=LON'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v1/prices/direct?origin=LAS&destination=LON")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v1/prices/direct?origin=LAS&destination=LON",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v1/prices/direct?origin=LAS&destination=LON")
print(response.text)

Returns the cheapest non-stop tickets for the selected route with departure/return date filters.

HTTP Request

GET https://api.travelpayouts.com/v1/prices/direct?origin=LAS&destination=LON

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 585000
1h 5400000

Query Parameters

Parameter Type Default Required Description
origin string MOW true An IATA code of a city or an airport of the origin
destination string false An IATA code of a city or an airport of the destination
depart_date string false A date of departure (2006-01 or 2006-01-02 format)
return_date string false A date of return departure (2006-01 or 2006-01-02 format)
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": {
    "LON": {
      "0": {
        "airline": "BA",
        "departure_at": "2021-10-01T21:30:00-07:00",
        "flight_number": 6987,
        "price": 72482,
        "return_at": "2021-10-13T16:40:00+01:00"
      }
    }
  },
  "success": true
}

200

Success response

Field Type Description
price number Ticket price
return_at string A date of return departure (RFC3339 format)
second nested key string Number of transfers
airline string The code of an airline
departure_at string A date of departure (RFC3339 format)
first nested key string An IATA code of a city of the origin
flight_number integer The number of a flight

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Cheapest tickets grouped by month (deprecated, see /aviasales/v3/grouped_prices)

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v1/prices/monthly?origin=LAS&destination=LON'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v1/prices/monthly?origin=LAS&destination=LON")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v1/prices/monthly?origin=LAS&destination=LON",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v1/prices/monthly?origin=LAS&destination=LON")
print(response.text)

Returns the cheapest non-stop tickets, as well as tickets with 1 or 2 stops, for the selected route grouped by month.

HTTP Request

GET https://api.travelpayouts.com/v1/prices/monthly?origin=LAS&destination=LON

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string MOW true An IATA code of a city or an airport of the origin
destination string false An IATA code of a city of the destination
calendar_type string departure_date true Type of grouping (allowed values: departure_date or return_date)
length integer false A length of stay in the destination place
departure_date string false A date of departure (2006-01 or 2006-01-02 format)
return_date string false A date of return departure (2006-01 or 2006-01-02 format)
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": {
    "2021-08": {
      "airline": "UA",
      "departure_at": "2021-08-02T13:15:00-07:00",
      "destination": "LON",
      "flight_number": 1961,
      "origin": "LAS",
      "price": 70162,
      "return_at": "2021-08-12T13:40:00+01:00",
      "transfers": 1
    },
    "2021-09": {
      "airline": "WS",
      "departure_at": "2021-09-03T12:45:00-07:00",
      "destination": "LON",
      "flight_number": 1401,
      "origin": "LAS",
      "price": 62636,
      "return_at": "2021-09-06T20:20:00+01:00",
      "transfers": 2
    },
    "2021-10": {
      "airline": "UA",
      "departure_at": "2021-10-01T13:55:00-07:00",
      "destination": "LON",
      "flight_number": 1497,
      "origin": "LAS",
      "price": 45263,
      "return_at": "2021-10-13T14:10:00+01:00",
      "transfers": 1
    }
  },
  "success": true
}

200

Success response

Field Type Description
departure_at string A date of departure (RFC3339 format)
destination string An IATA code of a city or an airport of the destination
flight_number integer The number of a flight
origin string An IATA code of a city of the origin
price number Ticket price
return_at string A date of return departure (RFC3339 format)
transfers integer Number of transfers
airline string The code of an airline

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Search flight tickets for specific date interval V2

The endpoints return flight tickets for month, week or latest

The prices for the airline tickets

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v2/prices/latest?origin=LAS&destination=LON&limit=1'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v2/prices/latest?origin=LAS&destination=LON&limit=1")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v2/prices/latest?origin=LAS&destination=LON&limit=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v2/prices/latest?origin=LAS&destination=LON&limit=1")
print(response.text)

Search flight prices for a specific period of time

HTTP Request

GET https://api.travelpayouts.com/v2/prices/latest?origin=LAS&destination=LON&limit=1

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 3120000
1h 28800000

Query Parameters

Parameter Type Default Required Description
origin string false An IATA code of a city or an airport of the origin
destination string false An IATA code of a city or an airport of the destination (if you didn't specify origin parameter, you must set destination)
beginning_of_period string false The beginning of the period, within which the dates of departure fall. Must be specified if period_type is equal to a month. (Allowed date formats: 2006-01-02)
period_type string year true The period for which the tickets have been found. (Allowed values: day, year, month, season)
one_way boolean false true true - one way, false - back-to-back.
sorting string price true The assorting of prices: price — by the price. For the directions, only city - city assorting by the price is possible; route — by the popularity of a route; distance_unit_price — by the price for 1 km.
trip_class integer false The flight class: 0 — the economy class, 1 — the business class, 2 — the first class.
trip_duration integer false The length of stay in the destination place.
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
limit integer 30 true Limit of returned offers (Allowed value from 1 to 1000)
page integer 1 true A page of the result, it's used for chunked reading of a large result
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": [
    {
      "depart_date": "2021-10-01",
      "destination": "LON",
      "distance": 8426,
      "duration": 1696,
      "found_at": "2021-07-10T20:53:24",
      "gate": "MyHolidays",
      "number_of_changes": 1,
      "origin": "LAS",
      "return_date": "2021-10-15",
      "trip_class": 0,
      "value": 45263
    }
  ],
  "error": "",
  "success": true
}

200

Success response

Field Type Description
trip_class integer The flight class: 0 — the economy class, 1 — the business class, 2 — the first class.
depart_date string A date of departure (RFC3339 format)
destination string An IATA code of a city of the destination
origin string An IATA code of a city of the origin
gate string An angecy or an airline company
number_of_changes integer Number of transfers
return_date string A date of return departure (RFC3339 format)
value number Ticket price
distance integer The flight distnace in kilometers
duration integer The flight duration in minutes
found_at string The time and the date, for which a ticket was found

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Flight price for a month

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v2/prices/month-matrix?origin=LAS&destination=LON&limit=1'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v2/prices/month-matrix?origin=LAS&destination=LON&limit=1")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v2/prices/month-matrix?origin=LAS&destination=LON&limit=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v2/prices/month-matrix?origin=LAS&destination=LON&limit=1")
print(response.text)

The endpoint return minimal prices for month grouped by days and number of changes.

HTTP Request

GET https://api.travelpayouts.com/v2/prices/month-matrix?origin=LAS&destination=LON&limit=1

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 1560000
1h 14400000

Query Parameters

Parameter Type Default Required Description
origin string true An IATA code of a city or an airport of the origin
destination string true An IATA code of a city or an airport of the destination
month string current month true The beginning of the month
trip_duration integer false The length of stay in the destination place.
trip_class integer false The flight class: 0 — the economy class, 1 — the business class, 2 — the first class.
sorting string price true The assorting of prices: price — by the price. For the directions, only city - city assorting by the price is possible; route — by the popularity of a route; distance_unit_price — by the price for 1 km.
one_way boolean true true true - one way, false - back-to-back.
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
limit integer 30 true Limit of returned offers (Allowed value from 1 to 1000)
page integer 1 true A page of the result, it's used for chunked reading of a large result
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": [
    {
      "depart_date": "2021-08-02",
      "destination": "LON",
      "distance": 8426,
      "duration": 1724,
      "found_at": "2021-07-12T22:11:27Z",
      "gate": "MyHolidays",
      "number_of_changes": 1,
      "origin": "LAS",
      "return_date": "2021-08-12",
      "trip_class": 0,
      "value": 70162
    }
  ],
  "success": true
}

200

Success response

Field Type Description
gate string An angecy or an airline company
distance integer The flight distnace in kilometers
destination string An IATA code of a city of the destination
duration integer The flight duration in minutes
found_at string The time and the date, for which a ticket was found
number_of_changes integer Number of transfers
origin string An IATA code of a city of the origin
return_date string A date of return departure (RFC3339 format)
trip_class integer The flight class: 0 — the economy class, 1 — the business class, 2 — the first class.
depart_date string A date of departure (RFC3339 format)
value number Ticket price

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

The prices for the alternative directions

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v2/prices/nearest-places-matrix?origin=LED&destination=MOW&distance=1000&limit=5'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v2/prices/nearest-places-matrix?origin=LED&destination=MOW&distance=1000&limit=5")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v2/prices/nearest-places-matrix?origin=LED&destination=MOW&distance=1000&limit=5",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v2/prices/nearest-places-matrix?origin=LED&destination=MOW&distance=1000&limit=5")
print(response.text)

The endpoint returns flight tickets for a requested direction and alternative directions (i.e. nearest to the requested direction of the city).

HTTP Request

GET https://api.travelpayouts.com/v2/prices/nearest-places-matrix?origin=LED&destination=MOW&distance=1000&limit=5

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string true An IATA code of a city or an airport of the origin
destination string true An IATA code of a city or an airport of the destination
depart_date string false A date of departure (2006-01 or 2006-01-02 format). If we use 2006-01 format, flexibility parameter will be ignored.
return_date string false A date of return departure (2006-01 or 2006-01-02 format). If we use 2006-01 format, flexibility parameter will be ignored.
limit integer 1 false Count of directions (requested + alternative directions). If we set 1, you will get only flight tickets for requested directions.
distance integer 100 false Search radius for alternative directions.
flexibility integer false Offset from a departure date or return date.
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": {
    "destinations": [
      "LED"
    ],
    "errors": {},
    "origins": [
      "IAR"
    ],
    "prices": [
      {
        "depart_date": "2021-10-06T07:30:00+03:00",
        "destination": "LED",
        "distance": 634,
        "duration": 650,
        "found_at": "2021-09-23T09:21:02Z",
        "gate": "SuperKassa.ru",
        "link": "/MOW0610LED27101?t=DP16334946001633499700000000SVOLED16353549001635360300000000LEDVKO_66c4955e5444fb57f91d3661abcd5932_2364\u0026search_date=23092021\u0026expected_price_uuid=db746b1a-42c0-46d6-b710-ec981dbca5f8\u0026expected_price_currency=rub",
        "main_airline": "DP",
        "origin": "IAR",
        "price": 2364,
        "return_date": "2021-10-27T20:15:00+03:00",
        "transfers": 0,
        "trip_class": 0
      }
    ]
  }
}

200

Success response

Field Type Description
transfers integer Number of transfers
trip_class integer The flight class: 0 — the economy class, 1 — the business class, 2 — the first class.
destination string An IATA code of a city of the destination
distance integer The flight distnace in kilometers
found_at string The time and the date, for which a ticket was found (RFC3339, UTC timezone)
link string A link on a tickets on aviasales.
main_airline string An airline that flies the most flights to a returned direction.
origin string An IATA code of a city of the origin
depart_date string A date of departure (RFC3339 format)
duration integer The flight duration in minutes
gate string An angecy or an airline company
price number Ticket price
return_date string A date of return departure (RFC3339 format)

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Flight price for a week

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v2/prices/week-matrix?origin=MOW&destination=LED&limit=1'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v2/prices/week-matrix?origin=MOW&destination=LED&limit=1")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v2/prices/week-matrix?origin=MOW&destination=LED&limit=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v2/prices/week-matrix?origin=MOW&destination=LED&limit=1")
print(response.text)

The endpoint returns flight prices for a specific week

HTTP Request

GET https://api.travelpayouts.com/v2/prices/week-matrix?origin=MOW&destination=LED&limit=1

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string true An IATA code of a city or an airport of the origin
destination string true An IATA code of a city or an airport of the destination
depart_date string false A date of departure (2006-01 or 2006-01-02 format)
return_date string false A date of return departure (2006-01 or 2006-01-02 format)
trip_class integer false The flight class: 0 — the economy class, 1 — the business class, 2 — the first class.
sorting string price true The assorting of prices: price — by the price. For the directions, only city - city assorting by the price is possible; route — by the popularity of a route; distance_unit_price — by the price for 1 km.
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
limit integer 30 true Limit of returned offers (Allowed value from 1 to 1000)
page integer 1 true A page of the result, it's used for chunked reading of a large result
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": [
    {
      "depart_date": "2021-07-24",
      "destination": "LED",
      "distance": 634,
      "duration": 180,
      "found_at": "2021-07-13T09:16:35Z",
      "gate": "TUI",
      "number_of_changes": 0,
      "origin": "MOW",
      "return_date": "2021-08-11",
      "trip_class": 0,
      "value": 3498
    }
  ],
  "success": true
}

200

Success response

Field Type Description
found_at string The time and the date, for which a ticket was found
return_date string A date of return departure (RFC3339 format)
value number Ticket price
distance integer The flight distnace in kilometers
duration integer The flight duration in minutes
gate string An angecy or an airline company
number_of_changes integer Number of transfers
origin string An IATA code of a city of the origin
trip_class integer The flight class: 0 — the economy class, 1 — the business class, 2 — the first class.
depart_date string A date of departure (RFC3339 format)
destination string An IATA code of a city of the destination

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Grouped flights tickets and search by ticket's price V3

Improved generation of V1 endpoints

The prices for the airline tickets

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales/v3/get_latest_prices?origin=LAS&destination=LON&limit=1'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales/v3/get_latest_prices?origin=LAS&destination=LON&limit=1")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales/v3/get_latest_prices?origin=LAS&destination=LON&limit=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales/v3/get_latest_prices?origin=LAS&destination=LON&limit=1")
print(response.text)

Search flight prices for a specific period of time

HTTP Request

GET https://api.travelpayouts.com/aviasales/v3/get_latest_prices?origin=LAS&destination=LON&limit=1

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string false An IATA code of a city or an airport of the origin
destination string false An IATA code of a city or an airport of the destination (if you didn't specify origin parameter, you must set destination)
beginning_of_period string false The beginning of the period, within which the dates of departure fall. Must be specified if period_type is equal to a month. (Allowed date formats: 2006-01-02, 2006-01, 2006-01-02)
period_type string year true The period for which the tickets have been found. (Allowed values: day, year, month, season)
one_way boolean false true true - one way, false - back-to-back.
sorting string price true The assorting of prices: price — by the price. For the directions, only city - city assorting by the price is possible; route — by the popularity of a route; distance_unit_price — by the price for 1 km.
trip_class integer false The flight class: 0 — the economy class, 1 — the business class, 2 — the first class.
trip_duration integer false The length of stay in the destination place.
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
limit integer 30 true Limit of returned offers (Allowed value from 1 to 1000)
page integer 1 true A page of the result, it's used for chunked reading of a large result
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": [
    {
      "depart_date": "2021-10-01",
      "destination": "LON",
      "distance": 8426,
      "duration": 1696,
      "found_at": "2021-07-10T20:53:24",
      "gate": "MyHolidays",
      "number_of_changes": 1,
      "origin": "LAS",
      "return_date": "2021-10-15",
      "trip_class": 0,
      "value": 45263
    }
  ],
  "error": "",
  "success": true
}

200

Success response

Field Type Description
value number Ticket price
duration integer The flight duration in minutes
number_of_changes integer Number of transfers
origin string An IATA code of a city of the origin
found_at string The time and the date, for which a ticket was found
gate string An angecy or an airline company
return_date string A date of return departure (RFC3339 format)
trip_class integer The flight class: 0 — the economy class, 1 — the business class, 2 — the first class.
depart_date string A date of departure (RFC3339 format)
destination string An IATA code of a city of the destination
distance integer The flight distnace in kilometers

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales/v3/get_popular_directions?destination=MOW&limit=10&page=2&locale=en&currency=USD'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales/v3/get_popular_directions?destination=MOW&limit=10&page=2&locale=en&currency=USD")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales/v3/get_popular_directions?destination=MOW&limit=10&page=2&locale=en&currency=USD",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales/v3/get_popular_directions?destination=MOW&limit=10&page=2&locale=en&currency=USD")
print(response.text)

The endpoint returns the cheapest prices for popular directions

HTTP Request

GET https://api.travelpayouts.com/aviasales/v3/get_popular_directions?destination=MOW&limit=10&page=2&locale=en&currency=USD

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
destination string true An IATA code of a city or an airport of the destination
locale string ru true The language on which the result will be returned
currency string rub true The currency in which prices were given
market string ru false Sets the market of the data source
limit integer 5 true The limit of returned offers (Allowed value from 1 to 30)
page integer 1 true A page of the result, it's used for chunked reading of a large result
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": {
    "destination": {
      "city_name": "Moscow",
      "country_name": "Russia",
      "declension": ""
    },
    "origin": [
      {
        "city_iata": "SIP",
        "city_name": "Simferopol",
        "declensions": {},
        "departure_at": "2021-11-21",
        "price": 1681,
        "return_at": ""
      }
    ]
  },
  "success": true
}

200

Success response

Field Type Description
destionation.country_name string An name of a country of the destination
destionation.declension string An name of a city of the destination in the accusative case
destionation.city_name string An name of a city of the destination
origin List of tickets

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Special offers

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales/v3/get_special_offers?origin=MOW&destination=LED&airline=s7&locale=en'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales/v3/get_special_offers?origin=MOW&destination=LED&airline=s7&locale=en")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales/v3/get_special_offers?origin=MOW&destination=LED&airline=s7&locale=en",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales/v3/get_special_offers?origin=MOW&destination=LED&airline=s7&locale=en")
print(response.text)

The endpoint returns flight tickets with abnormally low prices

HTTP Request

GET https://api.travelpayouts.com/aviasales/v3/get_special_offers?origin=MOW&destination=LED&airline=s7&locale=en

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string false An IATA code of a city or an airport of the origin
destination string false An IATA code of a city or an airport of the destination
locale string true Language on which result will be returned
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
airline string false The code of an airline
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": [
    {
      "airline": "N4",
      "airline_title": "Nordwind Airlines",
      "color": "CD202C",
      "departure_at": "2021-09-14T08:55:00+03:00",
      "destination": "LED",
      "destination_airport": "LED",
      "destination_name": "Saint Petersburg",
      "duration": 85,
      "flight_number": "177",
      "link": "/MOW1409LED1?t=N416315989001631604000000000SVOLED_3d507ff71944b34ca6e5016e0c0fce85_1413\u0026search_date=29072021\u0026expected_price_uuid=9a904680-6d3b-4dee-a361-b85da4e63590\u0026expected_price_currency=rub",
      "mini_title": "Flight deals from Moscow",
      "origin": "MOW",
      "origin_airport": "SVO",
      "origin_name": "Moscow",
      "price": 1413,
      "search_id": "9a904680-6d3b-4dee-a361-b85da4e63590",
      "signature": "3d507ff71944b34ca6e5016e0c0fce85",
      "title": "Flight deals from Moscow to Saint Petersburg"
    }
  ],
  "success": true
}

200

Success response

Field Type Description
departure_at string A date of departure (RFC3339 format)
mini_title string A short title for a special offer
title string A title for a special offer
airline string The code of an airline
color string Airline's brand color (present as a RGB code)
destination_airport string An IATA code of an airport of the destination
duration integer Flight duration in minutes
origin string An IATA code of a city of the origin
origin_airport string An IATA code of an airport of the origin
return_at string A date of return departure (RFC3339 format)
airline_title string The name of an airline
search_id string The search ID (used for building of the deeplink)
price number Ticket price
flight_number integer The number of a flight
link string A link on the flight ticket
signature string The ticket ID (used for building of the deeplink)
destination string An IATA code of a city of the destination

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Grouped tickets by date

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales/v3/grouped_prices?origin=MOW&destination=LED'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales/v3/grouped_prices?origin=MOW&destination=LED")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales/v3/grouped_prices?origin=MOW&destination=LED",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales/v3/grouped_prices?origin=MOW&destination=LED")
print(response.text)

The endpoints returns grouped flight tickets by departure, return date or month

HTTP Request

GET https://api.travelpayouts.com/aviasales/v3/grouped_prices?origin=MOW&destination=LED

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string false An IATA code of a city or an airport of the origin
destination string false An IATA code of a city or an airport of the destination (if you didn't specify origin parameter, you must set destination)
departure_at string false A date of departure (2006-01 or 2006-01-02 format)
return_at string false A date of return departure (2006-01 or 2006-01-02 format)
group_by string departure_at true A kind of grouping: departure_at, return_at or month
one_way boolean true true true - one way, false - back-to-back.
max_trip_duration integer false Maximum number of days spent at destination point
min_trip_duration integer false Minimum number of days spent at destination point
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": {
    "2021-09": {
      "airline": "N4",
      "departure_at": "2021-09-14T08:55:00+03:00",
      "destination": "LED",
      "destination_airport": "LED",
      "duration": 85,
      "flight_number": "177",
      "link": "/MOW1409LED1?t=N416315989001631604000000000SVOLED_3d507ff71944b34ca6e5016e0c0fce85_1413\u0026search_date=29072021\u0026expected_price_uuid=9a904680-6d3b-4dee-a361-b85da4e63590\u0026expected_price_currency=rub",
      "origin": "MOW",
      "origin_airport": "SVO",
      "price": 1413,
      "return_transfers": 0,
      "transfers": 0
    }
  },
  "success": true
}

200

Success response

Field Type Description
destination string An IATA code of a city of the destination
first neasted key string The date on which the grouping was done
flight_number integer The number of a flight
transfers integer Number of transfers from an origin point to a destination
link string A link on the flight ticket
origin_airport string An IATA code of an airport of the origin
return_transfers integer Number of transfers from destination point to an origin
destination_airport string An IATA code of an airport of the destination
duration integer Flight duration in minutes
return_at string A date of return departure (RFC3339 format)
price number Ticket price
airline string The code of an airline
departure_at string A date of departure (RFC3339 format)
origin string An IATA code of a city of the origin

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Flight tickets for spefic dates

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales/v3/prices_for_dates?origin=MOW&destination=LED&limit=1'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales/v3/prices_for_dates?origin=MOW&destination=LED&limit=1")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales/v3/prices_for_dates?origin=MOW&destination=LED&limit=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales/v3/prices_for_dates?origin=MOW&destination=LED&limit=1")
print(response.text)

The endpoint return flight tickets for spefic departure or return date. If exact days are specified, then all tickets for the specified days will be returned.

HTTP Request

GET https://api.travelpayouts.com/aviasales/v3/prices_for_dates?origin=MOW&destination=LED&limit=1

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string false An IATA code of a city or an airport of the origin
destination string false An IATA code of a city or an airport of the destination (if you didn't specify origin parameter, you must set destination)
departure_at string false A date of departure (2006-01 or 2006-01-02 format)
return_at string false A date of return departure (2006-01 or 2006-01-02 format)
unique boolean false true Show only unique directions. (Allowed values: true, false)
sorting string price true The assorting of prices: price — by the price. For the directions, only city - city assorting by the price is possible; route — by the popularity of a route; distance_unit_price — by the price for 1 km.
direct boolean false true Only direct directions. (Allowed values: true, false)
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
limit integer 30 true Limit of returned offers (Allowed value from 1 to 1000)
page integer 1 true A page of the result, it's used for chunked reading of a large result
one_way boolean true true true - one way, false - back-to-back.
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": [
    {
      "airline": "N4",
      "departure_at": "2021-09-14T08:55:00+03:00",
      "destination": "LED",
      "destination_airport": "LED",
      "duration": 85,
      "flight_number": "177",
      "link": "/MOW1409LED1?t=N416315989001631604000000000SVOLED_3d507ff71944b34ca6e5016e0c0fce85_1413\u0026search_date=29072021\u0026expected_price_uuid=9a904680-6d3b-4dee-a361-b85da4e63590\u0026expected_price_currency=rub",
      "origin": "MOW",
      "origin_airport": "SVO",
      "price": 1413,
      "return_transfers": 0,
      "transfers": 0
    }
  ],
  "success": true
}

200

Success response

Field Type Description
transfers integer Number of transfers from an origin point to a destination
airline string The code of an airline
departure_at string A date of departure (RFC3339 format)
destination string An IATA code of a city of the destination
flight_number integer The number of a flight
link string A link on the flight ticket
return_transfers integer Number of transfers from destination point to an origin
destination_airport string An IATA code of an airport of the destination
duration integer Flight duration in minutes
origin string An IATA code of a city of the origin
origin_airport string An IATA code of an airport of the origin
price number Ticket price
return_at string A date of return departure (RFC3339 format)

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Search flight tickets by price

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales/v3/search_by_price_range?origin=MOW&destination=LED&limit=1&locale=en'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales/v3/search_by_price_range?origin=MOW&destination=LED&limit=1&locale=en")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales/v3/search_by_price_range?origin=MOW&destination=LED&limit=1&locale=en",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales/v3/search_by_price_range?origin=MOW&destination=LED&limit=1&locale=en")
print(response.text)

The endpoint return flight tickets with spefic price

HTTP Request

GET https://api.travelpayouts.com/aviasales/v3/search_by_price_range?origin=MOW&destination=LED&limit=1&locale=en

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
origin string false An IATA code of a city or an airport of the origin
destination string false An IATA code of a city or an airport of the destination (if you didn't specify origin parameter, you must set destination)
value_min integer false Minimum price for a ticket
value_max integer false Maximum price for a ticket
one_way boolean true true true - one way, false - back-to-back.
direct boolean false true Only direct directions. (Allowed values: true, false)
locale string true Language on which result will be returned
currency string rub true Currency in which prices were given
market string ru false Sets the market of the data source
limit integer 30 true Limit of returned offers (Allowed value from 1 to 1000)
page integer 1 true A page of the result, it's used for chunked reading of a large result
token string true Individual affiliate token.

Response

Sample response

{
  "currency": "rub",
  "data": [
    {
      "departure_at": "2021-11-03",
      "destination_airport": "LED",
      "destination_code": "LED",
      "destination_name": "Saint Petersburg",
      "duration": 90,
      "link": "/MOW0311LED1?t=DP16359621001635967500000000VKOLED_2560c41c52a83fba3afad4d8770d1ee9_6088\u0026search_date=28072021\u0026expected_price_uuid=0cd8aa16-9169-4099-9076-574fbee7da8a\u0026expected_price_currency=rub",
      "origin_airport": "VKO",
      "origin_code": "MOW",
      "origin_name": "Moscow",
      "price": 6088,
      "transfers": 0
    }
  ],
  "success": true
}

200

Success response

Field Type Description
destination_code string An IATA code of a city of the destination
destination_iata string An IATA code of a city of the origin
destination_name string An name of a city of the destination
price number Ticket price
origin_name string An name of a city of the origin
return_at string A date of return departure (RFC3339 format)
transfers integer Number of transfers from an origin point to a destination
departure_at string A date of departure (RFC3339 format)
destination_airport string An IATA code of an airport of the destination
duration integer Flight duration in minutes
link string A link on the flight ticket
origin_airport string An IATA code of an airport of the origin

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Aviasales's internal error
500 A techinal trouble in our system

Reference data

The endpoints return JSON files with information about: countries, cities, airports, airlines and planes

Airlines

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales_resources/v3/airlines.json?locale=ru'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales_resources/v3/airlines.json?locale=ru")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales_resources/v3/airlines.json?locale=ru",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales_resources/v3/airlines.json?locale=ru")
print(response.text)

The endpoint returns the JSON file with airlines for a specific locale

HTTP Request

GET https://api.travelpayouts.com/aviasales_resources/v3/airlines.json?locale=ru

Run in Postman

Query Parameters

Parameter Type Default Required Description
locale string en true Language on which result will be returned

Response

Sample response

{
  "code": "DN",
  "name": null,
  "name_translations": {
    "en": "Norwegian Air"
  }
}

200

Success response

Field Type Description
name_translations object English translation for a name
code string IATA code of the airline
name string Name of the airline in selected locale

Errors

Code Description
404 Not found airlines for a locale

Airports

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales_resources/v3/airports.json?locale=ru'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales_resources/v3/airports.json?locale=ru")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales_resources/v3/airports.json?locale=ru",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales_resources/v3/airports.json?locale=ru")
print(response.text)

The endpoint returns the JSON file with airports for a specific locale

HTTP Request

GET https://api.travelpayouts.com/aviasales_resources/v3/airports.json?locale=ru

Run in Postman

Query Parameters

Parameter Type Default Required Description
locale string en true Language on which result will be returned

Response

Sample response

{
  "city_code": "DRI",
  "code": "DRI",
  "coordinates": {
    "lat": 30.85,
    "lon": -93.28333
  },
  "country_code": "US",
  "flightable": false,
  "iata_type": "airport",
  "name": null,
  "time_zone": "America/Chicago"
}

200

Success response

Field Type Description
iata_type string Type of the airport (airport or railway)
lon number longitude
time_zone string City's timezone
coordinates object Airport's coordinates
code string IATA code of the airport
country_code string IATA code of the country
flightable boolean The airport is opened
lat number latitude
name string Name of the airport in selected locale
city_code string IATA code of the city

Errors

Code Description
404 Not found airports for a locale

Alliances

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales_resources/v3/aliances.json?locale=ru'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales_resources/v3/aliances.json?locale=ru")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales_resources/v3/aliances.json?locale=ru",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales_resources/v3/aliances.json?locale=ru")
print(response.text)

The endpoint returns the JSON file with alliances for a specific locale

HTTP Request

GET https://api.travelpayouts.com/aviasales_resources/v3/aliances.json?locale=ru

Run in Postman

Query Parameters

Parameter Type Default Required Description
locale string en true Language on which result will be returned

Response

Sample response

{
  "airlines": [
    "SQ",
    "CO",
    "AC",
    "TP",
    "ET",
    "MS",
    "CA",
    "ZH"
  ],
  "name": "Star Alliance"
}

200

Success response

Field Type Description
name string Name of the alliance in selected locale
airlines []string List of airlines are included to the alliance

Errors

Code Description
404 Not found alliances for a locale

Cities

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales_resources/v3/cities.json?locale=ru'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales_resources/v3/cities.json?locale=ru")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales_resources/v3/cities.json?locale=ru",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales_resources/v3/cities.json?locale=ru")
print(response.text)

The endpoint returns the JSON file with cities for a specific locale

HTTP Request

GET https://api.travelpayouts.com/aviasales_resources/v3/cities.json?locale=ru

Run in Postman

Query Parameters

Parameter Type Default Required Description
locale string en true Language on which result will be returned

Response

Sample response

{
  "cases": {
    "da": "Эль-Дабаа",
    "pr": "Эль-Дабаа",
    "ro": "Эль-Дабаа",
    "su": "Эль-Дабаа",
    "tv": "Эль-Дабаа",
    "vi": "в Эль-Дабаа"
  },
  "code": "DBB",
  "coordinates": {
    "lat": 30.924444,
    "lon": 28.46139
  },
  "country_code": "EG",
  "name": "Эль-Дабаа",
  "time_zone": "Africa/Cairo"
}

200

Success response

Field Type Description
code string IATA code of the city
coordinates object City's coordinates
country_code string IATA code of the country
lat number latitude
lon number longitude
name string Name of the city in selected locale
time_zone string City's timezone
cases object Translated cases for the country

Errors

Code Description
404 Not found cities for a locale

Countries

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/aviasales_resources/v3/countries.json?locale=ru'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/aviasales_resources/v3/countries.json?locale=ru")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/aviasales_resources/v3/countries.json?locale=ru",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/aviasales_resources/v3/countries.json?locale=ru")
print(response.text)

The endpoint returns the JSON file with countries for a specific locale

HTTP Request

GET https://api.travelpayouts.com/aviasales_resources/v3/countries.json?locale=ru

Run in Postman

Query Parameters

Parameter Type Default Required Description
locale string en true Language on which result will be returned

Response

Sample response

{
  "cases": {
    "da": "Азербайджану",
    "pr": "Азербайджане",
    "ro": "Азербайджана",
    "su": "Азербайджан",
    "tv": "Азербайджаном",
    "vi": "в Азербайджан"
  },
  "code": "AZ",
  "currency": "AZN",
  "name": "Азербайджан"
}

200

Success response

Field Type Description
cases object Translated cases for the country
code string IATA code of the country
currency string A currency which is used in the country
name string Name of the country in selected locale

Errors

Code Description
404 Not found countries for a locale

Search excursions through Weatlas

Search excursion's prices and descriptions

Excursion offers

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/weatlas/v1/search_prices_by_iata?code=LON&limit=1&language=RU'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/weatlas/v1/search_prices_by_iata?code=LON&limit=1&language=RU")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/weatlas/v1/search_prices_by_iata?code=LON&limit=1&language=RU",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/weatlas/v1/search_prices_by_iata?code=LON&limit=1&language=RU")
print(response.text)

Search excursion offers for a country or a city.

HTTP Request

GET https://api.travelpayouts.com/weatlas/v1/search_prices_by_iata?code=LON&limit=1&language=RU

Run in Postman

Rate Limits

The endpoint has limits for requests count.
Rate limits can have one or more "time windows" (for example, 5 minutes or 1 hour).
It means if you exceed rate limits for a window, you will be banned for a duration of this window. For example, if a window is 5 minutes long and you reach a limit in 2nd minutes, you will be banned for 3 minutes.

Window Request count
5m 390000
1h 3600000

Query Parameters

Parameter Type Default Required Description
code string true IATA code of a country or a city. (Allowed value of the length from 2 to 3)
from_date string false Return available offers for booking from specified date. (Allowed date formats: 2006-01-02T15:04)
to_date string false Return available offfers for booking up to and including the specified date. (Allowed date formats: 2006-01-02T15:04)
adults_count integer 2 true Count of adults
children_count integer false Count of children
language string true Language on which result will be returned
currency string rub true Currency in which prices were given
limit integer false Limit of returned offers (Allowed value from 1 to 1000)
token string true Individual affiliate token.

Response

Sample response

{
  "data": [
    {
      "activity_type": "Group",
      "available_dates": [
        "2021-07-15T15:15:00+01:00",
        "2021-07-17T15:15:00+01:00",
        "2021-07-19T15:15:00+01:00",
        "2021-07-21T15:15:00+01:00",
        "2021-07-23T15:15:00+01:00",
        "2021-07-25T15:15:00+01:00",
        "2021-07-27T15:15:00+01:00",
        "2021-07-29T15:15:00+01:00",
        "2021-07-31T15:15:00+01:00",
        "2021-08-02T15:15:00+01:00",
        "2021-08-04T15:15:00+01:00",
        "2021-08-06T15:15:00+01:00",
        "2021-08-08T15:15:00+01:00",
        "2021-08-10T15:15:00+01:00",
        "2021-08-12T15:15:00+01:00"
      ],
      "city_iata": "LON",
      "content": "Ежедневная обзорная экскурсия по Лондону (синий маршрут)",
      "country_iata": "GB",
      "currency": "EUR",
      "duration": "2 часа",
      "excursion_id": 11632,
      "excursion_type": "Пешая",
      "link": "https://weatlas.com/excursions/11632?aid=10690\u0026utm_source=Travelpayouts\u0026utm_content=11632",
      "photo": "https://weatlas.com/images/excursions/11632/list_0803051001489950594.jpeg",
      "price": 40
    }
  ],
  "success": true
}

200

Success response

Field Type Description
duration string Text description of excursion duration
excursion_type string Type of an excursion
link string Link on an excursion's page
photo string Link on an excursion's photo
price number Ticket price
activity_type string Type of an activity
city_iata string IATA code of a city
currency string Currency in which prices were given
excursion_id integer Identificator of an excursion
content string Excursion's title
country_iata string IATA code of a country

Errors

Code Description
400 Incorrect request
420 A trouble on external source's side: Weatlas's internal error
500 A techinal trouble in our system

Flights search API: Real-time and multi-city search

With the help of API, you can get the results of requests in real time and create a Multi-City search.

By default, one partner may send no more than 200 queries per hour for one IP, using the airline tickets search API. This restriction may be changed if a situation so requires.

Аccess to the flights search API

Requirements for Search API

How to get access

To access the flights search API you should be registered in our travel affiliate program and submit your request on with the following information:

Sample request

curl --request POST \ --data-raw '{\"host\":\"your_server_host\",\"locale\":\"en\",\"marker\":\"Put_Your_Marker_Here\",\"passengers\":{\"adults\":1,\"children\":0,\"infants\":0},\"segments\":[{\"date\":\"2018-05-25\",\"destination\":\"LON\",\"origin\":\"MOW\"},{\"date\":\"2018-06-18\",\"destination\":\"MOW\",\"origin\":\"LON\"}],\"signature\":\"MD5_signature\",\"trip_class\":true,\"user_ip\":\"user_ip_address\"}' \
  --url 'https://api.travelpayouts.com/v1/flight_search'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v1/flight_search")
request = Net::HTTP::Post.new(url)request.body = "{\"host\":\"your_server_host\",\"locale\":\"en\",\"marker\":\"Put_Your_Marker_Here\",\"passengers\":{\"adults\":1,\"children\":0,\"infants\":0},\"segments\":[{\"date\":\"2018-05-25\",\"destination\":\"LON\",\"origin\":\"MOW\"},{\"date\":\"2018-06-18\",\"destination\":\"MOW\",\"origin\":\"LON\"}],\"signature\":\"MD5_signature\",\"trip_class\":true,\"user_ip\":\"user_ip_address\"}"
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v1/flight_search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",CURLOPT_POSTFIELDS => '{\"host\":\"your_server_host\",\"locale\":\"en\",\"marker\":\"Put_Your_Marker_Here\",\"passengers\":{\"adults\":1,\"children\":0,\"infants\":0},\"segments\":[{\"date\":\"2018-05-25\",\"destination\":\"LON\",\"origin\":\"MOW\"},{\"date\":\"2018-06-18\",\"destination\":\"MOW\",\"origin\":\"LON\"}],\"signature\":\"MD5_signature\",\"trip_class\":true,\"user_ip\":\"user_ip_address\"}'),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.post("https://api.travelpayouts.com/v1/flight_search", data="{\"host\":\"your_server_host\",\"locale\":\"en\",\"marker\":\"Put_Your_Marker_Here\",\"passengers\":{\"adults\":1,\"children\":0,\"infants\":0},\"segments\":[{\"date\":\"2018-05-25\",\"destination\":\"LON\",\"origin\":\"MOW\"},{\"date\":\"2018-06-18\",\"destination\":\"MOW\",\"origin\":\"LON\"}],\"signature\":\"MD5_signature\",\"trip_class\":true,\"user_ip\":\"user_ip_address\"}")

print(response.text)

HTTP Request

POST https://api.travelpayouts.com/v1/flight_search

Run in Postman

Query Parameters

Parameter Type Default Required Description

Response

Sample response

{
  "_ga": null,
  "affiliate": true,
  "affiliate_has_sales": true,
  "auid": null,
  "chain_name": "jetradar_rt_search_native_format",
  "clean_marker": "xxxxx",
  "currency": "usd",
  "currency_rates": {
    "czk": 2.95961,
    "lak": 0.0075
  },
  "destination_country": "IT",
  "gates_count": 0,
  "geoip_city": "Unknown",
  "geoip_country": "Unknown",
  "host": "beta.aviasales.ru",
  "initiated_at": "2021-04-26 05:09:42.031853",
  "internal": false,
  "know_english": "false",
  "locale": "en",
  "marker": "xxxxx",
  "market": "dk",
  "meta": {
    "uuid": "d9266de5-7578-418f-9ddc-6b176ae45923"
  },
  "metropoly_airports": {
    "CPH": [
      "CPH",
      "CPH",
      "ZGH",
      "RKE"
    ],
    "ROM": [
      "ROM",
      "IRR",
      "FCO",
      "ROM",
      "XRJ",
      "IRT",
      "CIA"
    ]
  },
  "open_jaw": false,
  "origin_country": "DK",
  "passengers": {
    "adults": 1,
    "children": 0,
    "infants": 0
  },
  "range": "false",
  "search_depth": 60,
  "search_id": "d9266de5-7578-418f-9ddc-6b176ae45923",
  "segments": [
    {
      "date": "2021-06-24",
      "destination": "ROM",
      "destination_country": "IT",
      "origin": "CPH",
      "origin_country": "DK",
      "original_destination": "ROM",
      "original_origin": "CPH"
    },
    {
      "date": "2021-06-25",
      "destination": "CPH",
      "destination_country": "DK",
      "origin": "ROM",
      "origin_country": "IT",
      "original_destination": "CPH",
      "original_origin": "ROM"
    }
  ],
  "server_name": "zoo39.int.avs.io.yasen.bee.13",
  "show_ads": true,
  "signature": "fb7ded0ddd86270a262d832322f46093",
  "start_search_timestamp": 1524719382.03045,
  "travelpayouts_api_request": true,
  "trip_class": true,
  "user_env": {},
  "user_id": null,
  "user_ip": null
}

200

Success response

Field Type Description
geoip_city string the geoip of the city where the request was made
host string host's request
locale string the language of the search result
segments.date string departure date yyyy-mm-dd (for example, "2021-09-08")
segments.destination string destination IATA or string "City, Country (IATA)". The IATA code is shown in uppercase letters (for example, "Berlin, Germany (BER)")
segments.origin string origin IATA or string "City, Country (IATA)". The IATA code is shown in uppercase letters (for example, "Paris, France (PAR)")
gates_count integer the total number of agencies
geoip_country string the geoip of the country where the request was made
passengers.adults integer the number of adult passengers
passengers.children integer the number of children
passengers.infants integer the number of infants
trip_class string the class of trip
user_ip string the user's IP address
affiliate string the affiliate ID
meta object technical information
search_id string the unique identifier for the search query used to search results
currency_rates object exchange rate
marker string the unique identifier of the affiliate
uuid string unique identifier of the request

Errors

Code Description
400 Incorrect request
500 A techinal trouble in our system

Getting search results

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v1/flight_search_results'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v1/flight_search_results")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v1/flight_search_results",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v1/flight_search_results")
print(response.text)

In the body of the response is the parameter search_id; insert it into the URL:

https://api.travelpayouts.com/v1/flight_search_results?uuid=%search_id%

Then send the request to the server for search results:

GET https://api.travelpayouts.com/v1/flight_search_results?uuid=%search_id%

HTTP Request

GET https://api.travelpayouts.com/v1/flight_search_results

Run in Postman

Query Parameters

Parameter Type Default Required Description
search_id string true The ID from the answer of the request

Response

Sample response

[
  {
    "_ga": null,
    "affiliate_has_sales": false,
    "airlines": {
      "S7": {
        "alliance_name": "OneWorld",
        "average_rate": "3.95",
        "id": 444,
        "name": "S7",
        "rates": "2430"
      },
      "SU": {
        "alliance_name": "SkyTeam",
        "average_rate": "4.01",
        "id": 10,
        "name": "Аэрофлот",
        "rates": "2362"
      },
      "U6": {
        "alliance_name": null,
        "average_rate": "3.62",
        "id": 503,
        "name": "Уральские авиалинии",
        "rates": "1158"
      },
      "UN": {
        "alliance_name": null,
        "average_rate": "3.98",
        "id": 492,
        "name": "Трансаэро",
        "rates": "2639"
      },
      "UT": {
        "alliance_name": null,
        "id": 507,
        "name": "ЮТэйр",
        "rates": "1843"
      }
    },
    "airports": {
      "DME": {
        "city": "Москва",
        "country": "Россия",
        "name": "Домодедово",
        "rates": "392",
        "time_zone": "Europe/Moscow"
      },
      "LED": {
        "city": "Санкт-Петербург",
        "country": "Россия",
        "name": "Пулково",
        "rates": "259",
        "time_zone": "Europe/Moscow"
      },
      "SVO": {
        "average_rate": "3.63",
        "city": "Москва",
        "country": "Россия",
        "name": "Шереметьево",
        "rates": "307",
        "time_zone": "Europe/Moscow"
      },
      "VKO": {
        "city": "Москва",
        "country": "Россия",
        "name": "Внуково",
        "rates": "211",
        "time_zone": "Europe/Moscow"
      }
    },
    "banner_info": {},
    "city_distance": 634,
    "filters_boundary": {
      "arrival_datetime_0": {
        "max": 1418950500,
        "min": 1418869200
      },
      "arrival_datetime_1": {
        "max": 1419554400,
        "min": 1419486600
      },
      "departure_minutes_0": {
        "max": 1410,
        "min": 50
      },
      "departure_minutes_1": {
        "max": 1375,
        "min": 270
      },
      "departure_time_0": {
        "max": "23:30",
        "min": "00:50"
      },
      "departure_time_1": {
        "max": "22:55",
        "min": "04:30"
      },
      "flights_duration": {
        "max": 120,
        "min": 70
      },
      "price": {
        "max": 8689,
        "min": 4431
      },
      "stops_count": {
        "0": 4431
      }
    },
    "flight_numbers": [
      [
        "SU30",
        "SU32"
      ],
      [
        "SU31",
        "SU33"
      ]
    ],
    "gates_info": {
      "20": {
        "airline_iatas": {},
        "average_rate": 4.43,
        "currency_code": "rub",
        "is_airline": false,
        "label": "OneTwoTrip",
        "mobile_version": false,
        "payment_methods": [
          "card"
        ],
        "productivity": 16.9991,
        "rates": 2967
      }
    },
    "internal": false,
    "meta": {
      "gates": [
        {
          "count": 1456,
          "duration": 22.402996063232422,
          "good_count": 1456,
          "id": 20
        }
      ],
      "uuid": "c9c6de8c-3fb4-404e-b88c-e9e0a605f183"
    },
    "proposals": [
      {
        "segment": [
          {
            "flight": [
              {
                "aircraft": "AIRBUS A320",
                "arrival": "LED",
                "arrival_date": "2021-05-25",
                "arrival_time": "12:25",
                "delay": 0,
                "departure": "VKO",
                "departure_date": "2021-05-25",
                "departure_time": "11:00",
                "duration": 85,
                "local_arrival_timestamp": 1432549200,
                "local_departure_timestamp": 1434588600,
                "number": 369,
                "operating_carrier": "UT"
              }
            ]
          },
          {
            "flight": [
              {
                "aircraft": "AIRBUS A320",
                "arrival": "DME",
                "arrival_date": "2021-06-18",
                "arrival_time": "11:35",
                "delay": 0,
                "departure": "LED",
                "departure_date": "2021-06-18",
                "departure_time": "10:05",
                "duration": 90,
                "local_arrival_timestamp": 1432549200,
                "local_departure_timestamp": 1434588600,
                "number": 6131,
                "operating_carrier": "SU"
              }
            ]
          }
        ],
        "sign": "7573ea707c2ff84b243241961412ed34",
        "terms": {
          "20": {
            "baggage_source": [
              [
                3
              ],
              [
                3
              ]
            ],
            "currency": "rub",
            "flights_baggage": [
              [
                false
              ],
              [
                false
              ]
            ],
            "flights_handbags": [
              [
                "1PC10"
              ],
              [
                "1PC10"
              ]
            ],
            "handbags_source": [
              [
                3
              ],
              [
                3
              ]
            ],
            "multiplier": 0.000001,
            "price": 18418,
            "proposal_multiplier": 1,
            "unified_price": 18418,
            "url": 18000000
          }
        },
        "xterms": {
          "180": {
            "Y_0PC;Y_0PC": {
              "baggage_source": [
                [
                  3
                ],
                [
                  3
                ]
              ],
              "currency": "rub",
              "flights_baggage": [
                [
                  false
                ],
                [
                  false
                ]
              ],
              "flights_handbags": [
                [
                  "1PC10"
                ],
                [
                  "1PC10"
                ]
              ],
              "handbags_source": [
                [
                  3
                ],
                [
                  3
                ]
              ],
              "multiplier": 0.000001,
              "price": 18418,
              "proposal_multiplier": 1,
              "unified_price": 18418,
              "url": 18000000
            }
          }
        }
      }
    ],
    "search_id": "c9c6de8c-3fb4-404e-b88c-e9e0a605f183",
    "segments": [
      {
        "date": "2021-05-25",
        "destination": "LED",
        "destination_country": "RU",
        "origin": "MOW",
        "origin_country": "RU",
        "original_destination": "LED",
        "original_origin": "MOW"
      },
      {
        "date": "2021-06-18",
        "destination": "MOW",
        "destination_country": "RU",
        "origin": "LED",
        "origin_country": "RU",
        "original_destination": "MOW",
        "original_origin": "LED"
      }
    ],
    "signature": "4bb635b9353a1e933907d41841e23414",
    "validating_carrier": "SU"
  },
  {
    "search_id": "c9c6de8c-3fb4-404e-b88c-e9e0a605f183"
  }
]

200

Success response

Field Type Description
airlines.deeplink_site_name string address of the airline's website
airlines.id string identification number of the airline
airlines.name string name of airline
airlines.rates integer number of ratings
airlines.site_name string name of the airline's website
airlines.alliance_name string alliance of the airline
airlines.average_rate number average rating
airlines.deeplink_id string ID links to airline's website
clean_marker string affiliate marker (deprecated)
filters_boundary.stops_duration object time between flights (maximum and minimum)
filters_boundary.arrival_datetime_0 object arrival datetime (maximum and minimum)
filters_boundary.departure_time_0 object departure time (maximum and minimum)
filters_boundary.flights_duration object flights duration (maximum and minimum)
filters_boundary.price object price of flights (maximum and minimum)
filters_boundary.stops_count object stops count
flight_info.IATA string IATA code
flight_info.average_rate integer average rating of airport
flight_info.city string city where airport is located
flight_info.country string country where airport is located
flight_info.name string airport name
flight_info.ontime_percent object delay persant; min — min number of delay; max — max number of delay; mean — average number of delay._
flight_info.rates integer number of ratings
flight_info.time_zone string time zone of airport
market string market of routes (deprecated)
is_direct boolean true if the flight is non-stop
max_stops integer maximum number of stops
open_jaw boolean true if it is part of open jaw (deprecated)
segments_airports []string IATA codes of the main departure and destination airports
sign string unique id of the ticket, to integrate information from different agencies in one ticket
airports object information about airports;
flight_numbers [][]string numbers of the flight
initiated_at string date and time of search (deprecated)
meta.error string error information
meta.gates.duration number processing time of request
meta.gates.good_count integer number of relevant tickets (if the agency has returned the ticket for the wrong dates or they are misspelled, they are filtered out by the system)
meta.gates.id integer ID agency
meta.gates.count integer number of tickets uploaded from the agency
meta.tos string content of error
segment_durations integer total flights duration (for example, there and back)
segments.date string departure date
segments.destination string destination IATA
segments.destination_country string code of the country of destination
segments.origin string origin IATA
segments.origin_country string the origin country
segments.original_destination string code of the city of destination
stops_airports []string IATA codes of departure airports, destination and transfers
terms.flights_baggage [][]boolean the number of pieces of baggage and its weight. "" — there is no information about baggage; false — baggage is not included in a price; {int}PC{int} — number of bags by %somevalue% kilogram. For example, 2PC23 — means two baggage pieces of 23 kg. {int} — number of bags does not matter, the total weight is limited.
terms.price integer trip price in original currency (type listed in the field currency)
terms.unified_price integer price of flight in basic currency (Russian ruble)
terms.url integer code to generate links for buyers (as forming the link; see below)
terms.currency string currency type
total_duration integer total flight time with stops time
gates_info.currency_code string payment currency code
gates_info.is_airline boolean is an airline
gates_info.mobile_version boolean having a mobile version of the site
gates_info.payment_methods []string payment methods
gates_info.airline_iatas object IATA airline code, if the gate sells tickets
gates_info.average_rate number average rating of agencies
gates_info.label string agency name
gates_info.productivity number productivity
gates_info.rates integer rating agency (count voters)
signature string signature of request
city_distance integer distance between the cities of origin and destination
flight.aircraft string type of aircraft
flight.marketing_carrier string IATA code of the airline that sells the ticket. Use it to generate a flight number. If this field is empty, use operating_carrier
flight.number integer flight number. To generate a full flight number, use the number and operating_carrier parameters
flight.arrival_date string arrival date
flight.local_arrival_timestamp integer local arrival time in UNIX format
flight.local_departure_timestamp integer local departure time in UNIX format
flight.operating_carrier string IATA code of airline that performs the carriage
flight.technical_stops string information about technical stops
flight.arrival_time string arrival time (UNIX-time)
flight.departure string departure IATA code
flight.departure_date string departure date (UNIX-time)
flight.duration integer flight duration in minutes
flight.arrival string IATA code of arrival
flight.delay integer duration of stop between flights (in minutes)
flight.departure_time string departure time (UNIX-time)
flight.rating_summary integer some rating information about agency or airline (can be blank)
rating integer internal information about flight rating
search_id string unique identifier for the search query
xterms object contains information similar to terms, plus may contain additional data on tariffs (if it is transmitted from agencies / airlines)
currency string currency type (deprecated)
is_charter boolean flight is charter or not (false or true)
uuid string request ID
proposals []object an array of variants

Errors

Code Description
400 Incorrect request
500 A techinal trouble in our system

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/v1/flight_searches/{search_id}/clicks/{terms.url}.json'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/v1/flight_searches/{search_id}/clicks/{terms.url}.json")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/v1/flight_searches/{search_id}/clicks/{terms.url}.json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/v1/flight_searches/{search_id}/clicks/{terms.url}.json")
print(response.text)

To get a link to the site of the ticket booking agencies send a request to the following address:

GET https://api.travelpayouts.com/v1/flight_searches/%search_id%/clicks/%terms.url%.json

where search_id is the ID from the answer of the request, terms.url — URL parameter from the response.

You will receive a response like in the example.

To move on to the booking, give your visitors a link from the parameter "url".

The “lifetime” of such links is 15 minutes, after which you will need to search again for the current prices and generate a new reference to the transition.

In our example, this is a link of the form:

https://www.svyaznoy.travel/?utm_source=as.ru&utm_medium=cpa&utm_campaign=meta_avia#MOW0906/BKK1506/A1/C0/I0/S0/22316/EK-132;EK-374/EK-373;EK-131&marker=7uh46i0v2

HTTP Request

GET https://api.travelpayouts.com/v1/flight_searches/{search_id}/clicks/{terms.url}.json

Run in Postman

Query Parameters

Parameter Type Default Required Description
search_id string true The ID from the answer of the request
terms.url string true URL parameter from the response

Response

Sample response

{
  "click_id": 22135952358110,
  "gate_id": 62,
  "method": "GET",
  "params": {},
  "url": "https://www.svyaznoy.travel/?utm_source=as.ru\u0026utm_medium=cpa\u0026utm_campaign=meta_avia#MOW0906/BKK1506/A1/C0/I0/S0/22316/EK-132;EK-374/EK-373;EK-131\u0026marker=7uh46i0v2"
}

200

Success response

Errors

Code Description
400 Incorrect request
500 A techinal trouble in our system

Hotels data API

Displays the cost of living in hotels

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook/v1/cached_prices?location=Saint-Petersburg&hotelId=277083&checkIn=2021-12-13&checkOut=2021-12-18&currency=rub&limit=1'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook/v1/cached_prices?location=Saint-Petersburg&hotelId=277083&checkIn=2021-12-13&checkOut=2021-12-18&currency=rub&limit=1")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook/v1/cached_prices?location=Saint-Petersburg&hotelId=277083&checkIn=2021-12-13&checkOut=2021-12-18&currency=rub&limit=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook/v1/cached_prices?location=Saint-Petersburg&hotelId=277083&checkIn=2021-12-13&checkOut=2021-12-18&currency=rub&limit=1")
print(response.text)

The request is used to get the price of hotel rooms from the cache for the period. It doesn't contain information about room availability.

HTTP Request

GET https://api.travelpayouts.com/hotellook/v1/cached_prices?location=Saint-Petersburg&hotelId=277083&checkIn=2021-12-13&checkOut=2021-12-18&currency=rub&limit=1

Run in Postman

Query Parameters

Parameter Type Default Required Description
location string true IATA or name of a location.
checkIn string true A date of checkin.
checkOut string true A date of checkout.
locationId string false An identifier of the location, can be used instead of the location.
hotelId string true A hotel identifier.
adults integer 2 false Number of adults.
children integer 0 false Number of children (2 to 18 years).
infants integer 0 false Number of infants (0 to 2 years).
limit integer 4 false Limitation of output results from 1 to 8.
currency string rub false An currency in which prices will be given.

Response

Sample response

{
  "hotelId": 277083,
  "hotelName": "Saint-Petersburg Hotel",
  "location": {
    "country": "Russia",
    "geo": {
      "lat": 59.95,
      "lon": 30.316667
    },
    "name": "St. Petersburg",
    "state": null
  },
  "locationId": 12196,
  "priceAvg": 32875,
  "priceFrom": 32875,
  "pricePercentile": {
    "10": 32875,
    "3": 32875,
    "35": 32875,
    "50": 32875,
    "75": 32875,
    "99": 32875
  },
  "stars": 4
}

200

Success response

Field Type Description
priceAvg integer Average price for a hotel room.
priceFrom integer A minimal price
stars integer Stars count
hotelId integer Identificator of a hotel.
hotelName string Hotel name
location.name string Location name
location.state string The state in which the city is located
location.country string A country name.
location.geo.lat float A latitude.
location.geo.lon float A longitude.
locationId integer Identificator of the location where a hotel is located.

Errors

Code Description

Hotels Selections

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook/v1/hotels?check_in=2021-12-02&check_out=2021-12-17&currency=rub&language=ru&id=12209&type=popularity&limit=1'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook/v1/hotels?check_in=2021-12-02&check_out=2021-12-17&currency=rub&language=ru&id=12209&type=popularity&limit=1")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook/v1/hotels?check_in=2021-12-02&check_out=2021-12-17&currency=rub&language=ru&id=12209&type=popularity&limit=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook/v1/hotels?check_in=2021-12-02&check_out=2021-12-17&currency=rub&language=ru&id=12209&type=popularity&limit=1")
print(response.text)

The request recovers the list of specific hotels according to the ID of a location. A collection is formed according to the specified period. If the period is not specified, a collection shall be formed from the hotels found for the last three days.

HTTP Request

GET https://api.travelpayouts.com/hotellook/v1/hotels?check_in=2021-12-02&check_out=2021-12-17&currency=rub&language=ru&id=12209&type=popularity&limit=1

Run in Postman

Query Parameters

Parameter Type Default Required Description
check_in string true A date of checkin.
check_out string true A date of checkout.
currency string true An currency in which prices will be given.
language string en true A language in which result will be given (ru, en, th, de, es, fr, it, pl).
limit integer 10 false limitation of output results from 1 to 100, default - 10
type string false A selection type. See /hotellook/v1/selection_types
id string false A city identifier.

Response

Sample response

{
  "popularity": [
    {
      "distance": 4.29,
      "has_wifi": true,
      "hotel_id": 46455041,
      "hotel_type": [
        "Городской отель",
        "Отель для индивидуальных путешественников"
      ],
      "last_price_info": {
        "insertion_time": 1638010682,
        "nights": 15,
        "price": 59752,
        "price_pn": 3983,
        "search_params": {
          "adults": 2,
          "checkIn": "2021-12-02",
          "checkOut": "2021-12-17",
          "children": []
        }
      },
      "name": "Хилтон Гарден Инн Уфа Риверсайд",
      "property_type": "hotel",
      "rating": 94,
      "stars": 4,
      "ty_summary": "Превосходный городской отель. Удобно осматривать достопримечательности, рядом есть парковки. Отличные номера и фантастический сервис. Великолепная атмосфера."
    }
  ]
}

200

Success response

Field Type Description
last_price_info.insertion_time integer Time, when the collection was found
last_price_info.nights integer Number of nights
last_price_info.price integer Price of accommodation during the whole period with a discount
distance float distance from the city’s center (km)
hotel_id integer A hotel identifier
name string A hotel's name
property_type string A type of an accomodation.
rating float hotel’s rating, assigned by its visitors
stars integer number of stars
ty_summary string Short description about hotel.
has_wifi boolean Availability of Wi-Fi
hotel_type []string Description of a hotel’s type

Errors

Code Description

Hotel search by name or location

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook/v1/lookup?query=moscow&lang=ru&lookFor=both&limit=1'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook/v1/lookup?query=moscow&lang=ru&lookFor=both&limit=1")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook/v1/lookup?query=moscow&lang=ru&lookFor=both&limit=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook/v1/lookup?query=moscow&lang=ru&lookFor=both&limit=1")
print(response.text)

Search for a specific location or name places of a hotel (city, island).

HTTP Request

GET https://api.travelpayouts.com/hotellook/v1/lookup?query=moscow&lang=ru&lookFor=both&limit=1

Run in Postman

Query Parameters

Parameter Type Default Required Description
query string true It can be set as a text, for instance: query=moscow or as a coordinates: query=54.32,41.32.
lang string en false Display language. It can take any iso-language code (pt, en, fr, de, id, it, pl, es, th, ru); if the database doesn’t include a translation for the requested language, it returns the English name of the object.
lookFor string both false Objects displayed in the results: city, hotel or both.
limit integer 10 false Limitation of output results from 1 to 10.
convertCase integer 1 false Automatically change the keyboard layout (actual for Russian users, for example, when requesting "vjcrdf" will be found "москва"). Values - 1 or 0.

Response

Sample response

{
  "result": {
    "hotels": [
      {
        "fullName": "AZIMUT Отель Олимпик Москва, Москва, Россия",
        "id": "333526",
        "label": "AZIMUT Отель Олимпик Москва",
        "location": {
          "lat": 55.752041,
          "lon": 37.617508
        },
        "locationId": 12153,
        "locationName": "Москва, Россия"
      }
    ],
    "locations": [
      {
        "cityName": "Москва",
        "countryCode": "RU",
        "countryName": "Россия",
        "fullName": "Москва, Россия",
        "hotelsCount": "3557",
        "iata": [
          "MOW",
          "ZIA",
          "SVO",
          "VKO",
          "DME"
        ],
        "id": 12153,
        "location": {
          "lat": 55.752041,
          "lon": 37.617508
        }
      }
    ]
  },
  "status": "ok"
}

200

Success response

Field Type Description
result.hotels
result.locations []object List of found locations.
status string Status of the request.

Errors

Code Description

The types of hotel collections

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook/v1/selection_types?id=12209'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook/v1/selection_types?id=12209")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook/v1/selection_types?id=12209",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook/v1/selection_types?id=12209")
print(response.text)

The request recovers the list of all available separate collections. This type is used to search for hotels with a discount.

HTTP Request

GET https://api.travelpayouts.com/hotellook/v1/selection_types?id=12209

Run in Postman

Query Parameters

Parameter Type Default Required Description
id integer true An identifier of a city

Response

Sample response

[
  "center",
  "tophotels",
  "highprice",
  "luxury",
  "3-stars",
  "4-stars",
  "5-stars",
  "pool",
  "pets",
  "restaurant",
  "river_view",
  "cheaphotel_ufa",
  "luxury_ufa",
  "price",
  "rating",
  "distance",
  "popularity",
  "0stars",
  "1stars",
  "2stars",
  "3stars",
  "4stars",
  "5stars"
]

200

Success response

Field Type Description
pool string Availability of the own pool.
rating string Hotels with the highest rating.
restaurant string Availability of the own restaurant.
3stars string Manually formed collections with the corresponding number of stars
5-stars string Automatic searching of the hotels, having 5 stars.
center string Hotels, located in the center of a city
highprice string Most expensive hotels
luxury string Luxury hotels.
5stars string Manually formed collections with the corresponding number of stars
cheaphotel string Cheapest hotels.
pets string Opportunity to live with the pets.
tophotels string Best hotels
popularity string Popularity of a hotel
price string Manually formed collections by the price.
0stars string Manually formed collections with the corresponding number of stars
1stars string Manually formed collections with the corresponding number of stars
3-stars string Automatic searching of the hotels, having 3 stars.
4-stars string Automatic searching of the hotels, having 4 stars.
distance string Distance from an airport
2stars string Manually formed collections with the corresponding number of stars
4stars string Manually formed collections with the corresponding number of stars

Errors

Code Description

List of hotels in the archive

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v1/hotels?language=en'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v1/hotels?language=en")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v1/hotels?language=en",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v1/hotels?language=en")
print(response.text)

This request return the file with a list of all hotels for the specified locale.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v1/hotels?language=en

Run in Postman

Query Parameters

Parameter Type Default Required Description
language string true A language in which result will be given (ru, en, th, de, es, fr, it, pl).

Response

200

Success response

Errors

Code Description

Hotels glossary

Amenities

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v1/amenities?locale=en'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v1/amenities?locale=en")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v1/amenities?locale=en",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v1/amenities?locale=en")
print(response.text)

The request returns a file with a list of amenities from the database.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v1/amenities?locale=en

Run in Postman

Query Parameters

Parameter Type Default Required Description
locale string true A language that you want to see result (en, ru, fr, de and etc).

Response

Sample response

[
  {
    "groupName": "Room",
    "id": "2",
    "name": "Hairdryer"
  }
]

200

Success response

Field Type Description
groupName string An amenity's location.
id string An amenity's identifier.
name string An translated amenity's name.

Errors

Code Description

Cities

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v1/cities'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v1/cities")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v1/cities",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v1/cities")
print(response.text)

The request returns a file with a list of cities from the database.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v1/cities

Run in Postman

Query Parameters

Parameter Type Default Required Description

Response

Sample response

[
  {
    "code": "",
    "countryId": "77",
    "id": "373",
    "latitude": "15.501950000",
    "longitude": "73.910090000",
    "name": {
      "EN": [
        {
          "isVariation": "0",
          "name": "Goa"
        }
      ],
      "RU": [
        {
          "isVariation": "0",
          "name": "Гоа"
        }
      ]
    }
  }
]

200

Success response

Field Type Description
code string A city's IATA code.
countryId string A country's identifier.
id string A city's identifier.
latitude string A latitude value.
longitude string A longitude value.
name.locale.isVariation string Flag which specifies is secondary title (1) or primary (0).
name.locale.name string Translated city's name.

Errors

Code Description

City photo

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v1/city_photo?width=960&height=720&city=LED'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v1/city_photo?width=960&height=720&city=LED")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v1/city_photo?width=960&height=720&city=LED",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v1/city_photo?width=960&height=720&city=LED")
print(response.text)

The request returns a city photos from the database.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v1/city_photo?width=960&height=720&city=LED

Run in Postman

Query Parameters

Parameter Type Default Required Description
width integer true Photo width.
height integer true Photo height.
city string true IATA code of the city.

Response

Errors

Code Description

Countries

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v1/countries'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v1/countries")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v1/countries",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v1/countries")
print(response.text)

The request returns a file with a list of countries from the database.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v1/countries

Run in Postman

Query Parameters

Parameter Type Default Required Description

Response

Sample response

[
  {
    "code": "DZ",
    "id": "9",
    "name": {
      "EN": [
        {
          "isVariation": "0",
          "name": "Algeria"
        }
      ],
      "RU": [
        {
          "isVariation": "0",
          "name": "Алжир"
        }
      ]
    }
  }
]

200

Success response

Field Type Description
code string A country's ISO code.
id string A country's identifier.
name.locale.isVariation string Flag which specifies is secondary title (1) or primary (0).
name.locale.name string Translated country's name.

Errors

Code Description

Hotel Photos

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v1/hotel_photos?id=27926056,4'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v1/hotel_photos?id=27926056,4")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v1/hotel_photos?id=27926056,4",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v1/hotel_photos?id=27926056,4")
print(response.text)

The request returns a hotel photos from the database.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v1/hotel_photos?id=27926056,4

Run in Postman

Query Parameters

Parameter Type Default Required Description
id string true Hotels identifiers indicated through a comma.

Response

Sample response

{
  "27926056": [
    7505789398,
    7505803908
  ],
  "4": [
    5162091534,
    5162091993
  ]
}

200

Success response

Field Type Description
key string A hotel identifier.
value []integer Photos identifiers.

Errors

Code Description

Hotel Types

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v1/hotel_types?language=en'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v1/hotel_types?language=en")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v1/hotel_types?language=en",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v1/hotel_types?language=en")
print(response.text)

The request returns a file with a list of the hotel type from the database.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v1/hotel_types?language=en

Run in Postman

Query Parameters

Parameter Type Default Required Description
language string true A language that you want to see result (en, ru, fr, de and etc).

Response

Sample response

{
  "0": "Other",
  "1": "Hotel",
  "2": "Apartment Hotel"
}

200

Success response

Field Type Description
value string A translated room type name.
key string A room type identifier.

Errors

Code Description

Hotel's room photos

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v1/room_photos?hotel_id=4&room_type_id=1&first_width=100&rest_width=30&count=3&format=.auto'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v1/room_photos?hotel_id=4&room_type_id=1&first_width=100&rest_width=30&count=3&format=.auto")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v1/room_photos?hotel_id=4&room_type_id=1&first_width=100&rest_width=30&count=3&format=.auto",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v1/room_photos?hotel_id=4&room_type_id=1&first_width=100&rest_width=30&count=3&format=.auto")
print(response.text)

The request returns a hotel's rooms photos from the database.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v1/room_photos?hotel_id=4&room_type_id=1&first_width=100&rest_width=30&count=3&format=.auto

Run in Postman

Query Parameters

Parameter Type Default Required Description
hotel_id integer true A hotel identifier.
room_type_id integer true A room type identifier.
first_width integer true Width of the first photo in the sprite.
rest_width integer true Width of the rest of the photos in the sprite.
count integer true Number of photos of the room type minus one. For example, if the answer is that photographs of this type have four pieces, it indicates three instead of this parameter.
format string true .jpeg - the image will be in JPEG format. .auto - the server will provide a WebP image format.

Response

Errors

Code Description

Room Types

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v1/room_types?language=en'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v1/room_types?language=en")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v1/room_types?language=en",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v1/room_types?language=en")
print(response.text)

The request returns a file with a list of the room type from the database.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v1/room_types?language=en

Run in Postman

Query Parameters

Parameter Type Default Required Description
language string true A language that you want to see result (en, ru, fr, de and etc).

Response

Sample response

{
  "15": "Business",
  "18": "Bungalow",
  "8": "Apartment"
}

200

Success response

Field Type Description
key string A room type identifier.
value string A translated room type name.

Errors

Code Description

Hotels

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_static/v2/hotels?city_id=895'
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_static/v2/hotels?city_id=895")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_static/v2/hotels?city_id=895",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_static/v2/hotels?city_id=895")
print(response.text)

The request returns a file with a list of the hotels from the database.

HTTP Request

GET https://api.travelpayouts.com/hotellook_static/v2/hotels?city_id=895

Run in Postman

Query Parameters

Parameter Type Default Required Description
city_id integer false A hotel city identifier.

Response

Sample response

{
  "gen_timestamp": 1510729858.8067338,
  "hotels": [
    {
      "address": {
        "en": "Sayonara Resorts - Pallemalala , Weligatta , Hambantota.",
        "ru": "Sayonara Resorts - Pallemalala , Weligatta , Hambantota., Тиссамахарама"
      },
      "checkIn": "14:00",
      "checkOut": "12:00",
      "cityId": 895,
      "cntFloors": null,
      "cntRooms": null,
      "cntSuites": null,
      "distance": 6,
      "facilities": [
        7
      ],
      "id": 1399511245,
      "link": "/lk/weerawila-895/sayonara_resorts-1399511245.html",
      "location": {
        "lat": 6.208641,
        "lon": 81.201033
      },
      "name": {
        "en": "Sayonara Resorts"
      },
      "photoCount": 9,
      "photos": [
        {
          "height": 240,
          "url": "http://photo.hotellook.com/image_v2/limit/h1399511245_8/320/240.auto",
          "width": 320
        }
      ],
      "photosByRoomType": {},
      "poi_distance": {
        "70642": 96987,
        "70643": 99193,
        "70650": 57116
      },
      "popularity": 900,
      "pricefrom": 30,
      "propertyType": 6,
      "rating": 0,
      "shortFacilities": [],
      "stars": 0,
      "yearOpened": null,
      "yearRenovated": null
    }
  ],
  "pois": [
    {
      "category": "airport",
      "confirmed": true,
      "geom": {
        "coordinates": [
          80.33305,
          5.983056
        ],
        "type": "Point"
      },
      "id": 70643,
      "location": {
        "lat": 5.983056,
        "lon": 80.33305
      },
      "name": "Koggala Airport",
      "rating": 0
    }
  ]
}

200

Success response

Field Type Description
gen_timestamp float A POSIX timestamp when data was updated.
pois.category string A place category.
pois.confirmed boolean The flag specifies if a place is confirmed.
pois.geom.coordinates []float The coordinates (longitude, latitude).
pois.geom.type string A place type
pois.id integer A place identifier.
pois.location.lon float A longitude value.
pois.location.lat float A latitude value.
pois.rating integer A place rating.

Errors

Code Description

Hotels search

Search by hotel IATA-code or cityId (ID location), or hotelId (ID hotel). All options or just one can be specified. If you specify hotelId and cityId, only hotelId will be used. If you specify iata and cityId, iata will be used.

When using this search, it is possible to access its results not immediately, but after a period of time not exceeding 15 minutes. Handling is on the request ID searchId.

Attention! The default number of requests is limited to 200 requests per hour for one IP address. If you need to process more requests, send a note to support@travelpayouts.com.

More information about the signature is available here

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_search/v1/create_search?start.json?iata=HKT&checkIn=2018-08-10&checkOut=2018-08-13&adultsCount=2&customerIP=100.168.1.1&childrenCount=1&childAge1=8&lang=ru&currency=USD&waitForResult=0&marker=&signature='
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_search/v1/create_search?start.json?iata=HKT&checkIn=2018-08-10&checkOut=2018-08-13&adultsCount=2&customerIP=100.168.1.1&childrenCount=1&childAge1=8&lang=ru&currency=USD&waitForResult=0&marker=&signature=")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_search/v1/create_search?start.json?iata=HKT&checkIn=2018-08-10&checkOut=2018-08-13&adultsCount=2&customerIP=100.168.1.1&childrenCount=1&childAge1=8&lang=ru&currency=USD&waitForResult=0&marker=&signature=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_search/v1/create_search?start.json?iata=HKT&checkIn=2018-08-10&checkOut=2018-08-13&adultsCount=2&customerIP=100.168.1.1&childrenCount=1&childAge1=8&lang=ru&currency=USD&waitForResult=0&marker=&signature=")
print(response.text)

Create search on the server and get a search identifier.

HTTP Request

GET https://api.travelpayouts.com/hotellook_search/v1/create_search?start.json?iata=HKT&checkIn=2018-08-10&checkOut=2018-08-13&adultsCount=2&customerIP=100.168.1.1&childrenCount=1&childAge1=8&lang=ru&currency=USD&waitForResult=0&marker=&signature=

Run in Postman

Query Parameters

Parameter Type Default Required Description
iata string true A city IATA code.
checkIn string true Check-in date (format: YYYY-MM-DD).
checkOut string true Check-out date (format: YYYY-MM-DD).
adultsCount integer true Adults count.
customerIP string true IP of a user who initiated the request.
childrenCount integer true Children count.
childAge* integer 0 false childAge1..n - where n = childrenCount, ages of children (if childrenCount greater than 0). The default age is 1 year (max = 17).
lang string true The language of the search result. Stated together with the region. (en_US, en_GB, ru_RU, de_DE, en_AU, en_CA, en_IE, es_ES, fr_FR, it_IT, pl_PL, th_TH)
currency string true The currency in which the prices will be given.
waitForResult integer 0 false Wait for the completion of all searches for partners, possible values 0 or 1. 1 – the connection is open before all the data from the partners. The result is returned to the user query and its searchId. 0 – the connection will be terminated immediately and returned to the user searchId.
marker string true Value of your marker.
signature string true Value of the signature.

Response

Sample response

{
  "searchId": "5201179",
  "status": "ok"
}

200

Success response

Field Type Description
searchId string Search identifier.
status string Status of the request.

Errors

Code Description

Search result

Sample request

curl --request GET \
  --url 'https://api.travelpayouts.com/hotellook_search/v1/result?searchId=4034914&limit=10&sortBy=price&sortAsc=1&roomsCount=0&offset=0&marker=&signature='
require 'uri'
require 'net/https'

url = URI("https://api.travelpayouts.com/hotellook_search/v1/result?searchId=4034914&limit=10&sortBy=price&sortAsc=1&roomsCount=0&offset=0&marker=&signature=")
request = Net::HTTP::Get.new(url)
response = https.request(request)

puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.travelpayouts.com/hotellook_search/v1/result?searchId=4034914&limit=10&sortBy=price&sortAsc=1&roomsCount=0&offset=0&marker=&signature=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
import requests
response = requests.get("https://api.travelpayouts.com/hotellook_search/v1/result?searchId=4034914&limit=10&sortBy=price&sortAsc=1&roomsCount=0&offset=0&marker=&signature=")
print(response.text)

Get search result by a search identifier.

HTTP Request

GET https://api.travelpayouts.com/hotellook_search/v1/result?searchId=4034914&limit=10&sortBy=price&sortAsc=1&roomsCount=0&offset=0&marker=&signature=

Run in Postman

Query Parameters

Parameter Type Default Required Description
searchId string true The search identifier.
limit integer 0 false Maximum number of hotels, from 0 to infinity, where 0 - no limit.
offset integer 0 false To skip a number of hotels from 0 to infinity, where 0 - no hotel not passed.
sortBy string popularity false How to sort (popularity, price, name, guestScore, stars).
sortAsc integer 1 false 1 - ascending, 0 - descending.
roomsCount integer 0 false Maximum number of rooms that are returned in each hotel, from 0 to infinity, where 0 - no limit.
marker string true Value of your marker.
signature string true Value of the signature.

Response

Sample response

{
  "result": [
    {
      "address": "23/8 Soi Hub-Aik, Phuket Road, Muang District",
      "amenities": [],
      "distance": 10.6,
      "fullUrl": "http://search.hotellook.com/?language=ru\u0026marker=16886\u0026hotelId=362691",
      "guestScore": 63,
      "id": 362691,
      "location": {
        "lat": 7.878922,
        "lon": 98.39146
      },
      "maxPrice": 138,
      "maxPricePerNight": 46,
      "minPriceTotal": 40,
      "name": "Rome Place Hotel",
      "photoCount": 50,
      "popularity": 47,
      "price": 13,
      "rating": 63,
      "rooms": [
        {
          "agencyId": "43",
          "agencyName": "Travel.ru",
          "bookingURL": "/r/?language=ru\u0026checkIn=2015-06-10¤cy=USD\u0026children=5\u0026host=v2%3A16886\u0026marker=16886\u0026transparent=1\u0026roomId=0\u0026adults=2\u0026locationId=30553\u0026checkOut=2015-06-13\u0026gateId=43\u0026hotelId=362691",
          "desc": "Double or Twin STANDARD",
          "fullBookingURL": "http://search.hotellook.com/r?language=ru\u0026checkIn=2015-06-10\u0026cy=USD\u0026children=5\u0026host=v2%3A16886\u0026marker=16886\u0026transparent=1\u0026roomId=0\u0026adults=2\u0026locationId=30553\u0026checkOut=2015-06-13\u0026gateId=43\u0026hotelId=362691",
          "internalTypeId": "1",
          "options": {
            "available": 5,
            "breakfast": false,
            "deposit": true,
            "refundable": false
          },
          "price": 13,
          "tax": 0,
          "total": 40,
          "type": ""
        }
      ],
      "stars": 3,
      "url": "/search/?marker=16886\u0026hotelId=362691"
    }
  ],
  "status": "ok"
}

200

Success response

Field Type Description
amenities []string Amenities list.
distance float Distance from the hotel to the center (km).
guestScore integer The travelers' rating
maxPrice integer The highest price of the hotel rooms.
minPriceTotal integer Minimum price for a day.
fullUrl string A hotel link with partner's marker.
photoCount integer Hotel photos count.
popularity integer Popularity of the hotel.
rooms.internalTypeId string Grouping by type of rooms.
rooms.total integer The rate for all time.
rooms.type string Room type.
rooms.bookingURL string Link to the booking website.
rooms.agencyName string Booking agency name.
rooms.desc string Room's description.
rooms.fullBookingURL Complete link to book with filled all data about users (date of check In and check out, number of adults and childrens, currency and ets).
rooms.options.freeWifi boolean Whether there is free wifi in the room.
rooms.options.hotelWebsite boolean The proposal leads to the official hotel website.
rooms.options.refundable boolean To specifies if a booking has free cancellation.
rooms.options.smoking boolean Can smoke in the room.
rooms.options.available integer Available rooms count.
rooms.options.breakfast boolean Whether breakfast included in the rate or not.
rooms.options.cardRequired integer Without reservation card, if 0 - you can book without card and then pay at partners.
rooms.options.deposit integer Payment directly on the site.
rooms.price integer The daily room rate.
rooms.tax integer Agency tax.
rooms.agencyId string Booking agency identifier.
stars integer Stars count of the hotel.
id integer Hotel identifier.
price integer Daily room rate.
address string The hotel's address
location.lat float A latitude value.
location.lon float A longitude value.
maxPricePerNight integer Maximum price per night.
name string Hotel name.
url string A hotel link without domain.

Errors

Code Description