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:
- Go to rapidapi.com and create a free account.
- Navigate to the DataCrawler Booking.com API.
- Click Subscribe to Test and select the BASIC plan (free, no credit card required).
- Copy your
X-RapidAPI-Keyfrom 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:
- Resolve the destination — convert a city name into a
dest_idusing/searchDestination - Search hotels — pass the
dest_idwith your dates to/searchHotelsto 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¤cy_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#
| Endpoint | What it does |
|---|---|
/api/v1/hotels/searchDestination | Resolve a city or place name to dest_id |
/api/v1/hotels/searchHotels | Search hotels with live prices and availability |
/api/v1/hotels/getHotelDetails | Full property info — description, facilities, photos |
/api/v1/hotels/getRooms | Available room types and per-room pricing |
/api/v1/hotels/getHotelReviews | Guest reviews and scores |
/api/v1/hotels/getSortBy | Available sort options for search results |
/api/v1/hotels/getFilter | Available filter options for a destination |
/api/v1/hotels/searchHotelsByCoordinates | Search by lat/lng instead of city name |
The standard integration flow: searchDestination → searchHotels →
getHotelDetails → getRooms for checkout. Reviews and filters are
supplementary calls you add based on your UI needs.
Node.js example — hotel search#
// 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#
- Destination IDs cached — call
searchDestinationonce per city, store thedest_id, reuse it forever. - Dates validated — enforce
YYYY-MM-DDformat before the API call. - Empty results handled — show a friendly fallback when
hotelsis an empty array. - Price display correct — gross price ÷ nights = per-night rate.
- 429 handling — respect
Retry-After, cache popular searches. - Affiliate links wired — append your Booking.com affiliate ID to outbound hotel page URLs before going live.
- 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.
Related reading#
- Skyscanner API: Free Key, Endpoints & Code Examples — combine hotel search with live flight data under the same RapidAPI key.
- Google Flights API: Get Live Data (2026) — add Google Flights pricing to build full trip cost comparisons.
- Browse more data & analytics APIs — travel data, enrichment, and market data providers.