Sorry
To continue you need to log in
travel
Our Skyscanner API is a RESTful service based on JSON format that provides you with flight availability with prices or hotel vacancies with prices. In order to receive the data your system asks the API with specific location ids (IATA codes for flights or location entity ids for hotels and car rentals) along with other relevant information. The first data batch is returned on the first call. Our system keeps fetching data and on each subsequent API call with the same parameters, the received data is returned along with status (complete or incomplete). Once the status is complete, the full data has been received and there is no need for further API calls.
This API documentation is applicable to any major programming language and offers comprehensive integration guides, as well as details about API endpoints, request parameters, and response objects. If you have any further questions, feel free to contact our support team at support@crawler2api.com for help.
Starting out is easy! Simply follow the steps below to make your initial API calls:
Choose a Subscription Plan:
Head over to the Skyscanner API Pricing page and select one of the available plans. If you’re new to this, consider signing up for the free BASIC plan, which offers 100 free requests each month (this plan has a hard limit and doesn't require a credit card).
Make Your First API Call:
Navigate to the Playground, where the Search endpoint will be pre-selected and visible in the main panel. With the default query parameter already set, click the blue "Test endpoint" button to initiate your first API call. You’ll see the JSON response appear in the right panel.
Explore Documentation and Resources:
For detailed information on endpoints, parameter descriptions, and examples, check the Endpoints tab for each endpoint. You'll find code snippets for popular programming languages and environments, including JavaScript, Python, Java, Shell, and more, making it easy to integrate the API into your projects or workflows.
To authenticate using the API, include the x-apihub-host
header with the value “https://Skyscanner.proxy-production.allthingsdev.co” and the x-apihub-key
header set to your x-apihub-key
and the x-apihub-endpoint
. (see endpoint Code Snippets for details).
The Skyscanner API offers strong and dependable access to data. However, if issues arise during your API interactions, we utilize HTTP status codes to clarify the type of error. Below, you will find thorough descriptions of typical error codes you might encounter, including possible causes and recommended solutions.
We use conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx
range indicate success. Codes in the 4xx
range indicate an error that failed given the information provided, while codes in the 5xx
range indicate an error with our servers. Below you find a more detailed explanations of the potential error codes.
400 Bad Request: This response is generated when your request is incorrectly formatted or missing essential parameters. You may see a “message” field in the response that provides details about the error. Ensure all required fields are included and properly structured before trying again.
401 Unauthorized: This error indicates that you do not have a valid subscription to the API or that your API key is not recognized.
429 Too Many Requests: This error means you’ve exceeded the rate limit for your subscription. Wait for your limit to reset or consider upgrading to a plan with a higher allowance. If you believe this is an error, please contact us for assistance.
500 Internal Error: This status indicates there’s a problem with our servers while handling your request or an internal timeout has occurred. Such errors are uncommon and usually short-lived. If the issue continues, please reach out to our support team for further assistance.
Incorporate error handling in your application to effectively address these responses. Consider the following suggestions:
Retry Mechanism: For 500 server errors and a 429 status, implement a retry strategy that pauses for a few seconds before attempting the request again.
Input Validation: Validate parameters before sending requests to catch common issues like 400 Bad Request.
Error Logging: Keep a log of error responses for further analysis, which can help identify patterns or recurring issues that may necessitate adjustments in your API integration. Use the request_id
field in the response for debugging.
All search endpoints operate the following way. The first call starts the search and returns incomplete results. The result object context.status field has value "incomplete". On our server the search continues and on each subsequent API call with the same parameters, the results obtained until they are returned. Once all the results are available context.status
field has value "complete".
If you want to provide the best experience to your users, call the API about each 5 seconds until context.status
is "complete". If you don't need the results immediately, then you can wait with the second request for 20 or 30 seconds, and usually you can then fetch the complete results.
Search for an airport by a string query
Autocomplete returns an array of results. Returned IATA codes can be used for flight searches.
Success Response:
Code: 200
Content:
[{
"iata_code": "NYCA",
"name": "New York",
"city": "New York",
"country": "United States"
}, {
"iata_code": "JFK",
"name": "New York John F. Kennedy",
"city": "New York",
"country": "United States"
}, {
"iata_code": "EWR",
"name": "New York Newark",
"city": "New York",
"country": "United States"
}, {
"iata_code": "LGA",
"name": "New York LaGuardia",
"city": "New York",
"country": "United States"
}, {
"iata_code": "SWF",
"name": "Stewart International",
"city": "New York",
"country": "United States"
}]
Error Response:
Code: 200
Content:
{
"error": true,
"message": "Skyscanner currently unavailable"
}
OR
Code: 401 UNAUTHORIZED
OR
Code: 400 BAD REQUEST
OR
Code: 429 TOO MANY REQUESTS
OR
Code: 500 INTERNAL ERROR
Be aware that some errors may be generated by the allthingsdev gateway and may have a different format. For more information, please check section 4. Error Handling. Additionally, the allthingsdev gateway includes several headers in every response.
Search for top flights (best, cheapest, fastest). The API returns buckets of up to three best, cheapest, fastest, and direct flights.
Required:
Optional:
Search returns an object with context and itineraries fields.
Success Response:
Code: 200
Content:
{
"context": {
"status": "complete",
"sessionId": "cc827396-99df-4e4c-ae23-ce9641375013",
"totalResults": 184
},
"itineraries": {
"buckets": [{
"id": "Best",
"name": "Best",
"items": [{
"id": "14385-2210111500--32090-0-9828-2210111605",
"price": {
"raw": 94,
"formatted": "94 €"
},
"legs": [
{
"id": "14385-2210111500--32090-0-9828-2210111605",
"origin": {
"id": "MUC",
"name": "Munich",
"displayCode": "MUC",
"city": "Munich",
"isHighlighted": false
},
"destination": {
"id": "BER",
"name": "Berlin Brandenburg",
"displayCode": "BER",
"city": "Berlin",
"isHighlighted": false
},
"durationInMinutes": 65,
"stopCount": 0,
"isSmallestStops": true,
"departure": "2022-10-11T15:00:00",
"arrival": "2022-10-11T16:05:00",
"timeDeltaInDays": 0,
"carriers": {
"marketing": [
{
"id": -32090,
"logoUrl": "https://logos.skyscnr.com/images/airlines/favicon/LH.png",
"name": "Lufthansa"
}
],
"operationType": "fully_operated"
},
"segments": [
{
"id": "14385-9828-2210111500-2210111605--32090",
"origin": {
"flightPlaceId": "MUC",
"parent": {
"flightPlaceId": "MUNI",
"name": "Munich",
"type": "City"
},
"name": "Munich",
"type": "Airport"
},
"destination": {
"flightPlaceId": "BER",
"parent": {
"flightPlaceId": "BERL",
"name": "Berlin",
"type": "City"
},
"name": "Berlin Brandenburg",
"type": "Airport"
},
"departure": "2022-10-11T15:00:00",
"arrival": "2022-10-11T16:05:00",
"durationInMinutes": 65,
"flightNumber": "1944",
"marketingCarrier": {
"id": -32090,
"name": "Lufthansa",
"alternateId": "LH",
"allianceId": -31999
},
"operatingCarrier": {
"id": -32090,
"name": "Lufthansa",
"alternateId": "LH",
"allianceId": -31999
}
}
]
}
],
"isSelfTransfer": false,
"tags": [
"shortest"
],
"isMashUp": false,
"hasFlexibleOptions": false,
"score": 7.59495,
"deeplink": "https://www.skyscanner.net/transport/flights/muc/ber/221011/config/14385-2210111500--32090-0-9828-2210111605?adults=1&adultsv2=1&cabinclass=economy&children=0&childrenv2=&destinationentityid=27547053&originentityid=27545034&inboundaltsenabled=false&infants=0&outboundaltsenabled=false&preferdirects=false&ref=home&rtn=0"
}, ...
]
}, {
"id": "Fastest",
"name": "Fastest",
"items": [...]
}, {
"id": "Cheapest",
"name": "Cheapest",
"items": []
}, {
"id": "Direct",
"name": "Direct",
"items": []
}]
}
}
Error Response:
Code: 200
Content:
{
"error": true,
"message": "Skyscanner currently unavailable"
}
OR
Code: 401 UNAUTHORIZED
OR
Code: 400 BAD REQUEST
OR
Code: 429 TOO MANY REQUESTS
OR
Code: 500 INTERNAL ERROR
List of possible error messages:
Return all available flights.
Required:
Optional:
Search returns an object with context and itineraries fields.
Success Response:
Code: 200
Content:
{
"context": {
"status": "incomplete",
"sessionId": "3de3a5dc-8a39-4ee8-b413-bf09e1a6ea0a"
},
"itineraries": {
"results": [{
"id": "14385-2210111100--32090-0-9828-2210111205",
"legs": [
{
"id": "14385-2210111100--32090-0-9828-2210111205",
"origin": {
"id": 14385,
"name": "Munich",
"displayCode": "MUC"
},
"destination": {
"id": 9828,
"name": "Berlin Brandenburg",
"displayCode": "BER"
},
"durationInMinutes": 65,
"stopCount": 0,
"isSmallestStops": true,
"departure": "2022-10-11T11:00:00",
"arrival": "2022-10-11T12:05:00",
"timeDeltaInDays": 0,
"carriers": {
"marketing": [
{
"id": -32090,
"name": "Lufthansa"
}
],
"operationType": "fully_operated"
},
"segments": [
{
"id": "14385-9828-2210111100-2210111205--32090",
"origin": {
"flightPlaceId": "MUC",
"parent": {
"flightPlaceId": "MUC",
"name": "Munich",
"type": "City"
},
"name": "Munich",
"type": "Airport"
},
"destination": {
"flightPlaceId": "BER",
"parent": {
"flightPlaceId": "BER",
"name": "Berlin",
"type": "City"
},
"name": "Berlin Brandenburg",
"type": "Airport"
},
"departure": "2022-10-11T11:00:00",
"arrival": "2022-10-11T12:05:00",
"durationInMinutes": 65,
"flightNumber": "1928",
"marketingCarrier": {
"id": -32090,
"name": "Lufthansa",
"alternate_di": "LH",
"allianceId": -31999
},
"operatingCarrier": {
"id": -32090,
"name": "Lufthansa",
"alternate_di": "LH",
"allianceId": -31999
}
}
]
}
],
"pricing_options": [
{
"agents": [
{
"id": "trup",
"name": "travelup",
"is_carrier": false,
"update_status": "current",
"optimised_for_mobile": true,
"live_update_allowed": true,
"rating_status": "available",
"rating": 3.56,
"feedback_count": 19631,
"rating_breakdown": {
"reliable_prices": 3.129284,
"clear_extra_fees": 4.438004,
"customer_service": 4.937132,
"ease_of_booking": 4.047512,
"other": 2.687112
}
}
],
"price": {
"amount": 93.07,
"update_status": "current",
"last_updated": "2022-06-16T13:16:00",
"quote_age": 13
},
"url": "https://www.skyscanner.net/transport_deeplink/4.0/UK/en-GB/EUR/trup/1/14385.9828.2022-10-11/air/trava/flights?itinerary=flight%7C-32090%7C1928%7C14385%7C2022-10-11T11%3A00%7C9828%7C2022-10-11T12%3A05%7C65%7C-%7C-%7C-&carriers=-32090&operators=-32090&passengers=1&channel=website&cabin_class=economy&facilitated=false&ticket_price=93.07&is_npt=false&is_multipart=false&client_id=skyscanner_website&q_sources=JACQUARD&commercial_filters=false&q_datetime_utc=2022-06-16T13%3A16%3A00&pqid=false"
}
],
"deeplink": "https://www.skyscanner.net/transport/flights/muc/ber/221011/config/14385-2210111100--32090-0-9828-2210111205?adults=1&adultsv2=1&cabinclass=economy&children=0&childrenv2=&destinationentityid=27547053&originentityid=27545034&inboundaltsenabled=false&infants=0&outboundaltsenabled=false&preferdirects=false&ref=home&rtn=0"
}, ...
]
}
}
Error Response:
Code: 200
Content:
{
"error": true,
"message": "Skyscanner currently unavailable"
}
OR
Code: 401 UNAUTHORIZED
OR
Code: 400 BAD REQUEST
OR
Code: 429 TOO MANY REQUESTS
OR
Code: 500 INTERNAL ERROR
List of possible error messages:
Search for hotel location by city
Autocomplete returns an array of results. Returned entity ids can be used as location ids in hotel search.
Success Response:
Code: 200
Content:
[{
"hierarchy": "Berlin|Berlin|Germany",
"location": "52.366667, 13.50333",
"entity_name": "Berlin Brandenburg (BER)",
"highlight": {
"entity_name": "<em>Berlin</em> Brandenburg (<em>BER</em>)",
"hierarchy": "<em>Berlin</em>|<em>Berlin</em>|Germany"
},
"entity_id": "95673383",
"class": "Airport"
}, {
"hierarchy": "Berlin|Germany",
"location": "52.4865621581, 13.4245185552",
"entity_name": "Berlin",
"highlight": {
"entity_name": "<em>Berlin</em>",
"hierarchy": "<em>Berlin</em>|Germany"
},
"entity_id": "27547053",
"class": "City"
}, ...
]
Error Response:
Code: 200
Content:
{
"error": true,
"message": "Skyscanner currently unavailable"
}
OR
Code: 401 UNAUTHORIZED
OR
Code: 400 BAD REQUEST
OR
Code: 429 TOO MANY REQUESTS
OR
Code: 500 INTERNAL ERROR
Return available hotel rooms.
Required:
Optional:
Search returns an object with context and hotels.
Success Response:
Code: 200
Content:
{
"context": {
"completionPercentage": 100,
"status": "complete",
"searchId": "926b7d212b0af0eba09dcc994ad719180187d022af2163f1ca0d1db1a228258d"
},
"hotels": [{
"hotelId": "159845882",
"heroImage": "https://d2xf5gjipzd8cd.cloudfront.net/available/667648197/667648197_WxH.jpg",
"name": "Concorde El Salam Hotel Sharm El Sheikh",
"stars": 5,
"brandIds": [],
"distance": "1,33 km from Sharm El Sheikh",
"relevantPoiDistance": null,
"coordinates": [34.397244, 27.965425],
"price": "136 €",
"cheapestOfferPartnerId": "h_fd",
"cheapestOfferRateId": null,
"rawPrice": 136,
"rating": null,
"cheapestOffer": "meta",
"offerTypes": "meta",
"guestType": null,
"exclusiveDealLabel": null,
"pricesFrom": "1 price",
"images": ["https://d2xf5gjipzd8cd.cloudfront.net/available/667648197/667648197_WxH.jpg", "https://d2xf5gjipzd8cd.cloudfront.net/available/534813092/534813092_WxH.jpg"],
"otherRates": [],
"priceDescription": "68 € a night",
"taxPolicy": "All taxes and fees included",
"rateFeatures": [{
"key": "breakfast_included",
"text": "Breakfast included",
"color": {
"light": "colorMonteverde",
"dark": "colorMonteverde"
}
}],
"cheapestOfferPartnerName": "FindHotel",
"branding": null
}, ...
],
"nightsForPrice": "For 2 nights",
"resultsSummary": "121 hotels found near Sharm El Sheikh sorted by Best",
"closedUserGroupDeals": [],
"pricePolicy": "All taxes and fees included",
"mapBoundary": {
"n_e_lat": 28.076111633,
"s_w_lat": 27.8820115037,
"n_e_lng": 34.442098,
"s_w_lng": 34.331722
},
"hotelPivot": null,
"medianMinPrice": 195,
"entity": {
"name": "Sharm El Sheikh",
"official_center": null,
"centroid": {
"type": "Point",
"coordinates": [34.395, 27.977222]
},
"entity_type": "Airport",
"entity_id": "104120255",
"levelOfEntityType": null
},
"location": [{
"entity_type": "City",
"entity_id": "33922188",
"name": "Sharm El Sheikh"
}, {
"entity_type": "FirstLevelNationAdministrativeDivision",
"entity_id": "44291308",
"name": "South Sinai Governorate"
}, {
"entity_type": "Nation",
"entity_id": "29475226",
"name": "Egypt"
}],
"priceType": "total",
"localCurrency": "EGP",
"hotelsRegion": {
"latitude": 27.964910000000003,
"longitude": 34.396415000000005,
"longitudeDelta": 0.07133000000000056,
"latitudeDelta": 0.09537999999999958
},
"totalHotels": 121,
"totalHotelsFiltered": 121,
"pois": [{
"name": "Sharm El Sheikh International Airport",
"type": "Landmark",
"coordinate": [34.393333, 27.978611],
"is_extend": null,
"id": 207973842
}, {
"name": "Nabq Bay",
"type": "Landmark",
"coordinate": [34.43267, 28.074206],
"is_extend": null,
"id": 206521237
}, {
"name": "Sharm El Sheikh port",
"type": "Transportation",
"coordinate": [34.2881011963, 27.8547992706],
"is_extend": null,
"id": 208349990
}, {
"name": "SOHO Square Sharm El Sheikh",
"type": "Shopping",
"coordinate": [34.394396, 27.962834],
"is_extend": null,
"id": 208541209
}, {
"name": "Ras Um Sid",
"type": "Landmark",
"coordinate": [34.329918, 27.921434],
"is_extend": null,
"id": 206521230
}],
"discountAnalysis": {
"couponHotels": [],
"couponRanks": [],
"couponAmounts": [],
"discountPercentage": null,
"couponType": null,
"hasCugDeal": false
},
"outBoundIndex": 0,
"partners": ["Booking.com", "Trip.com", "Hotels.com", "Hyatt", "IHG"],
"requestId": "2d5cfaba-9d5d-47dc-a206-b1a3b5962bdb",
"searchByCurrentLocation": false
}
Error Response:
Code: 200
Content:
{
"error": true,
"message": "Skyscanner currently unavailable"
}
OR
Code: 401 UNAUTHORIZED
OR
Code: 400 BAD REQUEST
OR
Code: 429 TOO MANY REQUESTS
OR
Code: 500 INTERNAL ERROR
List of possible error messages:
Search flights from an airport to anywhere. API returns estimated lowest prices only, found in the last 8 days.
Required:
Optional:
Search returns an object with PlacePrices array.
Response fields:
Success Response:
Code: 200
Content:
{
"PlacePrices": [{
"Id": "NL",
"Direct": true,
"Name": "Netherlands",
"DirectPrice": 39498,
"IndirectPrice": 13684,
"IndirectQuoteDateTime": "2023-02-25T18:47:35",
"DirectQuoteDateTime": "2023-02-27T08:47:35"
}, {
"Id": "BA",
"Direct": false,
"Name": "Bosnia and Herzegovina",
"IndirectPrice": 16709,
"IndirectQuoteDateTime": "2023-02-25T22:25:10"
}, {
"Id": "FI",
"Direct": true,
"Name": "Finland",
"DirectPrice": 45137,
"IndirectPrice": 15844,
"IndirectQuoteDateTime": "2023-02-24T13:26:46",
"DirectQuoteDateTime": "2023-02-24T13:26:37"
}, {
"Id": "DE",
"Direct": true,
"Name": "Germany",
"DirectPrice": 12057,
"IndirectPrice": 12099,
"IndirectQuoteDateTime": "2023-02-25T08:44:45",
"DirectQuoteDateTime": "2023-02-27T09:56:36"
}, {
"Id": "EG",
"Direct": true,
"Name": "Egypt",
"DirectPrice": 65760,
"IndirectPrice": 26360,
"IndirectQuoteDateTime": "2023-02-27T09:11:20",
"DirectQuoteDateTime": "2023-02-26T11:11:16"
}, {
"Id": "LU",
"Direct": true,
"Name": "Luxembourg",
"DirectPrice": 29952,
"IndirectPrice": 10477,
"IndirectQuoteDateTime": "2023-02-24T13:55:33",
"DirectQuoteDateTime": "2023-02-24T13:55:25"
}, {
"Id": "HU",
"Direct": true,
"Name": "Hungary",
"DirectPrice": 43553,
"IndirectPrice": 13108,
"IndirectQuoteDateTime": "2023-02-25T15:56:58",
"DirectQuoteDateTime": "2023-02-26T22:17:51"
}]
}
Error Response:
Code: 200
Content:
{
"error": true,
"message": "Skyscanner currently unavailable"
}
OR
Code: 401 UNAUTHORIZED
OR
Code: 400 BAD REQUEST
OR
Code: 429 TOO MANY REQUESTS
OR
Code: 500 INTERNAL ERROR
Flights from an airport to a specified country. API returns estimated lowest prices only, found in the last 8 days.
Required:
origin - IATA code of origin airport
destination - ISO 3166-2 destination country code
departureDate - date of first flight, format YYYY-MM-DD
Optional:
returnDate - date of return flight, format YYYY-MM-DD - if omitted, one-way ticket itineraries are shown
currency - currency of flight prices, default: EUR
locale - user locale, default: en-GB
country - user country of flight prices, default: UK
Search returns an object with PlacePrices array.
Response fields:
Success Response:
Code: 200
Content:
{
"PlacePrices": [{
"Id": "LJUB",
"Direct": true,
"Name": "Ljubljana",
"CountryName": "Slovenia",
"ImageUrl": "https://content.skyscnr.com/119b73c5f7597401e98579c81634e8e5/GettyImages-495685019.jpg",
"DirectPrice": 50035,
"IndirectPrice": 30845,
"HotelUrl": "/hotels/search?entity_id=27544078&checkin=2023-03-01&checkout=2023-03-02&adults=1&rooms=1&locale=en-GB&market=UK",
"HotelPrice": 1958,
"IndirectQuoteDateTime": "2023-02-27T00:50:35",
"DirectQuoteDateTime": "2023-02-27T00:50:35"
}]
}
Error Response:
Code: 200
Content:
{
"error": true,
"message": "Skyscanner currently unavailable"
}
OR
Code: 401 UNAUTHORIZED
OR
Code: 400 BAD REQUEST
OR
Code: 429 TOO MANY REQUESTS
OR
Code: 500 INTERNAL ERROR
Each subscription tier of the API specifies the maximum number of requests allowed per month, along with a rate limit measured in RPS (Requests Per Second). It's important to note that all free subscription plans (such as BASIC) are restricted to 1000 requests per hour, which is a standard requirement set by allthingsdev for any free tier.
Every API response includes information regarding rate limits in the following headers:
x-ratelimit-requests-limit
:The maximum number of requests permitted under your current plan before additional charges apply.x-ratelimit-requests-remaining
: The count of remaining requests available to you before reaching your plan's limit. Once this number hits zero, you will incur overage fees. This count resets either daily or monthly, depending on your API pricing configuration. You can find these limits and quotas detailed on the API Hub's pricing page.x-ratelimit-requests-reset
: This indicates the time in seconds until your quota resets. This duration will not exceed either a day or a month, depending on your subscription plan.If you exceed the API's rate limits, the allthingsdev gateway will respond with a 429 Too Many Requests
error. In such cases, wait until your limit resets, or consider upgrading your subscription for a higher request allowance. We can accommodate a wide range of monthly quotas and rate limits—please reach out for further details to info@crawler2api.com
If you face any challenges that you cannot resolve, or if you need additional clarification regarding the errors you are encountering, please reach out to us (see the Contact Us section below). Include the error code, message, and the circumstances surrounding the error, and we will assist you promptly.
For inquiries about custom plans, high-tier subscriptions, bespoke APIs and services, or any other topic send an email to: support@crawler2api.com and we will respond shortly.
Sorry
To continue you need to log in