API Documentation

Resource Group

Travel_tip API

  • endpoint: https://api.skypicker.com/travel_tip

  • method: GET

Please note: Traveltip endpoint does not support multicity.

traveltip API

traveltip_info

GET https://api.skypicker.com/travel_tip?fly_from=CZ&fly_to=porto&date_from=08/08/2017&date_to=08/09/2017&nights_in_dst_from=2&nights_in_dst_to=14&return_from=08/08/2017&return_to=08/09/2017&price=9223372036854775807&stops=10&max_fly_duration=6&flight_type=oneway&adults=1&children=0&infants=0&fly_days=[0,1,2,3,4,5,6]&fly_days_type=departure&ret_fly_days=[0,1,2,3,4,5,6]&ret_fly_days_type=departure&one_for_city=0&only_working_days=0&only_weekends=0&one_per_date=0&locale=en&partner=picky&partner_market=us&v=3&xml=0&curr=EUR&price_from=1&price_to=10000&dtime_from=00:00&dtime_to=00:00&atime_from=00:00&atime_to=00:00&ret_dtime_from=00:00&ret_dtime_to=00:00&ret_atime_from=00:00&ret_atime_to=00:00&stopover_from=00:00&stopover_to=00:00&max_stopovers=2&conn_on_diff_airport=1&ret_from_diff_airport=1&ret_to_diff_airport=1&select_airlines=FR,AA&select_stop_airport=BCN,FRA&select_airlines_exclude=False&select_stop_airport_exclude=False&limit=30&sort=price&asc=1
Responses200422
Headers
Content-Type: application/json
Body
{
"tips": [
    {
        "search_params_changed": {
            "fly_from": "48.148596-17.107748-28km"
        },
        "type": "cheaper-origin",
        "itinerary":
        { "itinerary": {
          "aTimeUTC": 1561114500,
          "mapIdfrom": "bratislava_sk",
          "has_airport_change": false,
          "p3": 1,
          "price": 53,
          "hashtags": [
            "morning",
            "friday",
            "direct",
            "duration:3-4",
            "departure:9-10"
          ],
          "distance": 1854.0,
          "conversion": {
            "EUR": 53
          },
          "bags_price":
          {
            "1": 25.0,
            "2": 50.0
          },
          "cityTo": "Madrid",
          "transfers": [

          ],
          "flyFrom": "BTS",
          "id": "19338210509734587_0",
          "duration": {
            "total": 10800,
            "return": 0,
            "departure": 10800
          },
          "dTimeUTC": 1561103700,
          "p2": 1,
          "countryFrom": {
            "code": "SK",
            "name": "Slovensko"
          },
          "p1": 1,
          "mapIdto": "madrid_es",
          "quality": 88.99991,
          "nightsInDest": null,
          "dTime": 1561110900,
          "found_on": [
            "deprecated"
          ],
          "airlines": [
            "FR"
          ],
          "booking_token": "oKWrjE3p79Fphzv+baF3C2h1PDgCet9WaEXSzPuPgCEAv+on9q2YST/DjPlyl3WZuKwoHy5r5npNKffSIiTmgLyppvOybJWJe9U+Fv6sssKhrhbIqGfIIxlVwIHRi2UtuJOFzo2xsQt8GAjDu8xe9x8/6KZdZm8j2+Vw7GRRweV+82XkWNOpPDTd7o51ay0cUwSDMP0PMWgxiZs3RhPSLQJbK69Or/0qi35oEilVP7OQX7CqunQRy3SCEPkVwLLPtRSABYtHcoWtvSfEJHg3Z+EhPtFhWZo6f3NvYq2KjzwvxLdQgD4tYZD7pfapPaEDVrsFurmW/v4vVhslarDnJe9Us08cxdpHk6dowZ7/w1TtOtW32qGncuGs2RL8ICEQRjgeWzqtAi8OqAMfJ++KMKGZ/4bux7/LWuoZC0VrDx9KqfKz5gaVfNywBiFjlG+y76u1gJDNk3bOj3FQ2aog47kzH3ch0hBX0XjwvxUtMQEXZg8zi5ljrOqzzGCIhrhc4NoywVRkLnCw4Rp59Tt35KW95pqz50ArzbF14jfLAHh6nFBAH2mL3cwzPs/XrcPNMSuG6U8vxwPhVB28HLewG8ht2r/wCqj9lwMbmLjXTZrimbYsCznPQlEH8E9dCz/RGzoul/ICTYIPwJbVpGQE8gXxBC9AXtrjNUy2k3YvjlmbT5OG5zHHXpdwNEq2Z1ZEjr3WQiZKwB8cxAcd/tHlG0dRLcqpsmQDZTDei3mwGJk=",
          "flyTo": "MAD",
          "pnr_count": 1,
          "fly_duration": "3h 0m",
          "facilitated_booking_available": false,
          "routes": [
            [
              "BTS",
              "MAD"
            ]
          ],
          "cityFrom": "Bratislava",
          "aTime": 1561121700,
          "countryTo": {
            "code": "ES",
            "name": "Španielsko"
          },
          "route": [
            {
              "aTimeUTC": 1561114500,
              "refresh_timestamp": 1546579168,
              "bags_recheck_required": false,
              "return": 0,
              "latTo": 40.493611,
              "flight_no": 2516,
              "price": 1,
              "original_return": 0,
              "operating_carrier": null,
              "cityTo": "Madrid",
              "mapIdfrom": "bratislava_sk",
              "lngFrom": 17.212778,
              "vehicle_type": "aircraft",
              "flyFrom": "BTS",
              "id": "19338210509734587_0",
              "dTimeUTC": 1561103700,
              "equipment": null,
              "mapIdto": "madrid_es",
              "combination_id": "19338210509734587",
              "dTime": 1561110900,
              "fare_family": "",
              "found_on": "deprecated",
              "flyTo": "MAD",
              "source": "deprecated",
              "latFrom": 48.170278,
              "airline": "FR",
              "fare_classes": "A",
              "lngTo": -3.566667,
              "cityFrom": "Bratislava",
              "last_seen": 1546579168,
              "aTime": 1561121700,
              "guarantee": false,
              "fare_basis": "AZ10LOW"
            }
          ],
          "baglimit":
                {
            "hold_weight": 20
                }
                }
                }
            ]
        }
    },
    {
        "search_params_changed": {
            "fly_from": "48.148596-17.107748-59km"
        },
        "type": "faster-origin",
        "itinerary": { THE SAME STRUCTURE AS ABOVE. }
        },
    {
        "search_params_changed": {
            "date_from": "19/06/2019",
            "date_to": "23/06/2019"
        },
        "type": "cheaper-date",
        "itinerary": { THE SAME STRUCTURE AS ABOVE. }
    },
    {
        "search_params_changed": {
            "date_from": "19/06/2019",
            "date_to": "23/06/2019"
        },
        "type": "faster-date",
        "itinerary": { THE SAME STRUCTURE AS ABOVE. }
    }
]
}
Headers
Content-Type: application/json
Body
{
  "message": [
    {
      "errors": [
        "Not recognized location: `XXX`"
      ],
      "param": "fly_to"
    }
  ]
}

