Overview
The Shallow Link endpoint generates Skyscanner shallow links (links that redirect travellers to Skyscanner flight search pages).
For example, if a request to the shallow link endpoint is made with an origin of LON
and destination of BER
, travellers who click on the link will be redirected to the following Skyscanner flight search page:
These shallow links allow travellers to continue their flight search on Skyscanner.
Usage
The GET
endpoint can be accessed with the following URL: https://partners.api.skyscanner.net/refer/flights/live/dayview
The URL needs to be populated with several required query params (see below for full list).
When a successful request is made, the endpoint returns a 307
response to the caller which redirects them to the correct destination flight search page.
If a request fails due to missing or invalid params, the endpoint returns a 307
response with skyscanner.net
as the destination URL.
Quick Start
Below are example requests to the endpoint
One Way Search
Example request to generate a shallow link page for a one way search from London to Berlin
https://partners.api.skyscanner.net/refer/flights/live/dayview?origin=lon&destination=ber&departuredate=2024-12-12&userlanguage=en&usercountry=uk&associateid=aaa-bbb-ccc
Return Search
Example request to generate a shallow link page for a return journey search from London to Berlin
https://partners.api.skyscanner.net/refer/flights/live/dayview?origin=lon&destination=ber&departuredate=2024-12-01&returndate=2024-12-12&userlanguage=en&usercountry=uk&associateid=aaa-bbb-ccc
Return Search With Carriers Filter
Example request for London to Singapore with only Singapore Airlines and Qatar Airlines included in result.
https://partners.api.skyscanner.net/refer/flights/live/dayview?origin=lon&destination=sin&departuredate=2024-12-01&returndate=2024-12-12&userlanguage=en&usercountry=uk&associateid=12345Test&carriers=SQ,QR
Query Params
Below are lists of supported query params
Required Params
These params are required. If they are not provided, the shallow link generation will fail and users will be redirected to skyscanner.net
Param Name | Description |
---|---|
departuredate | Date of depatrure in the format: yyyy-mm-dd . If only departuredate specified, search will be for a one-way journey. |
origin or origins | IATA city code of starting point for search i.e.: LON . origins can be specified as a comma separated string, however, we will only take the first IATA code in the string |
destination or destinations | IATA city code of end point for search i.e.: LON . destinations can be specified as a comma separated string, however, we will only take the first IATA code in the string |
usercountry | ISO country code of user country i.e.: uk . Determines currency and locale of search result page. |
userlanguage | ISO language code for user i.e.: en . Determines language of search result page |
associateid | Skyscanner associate ID |
For origin
and destination
, we support the plural version of the query param (origins
and destinations
). However, we do not support searching for multiple cities. The shallow link will contain the first place specified in origins
or destinations
.
Optional Params
Param Name | Description |
---|---|
returndate | Date of return in the format: yyyy-mm-dd . If specified, search will be for return flights. |
carriers | Comma separated list of IATA carrier codes. If specified, search will only contain results for specified carriers. I.e.: SQ,QR |
nonstop | true or false value that determines if search results only contain non-stop (direct) itineraries |
cabin | Cabin class for travel. i.e.: economy , premiumeconomy , business , first |
utm_source | UTM param used for tracking |
utm_medium | UTM param used for tracking |
utm_term | UTM param used for tracking |
utm_content | UTM param used for tracking |
Invalid or Missing Query Params
If the endpoint is passed invalid query params, or not all required query params are provided, the endpoint will redirect users to skyscanner.net
instead of the desired shallow link page or throwing an error.