Step 3 - Query data
Update query
To send query data you now need to pass it in the body in JSON format application/json instead of passing them in the URL.
You do this by passing through a query object in a POST request.
For query in v1, searching for query = "united"
curl --location --request
GET 'http://partners.api.skyscanner.net/apiservices/autosuggest/v1.0/UK/GBP/en-GB/?apiKey=prtl6749387986743898559646983194&query=united'
The equivalent query in v3
curl --location --request POST 'https://partners.api.skyscanner.net/apiservices/v3/autosuggest/flights' \
--header 'x-api-key: prtl6749387986743898559646983194' \
--header 'Content-Type: application/json' \
--data-raw '{
"market": "UK",
"locale": "en-GB",
"query": "united"
}'
In v3 there is a new query object that is used to search for your flights. You will need to build out this object based on your needed search criteria.
info
What is the Query object
You can find a full explanation of the flights query object. Flights query object guide
Here is a sample of a query object:
{
"market": "UK",
"locale": "en-GB",
"searchQuery": "united",
"limit": 10,
"includedEntityTypes": ["Nation"],
"isDestination": true
}