Overview
Introductionβ
The Car Hire Live Prices API is used to search for and return car hire quotes for any time window from current day until one year from current day.
The API takes a pick-up location and optionally a drop-off location for a given period of time and returns a list of quotes that will be bookable by travellers.
Terminologyβ
Throughout the documentation, youβll see the use of Vendors
and Agents
. To eliminate uncertainty here's a small
explanation to eastbalish the distinction between them.
Term | Description |
---|---|
vendors | Vendors are the actual car companies that rent cars |
agents | Agents are supply partners where the quotes are retrieved from. Please note that vendors can also be agents |
How we use it at Skyscannerβ
To provide the best UXE, our APIs are asynchronous, meaning that once the Search is created (CreateSearch), we return some basic information about the results, including the Agents (logos, names, etc), as visible in the image above.
The prices, along with the vehicle's classification and characteristics, are loaded asynchronously. For the Skyscanner page, we do that to fill up the filters on the left side and the cards in the centre.
This asynchronism is attained by polling calls. Each polling call targets one or more agents at a time to retrieve their available quotes for the specific criteria.
The polling made by the agent will be active polling meaning that the client will have to make multiple requests to receive all the available quotes and data info. The API returns results as soon as they are receive. It's expected to take between 1 to 10 seconds to get the full set of results.
The above screenshot captures what you can build, including some example data points. We have:
- Quotes can be grouped based on the data points you receive for each quote.
- In the centre, we have cards with the specific cars, their characteristics, and prices. Note that the same vehicle can have multiple quotes since (1) different agents might have similar offers and (2) the same agent might have very similar vehicles with the same characteristics.
π Here you can try out a search on your own.
Endpointsβ
This API has 2 endpoints, /create
and /poll
.
/create
β
POST https://partners.api.skyscanner.net/apiservices/v1/carhire/live/search/create
/create
is used to initiate the search request. This endpoint returns some basic information about the results,
including the Agents (logos, names, etc).
/poll
β
POST https://partners.api.skyscanner.net/apiservices/v1/carhire/live/search/poll/{sessionToken}
/poll
is used to retrieve the complete list of results. This usually takes some amount of time as our backend makes
calls to our full list of supply partners for quotes. The /poll
endpoint is invoked with a sessionToken
which is
returned in the result of the /create
call.
Conceptsβ
Create and poll workflowβ
There is a large variance in the time to first result and the time to last result as some supply partners take
longer to return results. Often, the chepest quotes are returned from supply partners that take longer to return
results. This is why the API workflow has been split into the /create
and /poll
endpoints.
To learn more about the create and poll workflow, please see our create and poll guide
User IP Address in the Car Hire Live Prices APIβ
The userIp
is an optional parameter in the Car Hire Live Prices APIβs Create
endpoint.
Passing userIp
allows our supply partners to provide comprehensive and competitive coverage, particularly with
high-performing supply partners in key markets, such as the UK, US, Italy, Brazil, Germany, Spain, France, Australia,
and Turkey, where omitting it may result in less relevant or incomplete offers from partner agents.
Benefits of userIp
β
When provided with a valid IPv4 address representing the end-user making the request, it enables downstream agent APIs to deliver more accurate and relevant results. This parameter helps agents:
- Enhance Offer Relevance: By identifying the end-userβs location through their IP address, agents can tailor offers, ensuring they are geographically appropriate and meet user expectations.
- Improve Service Quality: Agents can detect patterns such as bot traffic or unusual activity, enabling them to maintain high service standards and protect against potential misuse.
- Optimise Results for Users: Leveraging the userβs IP address can help refine search results, ensuring that users receive offers that are both complete and contextually relevant.
Why the IP Address Mattersβ
Since no other user contextual information is shared with partner agents, the IP address serves as the simplest and most
confidential way to provide critical information. By using the userIp
:
- Customisation: Agents can tailor results to better align with the userβs geographic location and preferences, without requiring additional personal details.
- Rate-Limiting and Abuse Prevention: IP addresses enable agents to identify and manage bot traffic or abusive behaviour effectively, ensuring legitimate users receive uninterrupted access and high-quality results.
- Confidential and Minimal Data: The IP address is a lightweight and privacy-conscious way to convey necessary context, avoiding the need for more intrusive user data.
Regulatory Compliance and Privacyβ
Skyscanner and its partner agents are fully committed to complying with all applicable privacy regulations, including GDPR and other relevant data protection laws. This means:
- Minimal Data Handling: The
userIp
is used solely for processing by supply partners. Skyscanner does not store or use this parameter internally. - Strict Data Privacy Policies: Both Skyscanner and its supply partners adhere to strict privacy standards to ensure the secure transmission and appropriate handling of any user information.
- Transparent Practices: The use of the
userIp
is fully disclosed, and it is only employed to enhance the user experience, in alignment with legal and ethical guidelines.
If you have additional questions or concerns, please feel free to reach out to your Account Manager for more information.
Requestβ
/create
β
Required fieldsβ
Requests to the /create
endpoint need to contain the following:
Field name | Description |
---|---|
market | Market where search is coming from. E.g.: UK |
locale | Language to be used for the search. E.g.: en-GB |
currency | Currency that the search result prices are returned in. E.g.: GBP |
pickUpDate | Local date time of pick-up. You can specify both a date and, optionally, an exact time. If the time is not provided, it will default to 10am in the local time zone. |
dropOffDate | Local date time of drop-off. Must be at a later point than the pick-up date time. You can specify both a date and, optionally, an exact time. If the time is not provided, it will default to 10am in the local time zone. |
pickUpLocation | Pick-up location. See car hire live prices API documentation for format |
Optional fieldsβ
Below are additional optional fields to modify the outcome of the request:
Field name | Description |
---|---|
dropOffLocation | Drop-off location. If empty then it will be defaulted to be the same value as as pickUpLocation. See car hire live prices API documentation for format |
includedAgentIds | Options for search result to only include quotes from specified agents. All items need to be valid for the specific market. See car hire live prices API documentation for more details |
excludedAgentIds | Options for search result to exclude quotes from specified agents. All items need to be valid for the specific market. See car hire live prices API documentation for more details |
driverAge | The age of the designated driver. Must be between 21 and 99. Defaults to 30 if left unspecified. |
userIp | Optional β Valid IPv4 address of the end-user making the request. For details on its purpose and usage, see the IP Address Usage section of the page and also car hire live prices API documentation. |
/poll
β
The /create
endpoint will return a sessionToken
in the response which is used to invoke the /poll
endpoint.
POST https://partners.api.skyscanner.net/apiservices/v3/flights/live/search/poll/{ADD SESSION TOKEN}
The sessionToken
expires after around 10 minutes.
In this case, the API will return the following 400 response:
Session token is expired or invalid
If the token is expired, you should use the createSearch
endpoint and create a new sessionToken
Response /create
and /poll
β
Fieldsβ
Field name | Description |
---|---|
status | Indicates status of the search request is running or completed |
quotes | Bookable quote which corresponds with what was requested in the search. A quote will contain a deepLink field which takes the traveler to the booking page. |
agents | Contains information about the agentes referenced in quotes . Agents are supply partners where we get quotes from. |
vendors | Contains information about the vendors referenced in quotes . Vendors are actual car companies that rent cars. Note that vendors can also be both an agent and a vendor at the same time. |
sortingOptions | Contains data for sorting. Currently supports sorting only by cheapest criteria |