Skip to content
APIHiver

Booking.com API Key: How to Get One & Search Hotels (2026)

Get a free Booking.com API key, search live hotel availability, and build travel apps. Full Node.js and Python examples with the Booking.com API on RapidAPI.

9 min readBy APIHiver

Every developer building a travel app eventually needs hotel data — live availability, real prices, and guest reviews for properties worldwide. If you've looked at Booking.com and thought "I want this data in my app", the challenge is that Booking.com's official API requires a formal partner application that can take weeks.

There's a faster path. This tutorial shows exactly how to get a free Booking.com API key, search live hotel availability, and build on top of the results — with complete working code in Node.js and Python.

Why the official Booking.com API isn't for everyone#

Booking.com operates several partner APIs, each targeting a different business type:

  • Affiliate API — for content publishers embedding hotel widgets
  • Connectivity API — for channel managers and property management systems
  • Demand API — for large OTAs and metasearch engines

All three require a formal application, a business review, and approval that typically takes weeks. There's no self-serve sign-up that gives you a Booking.com API key today.

For developers who need hotel search data for a side project, price tracker, travel blog, or MVP, the practical route is the DataCrawler Booking.com API on RapidAPI — a managed service that returns Booking.com hotel data as clean JSON, with a free tier you can start using in minutes.

The Booking.com API we recommend#

The DataCrawler Booking.com API is one of the most complete hotel data APIs on RapidAPI, covering the full Booking.com search surface — destination lookup, property search, live availability, detailed hotel info, and guest reviews — all in a single API key.

How to get a free Booking.com API key#

For independent developers, a "Booking.com API key" means a RapidAPI key scoped to the DataCrawler Booking.com API. Here's how to get one:

  1. Go to rapidapi.com and create a free account.
  2. Navigate to the DataCrawler Booking.com API.
  3. Click Subscribe to Test and select the BASIC plan (free, no credit card required).
  4. Copy your X-RapidAPI-Key from the code-snippets panel.

That key is your Booking.com API key. The same key works across every API on RapidAPI — so if you later need flight search, weather data, or Google Flights pricing, no new sign-up is needed.

Quickstart: your first Booking.com API call#

The API follows a two-step pattern common in travel APIs:

  1. Resolve the destination — convert a city name into a dest_id using /searchDestination
  2. Search hotels — pass the dest_id with your dates to /searchHotels to get live availability and prices

Here's the destination lookup in cURL:

curl --request GET \
  --url 'https://booking-com15.p.rapidapi.com/api/v1/hotels/searchDestination?query=Dubai' \
  --header 'X-RapidAPI-Host: booking-com15.p.rapidapi.com' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY'

Response:

{
  "status": true,
  "data": [
    {
      "dest_id": "-782831",
      "search_type": "city",
      "name": "Dubai, United Arab Emirates",
      "label": "Dubai",
      "country": "ae",
      "latitude": 25.2048,
      "longitude": 55.2708
    }
  ]
}

Now use that dest_id to search hotels:

curl --request GET \
  --url 'https://booking-com15.p.rapidapi.com/api/v1/hotels/searchHotels?dest_id=-782831&search_type=city&arrival_date=2026-07-01&departure_date=2026-07-07&adults=2&room_qty=1&currency_code=USD&languagecode=en-us' \
  --header 'X-RapidAPI-Host: booking-com15.p.rapidapi.com' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY'

Response:

{
  "status": true,
  "data": {
    "hotels": [
      {
        "hotel_id": 1234567,
        "property": {
          "name": "Atlantis The Palm",
          "reviewScore": 8.6,
          "reviewScoreWord": "Excellent",
          "reviewCount": 14823,
          "propertyClass": 5,
          "wishlistName": "Dubai"
        },
        "priceBreakdown": {
          "grossPrice": { "value": 420.0, "currency": "USD" }
        }
      }
    ],
    "meta": [{ "title": "Dubai: 1,240 properties found" }]
  }
}

The key endpoints#

EndpointWhat it does
/api/v1/hotels/searchDestinationResolve a city or place name to dest_id
/api/v1/hotels/searchHotelsSearch hotels with live prices and availability
/api/v1/hotels/getHotelDetailsFull property info — description, facilities, photos
/api/v1/hotels/getRoomsAvailable room types and per-room pricing
/api/v1/hotels/getHotelReviewsGuest reviews and scores
/api/v1/hotels/getSortByAvailable sort options for search results
/api/v1/hotels/getFilterAvailable filter options for a destination
/api/v1/hotels/searchHotelsByCoordinatesSearch by lat/lng instead of city name

