Skip to main content

Response mapping index

With the new v3 the response object has changed around a lot so this guide will explain all the changes and help you navigate the new structure.

Important differences

  • routes, dates and quotes are all returned to the response.
  • The structure of the response has now changed, with the main content under content.results instead of query object
  • Carriers & Places are now under the content.results object instead of the root node.
  • Currencies have been removed from the response data.
  • Changed a lot of objects types to be maps in v3 instead of arrays in v1.0.
  • All properties in the response now are formatted with camelCase instead of an PascalCase . For example MinPrice has become minPrice.
  • Dates have now changed from a string value 2023-01-20T16:45:00 to a Date object.

Changed in v3

Quotes

  • QuoteId is now moved outside as the key.

Here is the new structure in v3 compared to v1.0.

v1.0 (before)v3 (after)
{
"QuoteId": 1,
"MinPrice": 381,
"Direct": true,
"OutboundLeg": {
"CarrierIds": [470],
"OriginId": 68033,
"DestinationId": 42833,
"DepartureDate": "2017-02-03T00:00:00"
},
"InboundLeg": {
"CarrierIds": [470],
"OriginId": 42833,
"DestinationId": 68033,
"DepartureDate": "2017-02-06T00:00:00"
},
"QuoteDateTime": "2016-11-09T21:20:00"
}
{
"{bl}:202207200705*D": {
"id": "",
"minPrice": {
"amount": 27,
"unit": "PRICE_UNIT_WHOLE"
},
"isDirect": true,
"outboundLeg": {
"originPlaceId": "95565050",
"destinationPlaceId": "95673668",
"departureDateTime": {
"year": 2023,
"month": 4,
"day": 20,
"hour": 0,
"minute": 0,
"second": 0
},
"quoteCreationTimestamp": "1662301320"
},
"inboundLeg": {
"originPlaceId": "",
"destinationPlaceId": "",
"departureDateTime": {
"year": 0,
"month": 0,
"day": 0,
"hour": 0,
"minute": 0,
"second": 0
},
"quoteCreationTimestamp": "1662301320"
}
}
}

Places

  • PlaceId has been removed.
  • SkyscannerCode has been removed.
  • entityId has been added to the places object. This is an internal ID for Skyscanner.
  • The object now has a key which is the entityId value.
  • iata has been added
  • parentId has been added referencing the id of the parent place.

Here is the new structure in v3 compared to v1.0.

v1.0 (before)v3 (after)
{
"PlaceId": 837,
"Name": "London Heathrow",
"Type": "Airport",
"SkyscannerCode": "LHR"
}
{
"95565050": {
"entityId": "95565050",
"parentId": "27544008",
"name": "London Heathrow",
"type": "PLACE_TYPE_AIRPORT",
"iata": "LHR"
}
}

Carriers

  • CarrierId is now moved outside as the key.
  • iata has been added
  • imageUrl has been added

Here is the new structure in v3 compared to v1.0.

v1.0 (before)v3 (after)
{
"CarrierId": 29,
"Name": "British Airways"
}
{
"-32480": {
"name": "British Airways",
"imageUrl": "https://logos.skyscnr.com..",
"iata": "BA"
}
}

Routes

  • Price is now removed from routes. You can get it from the quotes referenced.
  • QuoteDateTime is now removed from routes.

Here is the new structure in v3 compared to v1.0.

v1.0 (before)v3 (after)
{
"OriginId": 1811,
"DestinationId": 1845,
"QuoteIds": [1, 2],
"Price": 326,
"QuoteDateTime": "2016-11-13T01:30:00"
}
{
"originPlaceId": "95565050",
"destinationPlaceId": "95673668",
"quoteIds": ["{bl}:202207200705*D", "{bl}:202207202238*I"]
}

Dates

  • Price is now removed from dates.

Here is the new structure in v3 compared to v1.0.

v1.0 (before)v3 (after)
{
"OutboundDates": [
{
"PartialDate": "2016-11",
"QuoteIds": [
1,
2,
],
"Price": 66,
"QuoteDateTime": "2016-11-08T17:28:00"
},
...
],
"InboundDates": [
{
"PartialDate": "2016-11",
"QuoteIds": [
1
],
"Price": 93,
"QuoteDateTime": "2016-11-21T17:19:00"
},
...
]
}
{
"quotesInboundGroups": [
{
"monthYearDate": {
"month": 12,
"year": 2022
},
"quoteIds": [
"{bl}:202207200705*D*LHR*E",
"{bl}:202207202238*I*LHR*E"
]
},
...
],
"quotesOutboundGroups": [
{
"monthYearDate": {
"month": 9,
"year": 2022
},
"quoteIds": [
"{bl}:202207202238*I*LHR"
]
},
...
]
},
}

Date values

Dates have changed from string values to an object.

Here is the new structure in v3 compared to v1.0.

v1.0 (before)v3 (after)
{
"departureDateTime": "2023-01-21T16:40:00"
}
{
"departureDateTime": {
"year": 2023,
"month": 1,
"day": 21,
"hour": 16,
"minute": 40,
"second": 0
}
}

Layout

See the layout of the response in the API reference.