Skip to main content
tip

We're using examples of Flights vertical but the concept is similar to other verticals such as Car hire

Create and poll

In the Skyscanner searches we use a concept of create and poll within our endpoints. This is due to the amount of data that we need to gather for a full search. The latency for getting travel information from our supplier APIs can vary. To minimise the time to the first result, we provide partial results until all the supplier information was loaded. To enable this partial results, you will need to create a search session and then keep polling it until all the results loaded.

Here is a Flight search and you can see the search has gathered the data but as more partners prices comes in the first result updates with the cheaper flight.

Skyscanner search sample loading

tip

As seen in the above example, sometimes we get the best prices from the slower partners, so its always best to wait for all the results to come back.

/create

With the search create endpoint this is where you start off the search. We will return data with this request of data we have at the time, so will have the first few flights that have come through already.

These requests will also let you know of the status of the search to tell you if it is still in progress

Skyscanner search sample loading

/poll

With the search poll endpoint you can get the status of the search. It will tell you the status of the search and the action you should preform from the Like replace or data not modified.

Skyscanner search sample loading