The standard integration flow: searchDestinationsearchHotelsgetHotelDetailsgetRooms for checkout. Reviews and filters are supplementary calls you add based on your UI needs.

// npm install node-fetch
import fetch from "node-fetch";
 
const KEY = process.env.RAPIDAPI_KEY;
const HOST = "booking-com15.p.rapidapi.com";
const HEADERS = {
  "X-RapidAPI-Key": KEY,
  "X-RapidAPI-Host": HOST
};
 
async function searchDestination(query) {
  const url = new URL(`https://${HOST}/api/v1/hotels/searchDestination`);
  url.searchParams.set("query", query);
  const res = await fetch(url, { headers: HEADERS });
  const { data } = await res.json();
  return data[0];
}
 
async function searchHotels({ destId, searchType, checkIn, checkOut, adults }) {
  const url = new URL(`https://${HOST}/api/v1/hotels/searchHotels`);
  url.searchParams.set("dest_id", destId);
  url.searchParams.set("search_type", searchType);
  url.searchParams.set("arrival_date", checkIn);
  url.searchParams.set("departure_date", checkOut);
  url.searchParams.set("adults", adults);
  url.searchParams.set("room_qty", "1");
  url.searchParams.set("currency_code", "USD");
  url.searchParams.set("languagecode", "en-us");
 
  const res = await fetch(url, { headers: HEADERS });
  if (!res.ok) throw new Error(`Booking.com API ${res.status}`);
  const { data } = await res.json();
  return data.hotels;
}
 
const dest = await searchDestination("Barcelona");
const hotels = await searchHotels({
  destId: dest.dest_id,
  searchType: dest.search_type,
  checkIn: "2026-08-10",
  checkOut: "2026-08-15",
  adults: "2"
});
 
for (const h of hotels.slice(0, 5)) {
  const p = h.property;
  const price = h.priceBreakdown?.grossPrice?.value ?? "N/A";
  console.log(`${p.name} · ★${p.propertyClass} · Score: ${p.reviewScore} · $${price}`);
}

Python example — hotel details and reviews#

import os
import requests
 
HOST = "booking-com15.p.rapidapi.com"
HEADERS = {
    "X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
    "X-RapidAPI-Host": HOST,
}
 
def search_destination(query):
    r = requests.get(
        f"https://{HOST}/api/v1/hotels/searchDestination",
        headers=HEADERS,
        params={"query": query},
        timeout=10,
    )
    r.raise_for_status()
    return r.json()["data"][0]
 
def search_hotels(dest_id, search_type, check_in, check_out, adults=2):
    r = requests.get(
        f"https://{HOST}/api/v1/hotels/searchHotels",
        headers=HEADERS,
        params={
            "dest_id": dest_id,
            "search_type": search_type,
            "arrival_date": check_in,
            "departure_date": check_out,
            "adults": adults,
            "room_qty": 1,
            "currency_code": "USD",
            "languagecode": "en-us",
        },
        timeout=15,
    )
    r.raise_for_status()
    return r.json()["data"]["hotels"]
 
def get_reviews(hotel_id, page=1):
    r = requests.get(
        f"https://{HOST}/api/v1/hotels/getHotelReviews",
        headers=HEADERS,
        params={"hotel_id": hotel_id, "page": page, "languagecode": "en-us"},
        timeout=10,
    )
    r.raise_for_status()
    return r.json()["data"]["result"]
 
dest = search_destination("Paris")
hotels = search_hotels(dest["dest_id"], dest["search_type"], "2026-09-01", "2026-09-05")
 
top = hotels[0]
print(f"Top result: {top['property']['name']} — ${top['priceBreakdown']['grossPrice']['value']}")
 
reviews = get_reviews(top["hotel_id"])
for rev in reviews[:3]:
    print(f"  {rev['reviewer']['name']}: {rev['title']} ({rev['average_score']}/10)")

What you can build with the Booking.com API#

