Booking APIbooking.com ↗
Search Booking.com properties by destination, dates, and guests. Retrieve names, prices, ratings, addresses, and descriptions via 2 structured endpoints.
What is the Booking API?
The Booking.com API provides 2 endpoints for querying accommodation listings and fetching individual property details. Use search_properties to run destination-based searches filtered by check-in/checkout dates, room count, and guest count — getting back paginated results with names, prices, ratings, and addresses. Use get_property_details to pull full descriptive text and address data for any specific property by its URL.
curl -X GET 'https://api.parse.bot/scraper/347ab358-c792-4521-9ff2-bff0c7f845e0/search_properties?rooms=1&adults=2&offset=0&checkin=2026-05-20&checkout=2026-05-25&destination=Paris' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace booking-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""
Booking.com Property Search and Details API Client
Get your API key from: https://parse.bot/settings
"""
import os
import requests
from datetime import datetime, timedelta
from typing import Optional, List, Dict
class ParseClient:
"""Client for interacting with the Booking.com Parse API"""
def __init__(self, api_key: Optional[str] = None):
self.base_url = "https://api.parse.bot"
self.scraper_id = "347ab358-c792-4521-9ff2-bff0c7f845e0"
self.api_key = api_key or os.getenv("PARSE_API_KEY")
if not self.api_key:
raise ValueError("API key must be provided or set in PARSE_API_KEY environment variable")
def _call(self, endpoint: str, method: str = "POST", **params) -> dict:
"""
Make a request to the Parse API
Args:
endpoint: The API endpoint name
method: HTTP method (GET or POST)
**params: Query/body parameters
Returns:
Response JSON as dictionary
"""
url = f"{self.base_url}/scraper/{self.scraper_id}/{endpoint}"
headers = {"X-API-Key": self.api_key, "Content-Type": "application/json"}
if method == "GET":
response = requests.get(url, headers=headers, params=params)
elif method == "POST":
response = requests.post(url, headers=headers, json=params)
else:
raise ValueError(f"Unsupported method: {method}")
response.raise_for_status()
return response.json()
def search_properties(
self,
destination: str,
checkin: str,
checkout: str,
adults: int = 2,
rooms: int = 1,
offset: int = 0,
) -> dict:
"""
Search for properties on Booking.com
Args:
destination: Search destination (city, region, or property name)
checkin: Check-in date (YYYY-MM-DD)
checkout: Check-out date (YYYY-MM-DD)
adults: Number of adults (default: 2)
rooms: Number of rooms (default: 1)
offset: Results offset for pagination (default: 0)
Returns:
Dictionary with 'properties' list and 'total_found' count
"""
params = {
"destination": destination,
"checkin": checkin,
"checkout": checkout,
"adults": adults,
"rooms": rooms,
"offset": offset,
}
return self._call("search_properties", method="GET", **params)
def get_property_details(self, url: str) -> dict:
"""
Retrieve detailed information about a specific property
Args:
url: The Booking.com property URL
Returns:
Dictionary with property name, description, and address
"""
params = {"url": url}
return self._call("get_property_details", method="GET", **params)
def format_rating(rating_str: str) -> str:
"""Extract score from rating string"""
if not rating_str:
return "No rating"
parts = rating_str.split()
return parts[0] if parts else "No rating"
def main():
"""Main function demonstrating a practical property search workflow"""
# Initialize the client
client = ParseClient()
# Define search parameters for a trip next week
today = datetime.now()
checkin_date = (today + timedelta(days=7)).strftime("%Y-%m-%d")
checkout_date = (today + timedelta(days=10)).strftime("%Y-%m-%d")
destination = "Paris"
adults = 2
rooms = 1
print("=" * 70)
print(f"BOOKING.COM PROPERTY SEARCH: {destination.upper()}")
print("=" * 70)
print(f"Check-in: {checkin_date}")
print(f"Check-out: {checkout_date}")
print(f"Guests: {adults} adults in {rooms} room(s)")
print("=" * 70)
# Step 1: Search for available properties
print(f"\n[1/2] Searching for properties in {destination}...")
try:
search_results = client.search_properties(
destination=destination,
checkin=checkin_date,
checkout=checkout_date,
adults=adults,
rooms=rooms,
offset=0,
)
total_found = search_results.get("data", {}).get("total_found", 0)
properties = search_results.get("data", {}).get("properties", [])
print(f"✓ Found {total_found} properties matching your criteria")
print(f"✓ Retrieved {len(properties)} properties in this batch\n")
if not properties:
print("No properties available for the selected dates.")
return
# Step 2: Display search results and fetch details for top options
print("[2/2] Retrieving detailed information for top 5 properties...\n")
print("-" * 70)
properties_to_detail = properties[:5]
detailed_results: List[Dict] = []
for idx, prop in enumerate(properties_to_detail, 1):
prop_name = prop.get("name", "Unknown Property")
prop_url = prop.get("url", "")
prop_price = prop.get("price", "Price not available")
prop_rating = prop.get("rating", "")
rating_score = format_rating(prop_rating)
print(f"\n{idx}. {prop_name}")
print(f" Price: {prop_price}")
print(f" Rating: {rating_score}")
# Fetch detailed information for each property
if prop_url:
try:
details = client.get_property_details(prop_url)
detail_data = details.get("data", {})
address = detail_data.get("address", "Address not available")
description = detail_data.get("description", "No description available")
# Truncate long descriptions for display
desc_preview = (
description[:100] + "..." if len(description) > 100 else description
)
print(f" Address: {address}")
print(f" {desc_preview}")
detailed_results.append(
{
"name": detail_data.get("name", prop_name),
"address": address,
"description": description,
"price": prop_price,
"rating": rating_score,
"url": prop_url,
}
)
print(" ✓ Details loaded")
except requests.exceptions.RequestException as e:
print(f" ✗ Could not retrieve details: {str(e)}")
detailed_results.append(
{
"name": prop_name,
"address": "Not available",
"description": "Details could not be retrieved",
"price": prop_price,
"rating": rating_score,
"url": prop_url,
}
)
else:
print(" ✗ No URL available for details")
# Step 3: Display final summary
print("\n" + "=" * 70)
print("SUMMARY: RECOMMENDED PROPERTIES")
print("=" * 70)
for idx, prop in enumerate(detailed_results, 1):
print(f"\n{idx}. {prop['name']}")
print(f" Location: {prop['address']}")
print(f" Price: {prop['price']}")
print(f" Guest Rating: {prop['rating']}")
if prop['description'] != "Details could not be retrieved":
desc_preview = (
prop['description'][:120] + "..."
if len(prop['description']) > 120
else prop['description']
)
print(f" About: {desc_preview}")
print(f" Link: {prop['url']}")
print("\n" + "=" * 70)
print(f"Search Complete: Displayed {len(detailed_results)} of {total_found} properties")
print("=" * 70)
except requests.exceptions.RequestException as e:
print(f"✗ API Error: {str(e)}")
print("Please check your API key and network connection.")
except ValueError as e:
print(f"✗ Configuration Error: {str(e)}")
if __name__ == "__main__":
main()Search for properties on Booking.com by destination, dates, and guest configuration. Returns paginated results with property names, URLs, prices, and ratings.
| Param | Type | Description |
|---|---|---|
| rooms | integer | Number of rooms |
| adults | integer | Number of adults |
| offset | integer | Results offset for pagination (increments of 25) |
| checkinrequired | string | Check-in date in ISO format YYYY-MM-DD |
| checkoutrequired | string | Check-out date in ISO format YYYY-MM-DD |
| destinationrequired | string | Search destination (city, region, or property name) |
{
"type": "object",
"fields": {
"properties": "array of objects each containing name, url, price, rating, and address",
"total_found": "integer total number of matching properties"
},
"sample": {
"data": {
"properties": [
{
"url": "https://www.booking.com/hotel/fr/hotelwestminster.html?aid=304142&...",
"name": "Hotel Westminster",
"price": "$1,013",
"rating": "Scored 8.6 8.6Excellent 859 reviews",
"address": null
}
],
"total_found": 1370
},
"status": "success"
}
}About the Booking API
Search Properties
The search_properties endpoint accepts a destination string (city, region, or property name), required checkin and checkout dates in YYYY-MM-DD format, and optional parameters for adults, rooms, and pagination via offset (increments of 25). Each result in the properties array includes the property name, url, price, rating, and address. The total_found integer tells you how many total results matched, allowing you to page through large result sets by incrementing offset.
Get Property Details
The get_property_details endpoint takes a single url parameter — a standard Booking.com hotel page URL such as https://www.booking.com/hotel/fr/opale-noire.html — and returns the property name, address (or null if unavailable), and description text. This is useful for enriching search results with the full prose description that Booking.com displays on the listing page.
Coverage and Limitations
Search results reflect availability for the date range and guest configuration you supply, so the same destination query can return different prices or availability on different calls. Pagination uses a fixed increment of 25 via the offset parameter; there is no cursor-based pagination. The get_property_details endpoint currently returns name, address, and description — it does not expose room-type breakdowns, amenity lists, photo URLs, or review text.
The Booking API is a managed, monitored endpoint for booking.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when booking.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official booking.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Aggregate hotel prices for a destination across a date range using
search_propertiesprice and rating fields - Build a travel comparison tool that pages through all results using
total_foundandoffset - Populate a property database with addresses and descriptions via
get_property_details - Monitor price changes for specific Booking.com properties by querying
search_propertieson a schedule - Feed structured property names and URLs into an itinerary planning application
- Validate or enrich an existing hotel list by resolving Booking.com URLs to current names and addresses
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Booking.com have an official developer API?+
What does `search_properties` return for each property?+
properties array contains five fields: name (string), url (string linking to the Booking.com listing), price (string for the stay total or nightly rate as displayed), rating (string or numeric score), and address (string). The total_found integer at the top level reflects the full count of matching results across all pages.Does `get_property_details` return amenities, photos, or room types?+
name, address, and description text only. Amenity lists, photo URLs, room-type breakdowns, and cancellation policy are not part of the response. You can fork this API on Parse and revise it to add an endpoint targeting those fields.Can I retrieve guest reviews through this API?+
search_properties endpoint returns a rating value per property, but individual review text, review counts, and category scores are not exposed. You can fork this API on Parse and revise it to add a reviews endpoint.How does pagination work in `search_properties`?+
offset parameter, which increments in steps of 25. Each response includes total_found so you can calculate how many pages exist. There is no cursor or token — you advance through results by incrementing offset by 25 per call.