API Documentation

Resource Group

Aggregation Flights API

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

  • method: GET

aggregation_flights_info

GET https://api.skypicker.com/aggregation_flights?fly_from=CZ&fly_to=porto&v=3&date_from=08/08/2019&date_to=08/09/2019&max_fly_duration=6&flight_type=oneway&one_for_city=0&one_per_date=1&adults=1&children=0&infants=0&partner=picky&partner_market=us&curr=EUR&locale=en&limit=30&sort=price&asc=1&xml=0
Requestsexample 1example 2example 3example 4
Headers
X-API-Version: 1
Responses200400422
Headers
Content-Type: application/json
Body
{
  "ref_tasks": [],
  "search_params": {
    "to_type": "country",
    "flyFrom_type": "airport",
    "seats": {
      "infants": 0,
      "passengers": 1,
      "adults": 1,
      "children": 0
    }
  },
  "currency_rate": 1,
  "refresh": [],
  "connections": [],
  "currency": "EUR",
  "del": 2.080468,
  "all_airlines": [],
  "time": 1,
  "all_stopover_airports": [],
  "data": {
    "kastoria_gr": 312,
    "samos_gr": 283,
    "plaka_gr": 247,
    "rhodes_gr": 194,
    "ioannina_gr": 247,
    "kozani_gr": 312,
    "parikia_gr": 249,
    "kastellorizo_gr": 337,
    "kalymnos_gr": 310,
    "preveza_gr": 254,
    "alexandroupoli_gr": 284,
    "cephalonia_gr": 176,
    "volos_gr": 333,
    "corfu_gr": 190,
    "kasos_gr": 341,
    "zakynthos-island_gr": 263,
    "heraklion_gr": 248,
    "kalamata_gr": 259,
    "astypalaia_gr": 309,
    "santorini_gr": 225,
    "kos_gr": 224,
    "mytilene_gr": 271,
    "lemnos_gr": 282,
    "patras_gr": 334,
    "athens_gr": 191,
    "chania_gr": 208,
    "kythira_gr": 252,
    "chios_gr": 247,
    "icaria_gr": 286,
    "mykonos_gr": 197,
    "skiathos_gr": 271,
    "karpathos_gr": 252,
    "leros_gr": 308,
    "sitia_gr": 294,
    "kavala_gr": 279,
    "naxos_gr": 252,
    "syros_gr": 294,
    "skyros_gr": 238,
    "thessaloniki_gr": 205
  },
  "search_id": "78007495-13cf-49ec-9147-95fd4bdd856f"
}
Headers
Content-Type: application/json
Body
{
  "message": "Here you will be notified of the error that occurred."
}
Headers
Content-Type: application/json
Body
{
  "message": [
    {
      "errors": [
        "Not recognized location: `XXX`"
      ],
      "param": "fly_to"
    }
  ]
}
Headers
X-API-Version: 2
Responses200400422
Body
{
  "ref_tasks": [],
  "search_params": {
    "to_type": "country",
    "flyFrom_type": "airport",
    "seats": {
      "infants": 0,
      "passengers": 1,
      "adults": 1,
      "children": 0
    }
  },
  "currency_rate": 1,
  "refresh": [],
  "connections": [],
  "currency": "EUR",
  "del": 2.44155,
  "all_airlines": [],
  "time": 1,
  "all_stopover_airports": [],
  "data": {
    "kastoria_gr": {
      "duration": 196500,
      "rating": 312,
      "price": 312,
      "segments_count": 3
    },
    "samos_gr": {
      "duration": 186600,
      "rating": 283,
      "price": 283,
      "segments_count": 3
    },
    "plaka_gr": {
      "duration": 124500,
      "rating": 247,
      "price": 247,
      "segments_count": 4
    },
    "rhodes_gr": {
      "duration": 214500,
      "rating": 194,
      "price": 194,
      "segments_count": 4
    },
    "ioannina_gr": {
      "duration": 123000,
      "rating": 247,
      "price": 247,
      "segments_count": 4
    },
    "kozani_gr": {
      "duration": 193500,
      "rating": 312,
      "price": 312,
      "segments_count": 3
    },
    "parikia_gr": {
      "duration": 119400,
      "rating": 249,
      "price": 249,
      "segments_count": 4
    },
    "kastellorizo_gr": {
      "duration": 183900,
      "rating": 337,
      "price": 337,
      "segments_count": 3
    },
    "kalymnos_gr": {
      "duration": 114600,
      "rating": 310,
      "price": 310,
      "segments_count": 4
    },
    "preveza_gr": {
      "duration": 214200,
      "rating": 254,
      "price": 254,
      "segments_count": 4
    },
    "alexandroupoli_gr": {
      "duration": 183300,
      "rating": 284,
      "price": 284,
      "segments_count": 3
    },
    "cephalonia_gr": {
      "duration": 146400,
      "rating": 176,
      "price": 176,
      "segments_count": 3
    },
    "volos_gr": {
      "duration": 103800,
      "rating": 333,
      "price": 333,
      "segments_count": 4
    },
    "corfu_gr": {
      "duration": 153000,
      "rating": 190,
      "price": 190,
      "segments_count": 4
    },
    "kasos_gr": {
      "duration": 191700,
      "rating": 341,
      "price": 341,
      "segments_count": 4
    },
    "zakynthos-island_gr": {
      "duration": 152400,
      "rating": 263,
      "price": 263,
      "segments_count": 4
    },
    "heraklion_gr": {
      "duration": 213900,
      "rating": 248,
      "price": 248,
      "segments_count": 3
    },
    "kalamata_gr": {
      "duration": 139800,
      "rating": 259,
      "price": 259,
      "segments_count": 4
    },
    "astypalaia_gr": {
      "duration": 138900,
      "rating": 309,
      "price": 309,
      "segments_count": 4
    },
    "santorini_gr": {
      "duration": 164400,
      "rating": 225,
      "price": 225,
      "segments_count": 4
    },
    "kos_gr": {
      "duration": 122400,
      "rating": 224,
      "price": 224,
      "segments_count": 3
    },
    "mytilene_gr": {
      "duration": 147900,
      "rating": 271,
      "price": 271,
      "segments_count": 3
    },
    "lemnos_gr": {
      "duration": 141000,
      "rating": 282,
      "price": 282,
      "segments_count": 3
    },
    "patras_gr": {
      "duration": 112200,
      "rating": 334,
      "price": 334,
      "segments_count": 2
    },
    "athens_gr": {
      "duration": 83100,
      "rating": 191,
      "price": 191,
      "segments_count": 3
    },
    "chania_gr": {
      "duration": 114300,
      "rating": 208,
      "price": 208,
      "segments_count": 4
    },
    "kythira_gr": {
      "duration": 143700,
      "rating": 252,
      "price": 252,
      "segments_count": 4
    },
    "chios_gr": {
      "duration": 129300,
      "rating": 247,
      "price": 247,
      "segments_count": 4
    },
    "icaria_gr": {
      "duration": 138000,
      "rating": 286,
      "price": 286,
      "segments_count": 4
    },
    "mykonos_gr": {
      "duration": 150000,
      "rating": 197,
      "price": 197,
      "segments_count": 4
    },
    "skiathos_gr": {
      "duration": 196200,
      "rating": 271,
      "price": 271,
      "segments_count": 3
    },
    "karpathos_gr": {
      "duration": 154200,
      "rating": 252,
      "price": 252,
      "segments_count": 4
    },
    "leros_gr": {
      "duration": 129600,
      "rating": 308,
      "price": 308,
      "segments_count": 4
    },
    "sitia_gr": {
      "duration": 134700,
      "rating": 294,
      "price": 294,
      "segments_count": 4
    },
    "kavala_gr": {
      "duration": 141600,
      "rating": 279,
      "price": 279,
      "segments_count": 3
    },
    "naxos_gr": {
      "duration": 146700,
      "rating": 252,
      "price": 252,
      "segments_count": 4
    },
    "syros_gr": {
      "duration": 127200,
      "rating": 294,
      "price": 294,
      "segments_count": 4
    },
    "skyros_gr": {
      "duration": 114300,
      "rating": 238,
      "price": 238,
      "segments_count": 4
    },
    "thessaloniki_gr": {
      "duration": 165000,
      "rating": 205,
      "price": 205,
      "segments_count": 4
    }
  },
  "search_id": "68edc8d2-9484-4c17-9053-ec66115ae9ea"
}
Headers
Content-Type: application/json
Body
{
  "message": "Here you will be notified of the error that occurred."
}
Headers
Content-Type: application/json
Body
{
  "message": [
    {
      "errors": [
        "Not recognized location: `XXX`"
      ],
      "param": "fly_to"
    }
  ]
}
Headers
X-API-Version: 3
Responses200400422
Body
{
  "ref_tasks": [],
  "search_params": {
    "to_type": "country",
    "flyFrom_type": "airport",
    "seats": {
      "infants": 0,
      "passengers": 1,
      "adults": 1,
      "children": 0
    }
  },
  "time": 1,
  "refresh": [],
  "connections": [],
  "currency": "EUR",
  "del": 2.480315,
  "all_airlines": [],
  "currency_rate": 1,
  "all_stopover_airports": [],
  "data": {
    "kastoria_gr": {
      "sort_value": 312,
      "segments_count": 3
    },
    "samos_gr": {
      "sort_value": 283,
      "segments_count": 3
    },
    "plaka_gr": {
      "sort_value": 247,
      "segments_count": 4
    },
    "rhodes_gr": {
      "sort_value": 194,
      "segments_count": 4
    },
    "ioannina_gr": {
      "sort_value": 247,
      "segments_count": 4
    },
    "kozani_gr": {
      "sort_value": 312,
      "segments_count": 3
    },
    "parikia_gr": {
      "sort_value": 249,
      "segments_count": 4
    },
    "kastellorizo_gr": {
      "sort_value": 337,
      "segments_count": 3
    },
    "kalymnos_gr": {
      "sort_value": 310,
      "segments_count": 4
    },
    "preveza_gr": {
      "sort_value": 254,
      "segments_count": 4
    },
    "alexandroupoli_gr": {
      "sort_value": 284,
      "segments_count": 3
    },
    "cephalonia_gr": {
      "sort_value": 176,
      "segments_count": 3
    },
    "volos_gr": {
      "sort_value": 333,
      "segments_count": 4
    },
    "corfu_gr": {
      "sort_value": 190,
      "segments_count": 4
    },
    "kasos_gr": {
      "sort_value": 341,
      "segments_count": 4
    },
    "zakynthos-island_gr": {
      "sort_value": 263,
      "segments_count": 4
    },
    "heraklion_gr": {
      "sort_value": 248,
      "segments_count": 3
    },
    "kalamata_gr": {
      "sort_value": 259,
      "segments_count": 4
    },
    "astypalaia_gr": {
      "sort_value": 309,
      "segments_count": 4
    },
    "santorini_gr": {
      "sort_value": 225,
      "segments_count": 4
    },
    "kos_gr": {
      "sort_value": 224,
      "segments_count": 3
    },
    "mytilene_gr": {
      "sort_value": 271,
      "segments_count": 3
    },
    "lemnos_gr": {
      "sort_value": 282,
      "segments_count": 3
    },
    "patras_gr": {
      "sort_value": 334,
      "segments_count": 2
    },
    "athens_gr": {
      "sort_value": 191,
      "segments_count": 3
    },
    "chania_gr": {
      "sort_value": 208,
      "segments_count": 4
    },
    "kythira_gr": {
      "sort_value": 252,
      "segments_count": 4
    },
    "chios_gr": {
      "sort_value": 247,
      "segments_count": 4
    },
    "icaria_gr": {
      "sort_value": 286,
      "segments_count": 4
    },
    "mykonos_gr": {
      "sort_value": 197,
      "segments_count": 4
    },
    "skiathos_gr": {
      "sort_value": 271,
      "segments_count": 3
    },
    "karpathos_gr": {
      "sort_value": 252,
      "segments_count": 4
    },
    "leros_gr": {
      "sort_value": 308,
      "segments_count": 4
    },
    "sitia_gr": {
      "sort_value": 294,
      "segments_count": 4
    },
    "kavala_gr": {
      "sort_value": 279,
      "segments_count": 3
    },
    "naxos_gr": {
      "sort_value": 252,
      "segments_count": 4
    },
    "syros_gr": {
      "sort_value": 294,
      "segments_count": 4
    },
    "skyros_gr": {
      "sort_value": 238,
      "segments_count": 4
    },
    "thessaloniki_gr": {
      "sort_value": 205,
      "segments_count": 4
    }
  },
  "search_id": "d070828c-a902-44a9-849c-976eaff18916"
}
Headers
Content-Type: application/json
Body
{
  "message": "Here you will be notified of the error that occurred."
}
Headers
Content-Type: application/json
Body
{
  "message": [
    {
      "errors": [
        "Not recognized location: `XXX`"
      ],
      "param": "fly_to"
    }
  ]
}
Headers
X-API-Version: null
Responses200400422
Body
{
  "ref_tasks": [],
  "search_params": {
    "to_type": "country",
    "flyFrom_type": "airport",
    "seats": {
      "infants": 0,
      "passengers": 1,
      "adults": 1,
      "children": 0
    }
  },
  "currency_rate": 1,
  "refresh": [],
  "connections": [],
  "currency": "EUR",
  "del": 0,
  "all_airlines": [],
  "time": 1,
  "all_stopover_airports": [],
  "data": [
    {
      "date": "2019-10-15",
      "price": 338
    },
    {
      "date": "2019-10-17",
      "price": 292
    },
    {
      "date": "2019-10-19",
      "price": 273
    },
    {
      "date": "2019-10-20",
      "price": 295
    },
    {
      "date": "2019-10-22",
      "price": 325
    },
    {
      "date": "2019-10-23",
      "price": 289
    },
    {
      "date": "2019-10-25",
      "price": 289
    },
    {
      "date": "2019-10-26",
      "price": 269
    },
    {
      "date": "2019-10-28",
      "price": 278
    },
    {
      "date": "2019-10-30",
      "price": 353
    },
    {
      "date": "2019-11-02",
      "price": 283
    },
    {
      "date": "2019-11-03",
      "price": 348
    },
    {
      "date": "2019-11-05",
      "price": 327
    },
    {
      "date": "2019-11-06",
      "price": 363
    },
    {
      "date": "2019-11-08",
      "price": 306
    },
    {
      "date": "2019-11-09",
      "price": 313
    },
    {
      "date": "2019-11-10",
      "price": 315
    },
    {
      "date": "2019-11-12",
      "price": 360
    },
    {
      "date": "2019-11-13",
      "price": 327
    },
    {
      "date": "2019-11-15",
      "price": 286
    }
  ],
  "search_id": "ba9615a1-8890-4d65-b74f-b900647721b2"
}
Headers
Content-Type: application/json
Body
{
  "message": "Here you will be notified of the error that occurred."
}
Headers
Content-Type: application/json
Body
{
  "message": [
    {
      "errors": [
        "Not recognized location: `XXX`"
      ],
      "param": "fly_to"
    }
  ]
}