Pros

    Cons

      Hotel price trackers are the most popular use case. Schedule searchHotels calls for watched destinations and date ranges, store the prices, and alert users when a property drops below their threshold. The two-step flow (destination → hotels) is easy to cache — dest_id values are stable, so you only call searchDestination once per city.

      Affiliate travel blogs build destination landing pages ("best hotels in Lisbon") with live embedded prices via searchHotels, sorted by review score or price. Outbound links go to Booking.com with your affiliate ID appended. With thousands of destination + date combinations as potential keywords, the SEO surface is enormous.

      Travel comparison tools combine the Booking.com hotel API with a flight search API (Sky Scrapper for Skyscanner data, or the Google Flights API) to build full trip cost estimators. Both are available under the same RapidAPI key.

      Corporate travel dashboards use searchHotels to fetch options for an employee's destination and date, then run them against a policy engine before surfacing approved choices. This is one of the strongest enterprise use cases because the API's rich filtering (star class, review score, distance from city centre) maps directly to travel policy parameters.

      Map-based hotel search uses searchHotelsByCoordinates to find properties near a pin, event venue, or airport — ideal for apps where users start from a map rather than a text search.

      Pricing — what each plan gets you#

      The PRO plan is the right starting point for most production apps. Start on BASIC to validate your integration, then upgrade when you know your request volume.

      Common integration mistakes — and how to avoid them#

      Pre-launch checklist#

      1. Destination IDs cached — call searchDestination once per city, store the dest_id, reuse it forever.
      2. Dates validated — enforce YYYY-MM-DD format before the API call.
      3. Empty results handled — show a friendly fallback when hotels is an empty array.
      4. Price display correct — gross price ÷ nights = per-night rate.
      5. 429 handling — respect Retry-After, cache popular searches.
      6. Affiliate links wired — append your Booking.com affiliate ID to outbound hotel page URLs before going live.
      7. ToS reviewed — read the DataCrawler API provider terms before building a commercial product.

      Once those seven boxes are ticked, you have a production-grade Booking.com hotel integration — live availability, real prices, and guest reviews for over a million properties worldwide, through a single API key.

      Share this post

      Frequently asked questions

      How do I get a Booking.com API key?
      Booking.com's official affiliate and partner APIs are restricted to approved partners with a formal application process. The fastest way for independent developers to get a Booking.com API key is through RapidAPI — subscribe to the DataCrawler Booking.com API, and your X-RapidAPI-Key becomes your Booking.com API key. The free BASIC plan requires no credit card and gives you immediate access.
      Is there a free Booking.com API?
      Yes. The DataCrawler Booking.com API on RapidAPI has a free BASIC tier that gives you access to all hotel search, availability, and pricing endpoints with no credit card required. It is the fastest way to start building with Booking.com hotel data without needing a formal partner agreement.
      What can I do with the Booking.com API?
      With the Booking.com API you can search hotels by destination or coordinates, check live room availability and pricing, retrieve hotel details and photos, read guest reviews, and look up nearby attractions. Common use cases include travel booking apps, hotel price trackers, affiliate content sites, and corporate travel tools.
      How do I integrate the Booking.com API?
      The DataCrawler Booking.com API on RapidAPI is a standard REST API. You send GET requests with your X-RapidAPI-Key and X-RapidAPI-Host headers and receive JSON responses. No SDK is required. Start by calling /searchDestination to get a dest_id, then pass it to /searchHotels to get live availability and prices. Full code examples in Node.js and Python are in this guide.
      Does Booking.com have an official public API?
      Booking.com has several partner programmes — an affiliate API for content publishers, a connectivity API for channel managers and OTAs, and a Demand API for large travel platforms. All require a formal application and approval process. For developers who need hotel data now, the DataCrawler Booking.com API on RapidAPI provides the same search, availability, and pricing data without a partner agreement.
      Can I use the Booking.com API in Python?
      Yes. The DataCrawler Booking.com API is a plain HTTP REST API compatible with any Python HTTP library. The most common approach is the requests library — send a GET request with your API key in the headers and parse the JSON response. A complete Python example covering hotel search and availability lookup is included in this guide.
      What is the Booking.com API rate limit?
      Rate limits depend on the RapidAPI plan. The free BASIC tier allows a limited number of requests per month with standard per-minute caps. Paid plans increase both monthly quotas and per-minute throughput. Always handle 429 Too Many Requests responses by checking the Retry-After header and caching popular searches to stay within limits.
      Data & Analytics

      Google Flights API: Get Live Data (2026)

      Pull live Google Flights data — fares, routes, and price calendars — via the DataCrawler Google Flights API on RapidAPI. Node.js + Python code.

      12 min read