Traveltip API
GET/travel_tip{?fly_from,fly_to,date_from,date_to,nights_in_dst_from,nights_in_dst_to,return_from,return_to,price,stops,max_fly_duration,flight_type,adults,children,infants,fly_days,fly_days_type,ret_fly_days,ret_fly_days_type,one_for_city,only_working_days,only_weekends,one_per_date,locale,partner,partner_market,v,xml,curr,price_from,price_to,dtime_from,dtime_to,atime_from,atime_to,ret_dtime_from,ret_dtime_to,ret_atime_from,ret_atime_to,stopover_from,stopover_to,max_stopovers,conn_on_diff_airport,ret_from_diff_airport,ret_to_diff_airport,select_airlines,select_stop_airport,select_airlines_exclude,select_stop_airport_exclude,limit,sort,asc}

The responses are G-zipped and need to be unpacked (response header Content-Encoding: gzip).

Response parameters

Each response will contain between 0 and 4 traveltips (maximum of 1 traveltip per type).

  • type - the type can have one of the following values:

    • cheaper_origin_tip - this will be displayed when the price of the tip is cheaper than the price in the price parameter
    • cheaper_date_tip - this will be displayed when the price of the tip is cheaper than the price in the price parameter
    • faster_origin_tip - this will be displayed when the number of stopovers is lower that the number specified in the stops parameter
    • faster_date_tip - this will be displayed when the number of stopovers is lower that the number specified in the stops parameter

  • search_params_changed - this is a dictionary {KEY:VALUE} where KEY is the parameter from the original ‘/flights’ request which needs to be changed to the VALUE to get the travel tip.

    • When the value of the type parameter is ‘cheaper_date_tip’ or ‘faster_date_tip’ then CHANGES are:
    {
        'date_from': DD/MM/YYYY,
        'date_to': DD/MM/YYYY,
    }
    
    • When the value of the type parameter is ‘cheaper_date_tip’ or ‘faster_date_tip’ then CHANGES are:
      • In case of original multiplace request LOCATION is a IATA code of the tip.
      • If not multiplace request then LOCATION is in format {lat}-{lon}-{radius}km
    {
        'fly_from': LOCATION
    }
    


  • itinerary - the itinerary of the trip. This parameter is the same as the itinerary parameter in Flights API response.

