Last updated

Car rental quick guide

Follow this quick guide to start playing with our Car rental API collection in your client application.


This quick guide shows the minimum steps needed to integrate the Demand API car rental endpoints in the Search and look flow.

⏱️ Estimated time to complete: 15 - 30 minutes

  • Purpose: Fast setup to search, retrieve car rental details, display results and redirect for booking.
  • When to use: You’re not familiar with the Car rental APIs and want to try it quickly.
  • Integration: Search & Look flow (with URL booking redirection).
  • You´ll learn how to:
    1. Search for car rentals.
    2. Retrieve results and car rental details.
    3. Display results.
    4. Redirect to book car rental.
  • Code samples: Minimal, only required fields.

Before you start

Before you start, make sure you’ve completed the prerequisites. You’ll need:

✓ A valid API key token.
✓ Your X-Affiliate-Id
✓ Open the try out console.

Use case

This use case represents a typical Cars API scenario:

A traveller visiting your website wants to add car rental for their upcoming holiday in Edinburgh, Scotland.

They want to book a medium sized car for 8 days.

The traveller is in the Netherlands and is using your website from their mobile phone.

To get familiar with the Car API flow and the endpoints involved, take this use case as an example in every step of this guide.

Attention
  • Do not forget to authenticate every call that you make to our endpoints by using your API key - Token and your X-Affiliate-Id parameter.
  • For more information, see the Authentication and authorisation section.

Step 1 - Search for vehicles

→ Use the /search request to let travellers search for car rentals and look at the price and list of available vehicles for the route they are interested on.

Search request

These are the key parameters to create your search request (valid for both 3.1 and 3.2 versions).

Key parameters
DescriptionRecommendation
booker.countrySpecify the country from which the search request is made.
  • This is required to ensure that the response complies with relevant laws on the display of taxes and fees.
  • Get your two-letter country code using the List countries endpoint.
  • In this case for the use case provided, use (nl).
  • Note: The country code must always be in lowercase.
currencySpecify the three-letter code that uniquely identifies the country's monetary currency.For this example, you will use "EUR" as the traveller is in the Netherlands.
driver.ageThis field determines if age related fees are required or not.If the customer’s age is known, send the actual age (Must be a number between 18 and 99)
  • If age is unknown, prompt the traveller to select a default age range or submit their age outside this range.
route.pickup/ dropoffSpecify the traveller's requested pickup and dropoff dates and times.Use the YYYY-MM-DDTHH:MM:SS.
route.pickup/ dropoff.locationSpecify location where pickup/dropoff is taking place.Use the IATA three-letter code to identify an airport. In this case, would be: EDI for Edimburgh airport.
  • Find your IATA codes here.
  • Or add the latitude/longitude coordinates (see example below)
Location

Locations can be specified using airport IATA codes, city IDs, or latitude/longitude coordinates.

For the provided use case you should create a request body similar to this example:

{
  "booker": {
    "country": "nl"
  },
  "currency": "EUR",
  "driver": {
    "age": 36
  },
  "route": {
    "pickup": {
      "datetime": "2026-09-01T10:00:00",
      "location": {
        "airport": "EDI"
      }
    },
    "dropoff": {
      "datetime": "2024-09-08T11:05:00",
      "location": {
        "airport": "EDI"
      }
    }
  }
}

Example with latitude and longitude coordinates:

{
  "booker": {
    "country": "nl"
  },
  "currency": "EUR",
  "driver": {
    "age": 36
  },
  "route": {
    "pickup": {
      "datetime": "2026-09-01T10:00:00",
      "location": {
        "coordinates": {
          "latitude": 52.309456,
          "longitude": 4.762266
        }
      }
    },
    "dropoff": {
      "datetime": "2026-09-08T11:05:00",
      "location": {
        "coordinates": {
          "latitude": 52.309456,
          "longitude": 4.762266
        }
      }
    }
  }
}

Try it yourself

Reference

See the Cars search guide and Use cases for best practices.