GET
GET/aggregation_flights{?fly_from,fly_to,v,date_from,date_to,max_fly_duration,flight_type,one_for_city,one_per_date,adults,children,infants,partner,partner_market,curr,locale,limit,sort,asc,xml}

Please note:

  • one_for_city and one_per_date query parameters work only on one-way requests. In case you want to create Return Trip itinerary calendar, you need to request Outbound and Inbound segments separately.

Request information

  • The request must contain either the one_for_city (one_for_city=1) or the one_per_date (one_per_date=1) parameter otherwise the data parameter in the response will be empty.

  • The sort parameter accepts only three values: price, duration and quality where price is the default value. Should anything other than the three allowed values used the price is applied.

  • Parameter X-API-Version in the request header - default value is 1. Other acceptable values are 2 and 3. In other cases response 400 is returned. Please see how the data field in the response changes by navigating between the three provided examples.

Response information

Depending on what parameters are specified in the request, the content of the ‘data field’ changes accordingly. See the provided examples.

  • EXAMPLE 1: If one_for_city=1 and X-API-Version=1 the response returns price per city.

  • EXAMPLE 2: If one_for_city=1 and X-API-Version=2 the response returns duration, rating (based on requested sort), price and segments_count per city.

  • EXAMPLE 3: If one_for_city=1 and X-API-Version=3 the response returns sort value and segments count per city.

  • EXAMPLE 4: If one_for_date=1 the response returns price per date.

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

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.

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.

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/2019

search flights from this date (dd/mm/YYYY). Use parameters date_from and date_to as a date range for the flight departure. Parameters ‘date_from=01/05/2016’ and ‘date_to=30/05/2016’ mean that the departure can be anytime between the specified dates.

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

search flights upto this date (dd/mm/YYYY).

max_fly_duration
integer (optional) Example: 6

max flight duration in hours, min value 0.

flight_type
string (optional) Example: oneway

only ‘oneway’ is supported. Will be deprecated in the near future.

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. one_for_city and one_per_date query parameters work only on one-way requests. In case you want to create Return Trip itinerary calendar, you need to request Outbound and Inbound segments separately.

one_per_date
boolean (optional) Example: 1

returns the cheapest flights for one date. Can be 0 or not included, or one of these two params can be set to 1. one_for_city and one_per_date query parameters work only on one-way requests. In case you want to create Return Trip itinerary calendar, you need to request Outbound and Inbound segments separately.

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.

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.

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

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 14 Oct 2019