URI Parameters
HideShow
fly_from
string (required) Example: CZ

Kiwi api ID of the departure location.

It accepts multiple values separated by comma, these values might be airport codes, city IDs, two letter country codes, metropolitan codes and radiuses as well as subdivision, region, autonomous_territory, continent and specials (Points of interest, such as Times Square).

Some locations have the same code for airport and metropolis (city), e.g. DUS stands for metro code Duesseldorf, Moenchengladbach and Weeze as well as Duesseldorf airport. See the following examples:

  • fly_from=city:DUS will match all airports in “DUS”, “MGL” and “NRN” (all in the city of Duesseldorf)

  • fly_from=DUS will do the same as the above

  • fly_from=airport:DUS will only match airport “DUS” Radius needs to be in form lat-lon-xkm. The number of decimal places for radius is limited to 6. E.g.-23.24--47.86-500km for places around Sao Paulo. ‘LON’ - checks every airport in London, ‘LHR’ - checks flights from London Heathrow, ‘UK’ - flights from the United Kingdom. Link to Locations API. Previous name: flyFrom

fly_to
string (optional) Example: porto

Kiwi api ID of the arrival destination. It accepts the same values in the same format as the fly_from parameter. Previous name: to.

If you don’t include any value you’ll get results for all airports in the world.

v
integer (required) Example: 3

geographical data API version. Default value ‘v=3’.

date_from
string (required) Example: 08/08/2017

search flights from this date (dd/mm/YYYY). Use parameters date_from and date_to as a date range for the flight departure. Previous name: dateFrom Parameters ‘date_from=01/05/2016’ and ‘date_to=30/05/2016’ mean that the departure can be anytime between the specified dates. For the dates of the return flights, use the ‘return_to’ and ‘return_from’ or ‘nights_in_dst_from’ and ‘nights_in_dst_to’ parameters.

date_to
string (required) Example: 08/09/2017

search flights upto this date (dd/mm/YYYY). Previous name: dateTo

return_from
string (optional) Example: 08/08/2017

min return date of the whole trip (dd/mm/YYYY). Previous name: returnFrom

return_to
string (optional) Example: 08/09/2017

max return date of the whole trip (dd/mm/YYYY). Previous name: returnTo

nights_in_dst_from
integer (optional) Example: 2

the minimal length of stay in the destination given in the fly_to parameter. Previous name: daysInDestinationFrom

nights_in_dst_to
integer (optional) Example: 14

the maximal length of stay in the destination given in the fly_to parameter. Previous name: daysInDestinationTo. Either both parameters ‘nights_in_dst_to’ and ‘nights_in_dst_from’ have to be specified or none of them.

price
integer (required) Example: 9223372036854775807

search for trips with lower price than specified in this parameter. The example provided is the default value of sys.maxint.

