Requests and responses
The Travel APIs request and response bodies use JSON
format.
Skyscanner is not responsible for any incorrect implementation of the API and its features. If you have any questions around best practices and guidance, please reach out to your Account Manager for more information.
Requests
The APIs use URL params or a query object which will be sent via a POST
request. The query object allows you to define the search like currency, market, language, dates, one way, etc. This object changes based on the specific endpoint so please refer to the documentation of the query object for each endpoint you are using.
{
"query": {
"market": "UK",
"locale": "en-GB",
"currency": "GBP",
...
}
}
The query object has some common params such as market
, locale
and currency
, this data can also be received from the Culture API which you will learn about in the next section. See Culture information
Responses
The response that is returned is different depending on the endpoint but the status
is used across all endpoints. This param lets you know the status of the results received if its complete or its partial data of a search.
{
"status": ...
}
Status
Status | Description |
---|---|
RESULT_STATUS_INCOMPLETE | The search has not been yet completed. Used for search's that can take time, there will be a /poll endpoint to check on the search status and get the extra data. |
RESULT_STATUS_COMPLETE | All data have been retrieved. |
RESULT_STATUS_FAILED | An error has occurred while retrieving data. |