The response contains a list of vehicles that match the specified search criteria. For each vehicle in the list, the response contains:

In this case, 3.1 version response has these parameters:

Key parameters
carThe car’s unique identifier (id).
  • Keep this id to see further car details in next steps.
dealContains promotional deal details when available, including discount percentage, deal tags, and the original (public) price.
  • If no deal applies, the value is "null".
policiesIncludes the policies applied on cancellations, fuel, mileage and payment.
  • In the given example, there is a free cancellation policy valid up to 7 days (P7D) before pickup.
policies.paymentThe timing when the payment takes place.
  • In the provided example, it is pay_now (but could be pay local, or pay later).
priceThe total price for each vehicle that is available for the specified search criteria.
  • By default, the price is shown in the currency specified in the body request (e.g. EUR for nl).
route.pickup/ dropoffA depot id is retrieved in both the pickup and dropoff fields.
Supplier idYou can use this id in step 2 to get further details about a specific supplier.
URLThe links point to the relevant Booking App search page, and cars.booking.com search page.
  • In both cases, the URLs contain your affiliate id (aid) (in the example xxxxx) so when redirecting travellers to the booking in step 4, it can be attributed to you.
next_pageAll results are paginated for better readability.

Step 2 - Retrieve car details

Before you show the search results to the traveller, you need to get additional content about each vehicle, the supplier and the depot(s).

You can do it in two different ways:

a) Using the stored static data.

b) Alternatively you can call the static data endpoints:

EndpointUse it to ...
/cars/detailsGet additional information about the available vehicles.
/cars/suppliersReturn the list of available cars suppliers.
/cars/depotsFor information about the pickup and dropoff locations returned in the cars/search response.
/cars/constantsFor localised car rental constants (e.g., fuel types, transmission, payment timings).
Reference

Note: These endpoints remain unchanged between versions 3.1 and 3.2. It continues to be used to fetch static car information such as capacity, make, model, and specifications, etc. See the Cars details guide and Static data for best practices.

Step 3 - Display your search results page

You now have the necessary information to display the search results to the traveller.

Use data from both the cars/search and car/details responses to provide the level of detail suited to your business needs.

Recommendations

Limiting the number of results

To improve the search experience, consider limiting the maximum number of results displayed.

{
  "last_modified": "2024-12-01T11:05:00+00:00",
  "maximum_results": 100
}

Keeping content up-to-date

For static content (e.g., data from the car/details endpoint), we recommend checking the last_modified timestamp to ensure the information is up-to-date.

Timestamps follow the ISO 8601 standard, with the format: YYYY-MM-DDTHH:MM:SSZ (UTC only).

When displaying supplier results, consider showing the supplier’s logo alongside their name.

This helps travellers easily recognise the supplier and makes their decision-making process smoother.

Display scores

We also recommend showing the total score, as well as the breakdown of scores for each depot, on the search results page.

This can significantly aid the traveller in their booking decision.

Reference

See the Look at details guide for best practices.

Step 4 - Redirect the traveller to complete the booking

After a traveller has chosen the vehicle they want to book, you should redirect them to the URL (either app or web link) returned in your /search response.

  1. Go to the /search response.
  2. Copy the returned Booking URL.
  3. Redirect the traveller to the selected URL.

For example:

"url": {
  "app": "booking://search?affiliate_id=xxxxx&driver_age=25&do_time=2024-06-22T10:00&do_loc_iata=MAN&pu_time=2024-06-20T10:00&pu_loc_iata=LHR&pu_loc_name=London+Heathrow+Airport&expand_search=false",
  "web": "https://cars.booking.com/search-results?vehicleId=699340901&vehicleInfo.vehicle.id=699340901&aid=xxxxxxx&prefcurrency=USD&preflang=en&driversAge=25&doHour=10&doMinute=0&doDay=22&doMonth=6&doYear=2024&dropLocationIata=MAN&puHour=10&puMinute=0&puDay=20&puMonth=6&puYear=2024&locationIata=LHR&locationName=London+Heathrow+Airport"
}

Curious to know more?