stops
integer (required) Example: 10

search for tips with lower number of stops than specified in this parameter. 10 is the default value.

max_fly_duration
integer (optional) Example: 6

max flight duration in hours, min value 0. Previous name: maxFlyDuration

flight_type
string (optional) Example: oneway

switch for oneway/round flights search - will be deprecated in the near future (until then, you have to use the round parameter if one from the nights_in_dst of return date parameters is given.) Previous name: typeFlight

Choices: round oneway

one_for_city
boolean (optional) Example: 0

returns the cheapest flights to every city covered by the to parameter. E.g. if you set it to 1 and your search is from PRG to LON/BUD/NYC, you’ll get 3 results: the cheapest PRG-LON, the cheapest PRG-BUD, and the cheapest PRG-NYC. Previous name: oneforcity

one_per_date
boolean (optional) Example: 0

returns the cheapest flights for one date. Can be 0 or not included, or one of these two params can be set to 1

adults
integer (optional) Example: 1

Used to specify the number of adults. Please note, that children are considered adults in our search engine. The default passengers’ value is 1. The sum of adults, children and infants cannot be greater than 9. Previous name: passengers

children
integer (optional) Example: 0

It is used to specify the number of children. The default value is 0. At the moment, children are considered adults in our search engine. We are working on improvements. The sum of adults, children and infants cannot be greater than 9.

infants
integer (optional) Example: 0

It is used to specify number of infants. The default value is 0. The sum of adults, children and infants cannot be greater than 9.

fly_days
list (optional) Example: [0,1,2,3,4,5,6]

the list of week days for the flight, where 0 is Sunday, 1 is Monday, etc. Previous name: flyDays URL encoded format for all days : ‘&fly_days=0&fly_days=1&fly_days=2&…&fly_days=6’

fly_days_type
string (optional) Example: departure

type of set fly_days; It is used to specify whether the flight is an arrival or a departure. Previous name: flyDaysType

Choices: departure arrival

ret_fly_days
list (optional) Example: [0,1,2,3,4,5,6]

the list of week days for the flight, where 0 is Sunday, 1 is Monday, etc. Previous name: returnFlyDays URL encoded format for all days: ‘&ret_fly_days=0&ret_fly_days=1&ret_fly_days=2&…&ret_fly_days=6’

ret_fly_days_type
string (optional) Example: departure

type of set ret_fly_days; It is used to specify whether the flight is an arrival or a departure. Previous name: returnFlyDaysType

Choices: departure arrival

only_working_days
boolean (optional) Example: 0

search flights with departure only on working days. Previous name: onlyWorkingDays. DEPRECATED

only_weekends
boolean (optional) Example: 0

search flights with departure only on weekends. Previous name: onlyWeekends. DEPRECATED

partner
string (required) Example: picky

partner ID. If present, the result will include a link to a specific trip directly to Kiwi.com, with the affiliate ID included (use picky partner ID for testing)

partner_market
string (optional) Example: us

Market from which the request is coming from.

curr
string (optional) Example: EUR

use this parameter to change the currency in the response

Choices: AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BRL BSD BTC BTN BWP BYR BZD CAD CDF CHF CLF CLP CNY COP CRC CUC CUP CVE CZK DJF DKK DOP DZD EEK EGP ERN ETB EUR FJD FKP GBP GEL GGP GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS IMP INR IQD IRR ISK JEP JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LTL LVL LYD MAD MDL MGA MKD MMK MNT MOP MRO MTL MUR MVR MWK MXN MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR QUN RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLL SOS SRD STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD UYU UZS VEF VND VUV WST XAF XAG XAU XCD XDR XOF XPD XPF XPT YER ZAR ZMK ZMW ZWL

locale
string (optional) Example: en

the language of city names in the response and also language of kiwi.com website to which deep_link leads

Choices: ae ag ar at au be bg bh br by ca ca-fr ch cl cn co ct cz da de dk ec ee el en es fi fr gb gr hk hr hu id ie il in is it ja jo jp ko kr kw kz lt mx my nl no nz om pe ph pl pt qa ro rs ru sa se sg sk sr sv th tr tw ua uk us vn za

price_from
integer (optional) Example: 1

result filter, minimal price

price_to
integer (optional) Example: 10000

result filter, maximal price

dtime_from
string (optional) Example: 00:00

result filter, min. departure time (11:00 means 11AM, 23:00 means 11PM). Previous name: dtimefrom

dtime_to
string (optional) Example: 00:00

result filter, max departure time. Previous name: dtimeto

atime_from
string (optional) Example: 00:00

result filter, min arrival time. Previous name: atimefrom

atime_to
string (optional) Example: 00:00

result filter, max arrival time. Previous name: atimeto

ret_dtime_from
string (optional) Example: 00:00

result filter, min dep. time of the returning flight. Previous name: returndtimefrom

ret_dtime_to
string (optional) Example: 00:00

result filter, max dep. time of the returning flight. Previous name: returndtimeto

ret_atime_from
string (optional) Example: 00:00

result filter, min arrival time of the returning flight. Previous name: returnatimefrom

ret_atime_to
string (optional) Example: 00:00

result filter, min arrival time of the returning flight. Previous name: returnatimeto

stopover_from
string (optional) Example: 00:00

result filter, min length of stopover, 48:00 means 2 days (48 hours). Previous name: stopoverfrom

stopover_to
string (optional) Example: 00:00

result filter, max length of stopover, 48:00 means 2 days (48 hours). Previous name: stopoverto

max_stopovers
integer (optional) Example: 2

max number of stopovers. Previous name: maxstopovers

conn_on_diff_airport
integer (optional) Example: 1

whether or not to search for connections on different airport, can be set to 0 or 1, 1 is default. Previous name: connectionsOnDifferentAirport

ret_from_diff_airport
integer (optional) Example: 1

whether or not to search for flights leaving from a different airport than where the customer landed, can be set to 0 or 1, 1 is default. Previous name: returnFromDifferentAirport

ret_to_diff_airport
integer (optional) Example: 1

whether or not to search for flights returning to a different airport than the one from where the customer departed, can be set to 0 or 1, 1 is default. Previous name: returnToDifferentAirport

select_airlines
string (optional) Example: FR,AA

a list of airlines (IATA codes) separated by ‘,’ (commas) that should / should not be included in the search… Previous name: selectedAirlines The selection or omission of the airline depends on the ‘select_airlines_exclude’ parameter. Select a list of airlines and use the ‘select_airlines_exclude’ parameter to specify whether or not the selected airlines should be excluded/included in the search.

select_airlines_exclude
boolean (optional) Example: False

it can be thought of as a switch for the ‘select_airlines’ parameter where ‘False=select’ and ‘True=omit’. If set to true the search returns combinations without the airlines specified in the parent parameter select_airlines. If set to false the search returns combinations where none of the flights in this combinations is served by any given airline code. Previous name: selectedAirlinesExclude

select_stop_airport
string (optional) Example: BCN,FRA

a list of stopover airports (IATA codes) separated by ‘,’ (commas) that should / should not be included. Previous name: selectedStopoverAirports in the search. The selection or omission of the airport depends on the ‘select_stop_airport_exclude’ parameter. Select a list of airports and use the ‘select_stop_airport_exclude’ parameter to specify whether or not the selected airport should be excluded/included in the search.

select_stop_airport_exclude
boolean (optional) Example: False

It can be thought of as a switch for the ‘select_stop_airport’ parameter where ‘False=include,select’ and ‘True=exclude,omit’. If set to true the search returns combinations where a stopover is through one of the given airports. If is set to false the search returns combinations where none of stopovers is through any of given airports. Previous name: selectedStopoverAirportsExclude

limit
integer (optional) Example: 30

limit number of results, max is 200

sort
string (optional) Example: price

sorts the results by quality, price, date or duration. Price is the default value.

Choices: price duration quality date

asc
integer (optional) Example: 1

can be set to 1 or 0, default is 1 - from cheapest flights to the most expensive

xml
integer (optional) Example: 0

Generated by aglio on 22 Aug 2019