Discover/Rapidapi API
live

Rapidapi APIbooking-com.p.rapidapi.com

Search Booking.com hotels by location and retrieve structured property details: amenities, ratings, reviews, images, and pricing via two simple endpoints.

Endpoints
2
Updated
2mo ago

What is the Rapidapi API?

The Booking.com API exposes 2 endpoints covering hotel search and property detail extraction, returning up to 9 structured fields per property including amenities, rating scores, review counts, and images. Use search_properties to find hotels by city or keyword, then pass any result URL to get_property_details to pull full structured data for a specific listing.

Try it
Maximum number of results to return.
Search keyword such as city name, hotel name, or area (e.g. 'London', 'Paris', 'New York').
api.parse.bot/scraper/15bd80e1-56cd-4b5d-bb77-42d31d8b2067/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/15bd80e1-56cd-4b5d-bb77-42d31d8b2067/search_properties?limit=3&query=Paris' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

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-p-rapidapi-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 Scraper API Client

Get your API key from: https://parse.bot/settings
"""

import os
import requests
from typing import Any, Dict, List, Optional


class ParseClient:
    """Client for interacting with the Booking.com Scraper API."""
    
    def __init__(self, api_key: Optional[str] = None):
        """
        Initialize the ParseClient.
        
        Args:
            api_key: API key for Parse Bot. If not provided, reads from PARSE_API_KEY env var.
        """
        self.base_url = "https://api.parse.bot"
        self.scraper_id = "15bd80e1-56cd-4b5d-bb77-42d31d8b2067"
        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[str, Any]:
        """
        Make an API call to the Parse Bot scraper.
        
        Args:
            endpoint: The endpoint name (e.g., "search_properties")
            method: HTTP method ("GET" or "POST")
            **params: Parameters to send with the request
            
        Returns:
            The API response as a dictionary
            
        Raises:
            requests.HTTPError: If the API request fails
        """
        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, timeout=30)
        elif method == "POST":
            response = requests.post(url, headers=headers, json=params, timeout=30)
        else:
            raise ValueError(f"Unsupported HTTP method: {method}")
        
        response.raise_for_status()
        return response.json()
    
    def search_properties(self, query: str, limit: int = 10) -> Dict[str, Any]:
        """
        Search for hotel properties by location or keyword.
        
        Args:
            query: Search keyword such as city name, hotel name, or area.
            limit: Maximum number of results to return (default: 10).
            
        Returns:
            Dictionary containing query, total_results, and results array with property data.
        """
        return self._call("search_properties", method="GET", query=query, limit=limit)
    
    def get_property_details(self, url: str) -> Dict[str, Any]:
        """
        Extract detailed information for a specific Booking.com hotel property.
        
        Args:
            url: The full Booking.com property URL.
            
        Returns:
            Dictionary containing detailed property information including name, address,
            rating, description, amenities, and images.
        """
        return self._call("get_property_details", method="GET", url=url)


def format_rating(rating_str: str) -> str:
    """Parse and format rating string from search results."""
    if not rating_str:
        return "N/A"
    return rating_str.strip()


def display_search_results(results: List[Dict[str, Any]]) -> None:
    """Display formatted search results."""
    for i, hotel in enumerate(results, 1):
        print(f"\n{i}. {hotel.get('name', 'N/A')}")
        print(f"   Rating: {format_rating(hotel.get('rating', 'N/A'))}")
        print(f"   Price: {hotel.get('price', 'N/A')}")
        print(f"   Address: {hotel.get('address', 'N/A')}")
        print(f"   URL: {hotel.get('url', 'N/A')}")


def display_property_details(details: Dict[str, Any]) -> None:
    """Display formatted property details."""
    print(f"\n📋 Hotel: {details.get('name', 'N/A')}")
    print(f"📍 Address: {details.get('address', 'N/A')}")
    print(f"⭐ Rating: {details.get('rating_score', 'N/A')}/10 ({details.get('rating_category', 'N/A')})")
    print(f"📝 Reviews: {details.get('review_count', 'N/A')} reviews")
    print(f"💰 Price: {details.get('price', 'N/A')}")
    
    # Display description
    description = details.get('description_text', '')
    if description:
        truncated = description[:200] + "..." if len(description) > 200 else description
        print(f"📄 Description: {truncated}")
    
    # Display amenities
    amenities = details.get('amenities', [])
    if amenities:
        print(f"🏨 Amenities ({len(amenities)} total):")
        for amenity in amenities[:5]:
            print(f"   • {amenity}")
        if len(amenities) > 5:
            print(f"   ... and {len(amenities) - 5} more")
    
    # Display images
    images = details.get('images', [])
    if images:
        print(f"📸 Images available: {len(images)}")


def main():
    """Practical workflow: search for hotels and retrieve detailed information."""
    try:
        # Initialize the client
        client = ParseClient()
        
        print("=" * 70)
        print("BOOKING.COM HOTEL SEARCH & DETAILS RETRIEVAL")
        print("=" * 70)
        
        # Step 1: Search for properties
        search_location = "Paris"
        print(f"\n🔍 Searching for hotels in '{search_location}'...")
        
        search_response = client.search_properties(query=search_location, limit=5)
        
        if search_response.get('status') != 'success':
            print(f"❌ Search failed: {search_response}")
            return
        
        search_data = search_response.get('data', {})
        total_results = search_data.get('total_results', 0)
        results = search_data.get('results', [])
        
        print(f"\n✅ Found {total_results} total hotels")
        print(f"📊 Showing {len(results)} results:")
        
        display_search_results(results)
        
        # Step 2: Get detailed information for each hotel
        hotel_urls = [hotel.get('url') for hotel in results if hotel.get('url')]
        
        if hotel_urls:
            print("\n" + "=" * 70)
            print("DETAILED HOTEL INFORMATION")
            print("=" * 70)
            
            for idx, hotel_url in enumerate(hotel_urls[:3], 1):
                print(f"\n[{idx}/{min(3, len(hotel_urls))}] Fetching details...")
                
                try:
                    details_response = client.get_property_details(url=hotel_url)
                    
                    if details_response.get('status') != 'success':
                        print(f"⚠️  Could not fetch details for this property")
                        continue
                    
                    details_data = details_response.get('data', {})
                    display_property_details(details_data)
                    print("-" * 70)
                    
                except requests.exceptions.RequestException as e:
                    print(f"❌ Error fetching property details: {e}")
                except Exception as e:
                    print(f"❌ Unexpected error: {e}")
        
        print("\n✅ Hotel search and details retrieval complete!")
    
    except ValueError as e:
        print(f"❌ Configuration error: {e}")
    except requests.exceptions.RequestException as e:
        print(f"❌ Network error: {e}")
    except Exception as e:
        print(f"❌ Unexpected error: {e}")


if __name__ == "__main__":
    main()
All endpoints · 2 totalmissing one? ·

Search for hotel properties by location or keyword. Returns a list of properties with name, URL, price, and rating. Results do not include check-in/check-out date pricing unless dates are specified in the search query.

Input
ParamTypeDescription
limitintegerMaximum number of results to return.
queryrequiredstringSearch keyword such as city name, hotel name, or area (e.g. 'London', 'Paris', 'New York').
Response
{
  "type": "object",
  "fields": {
    "query": "string - the search query used",
    "results": "array of property objects with name, url, price, rating, address",
    "total_results": "integer - number of results returned"
  },
  "sample": {
    "data": {
      "query": "London",
      "results": [
        {
          "url": "https://www.booking.com/hotel/gb/merlyn-court-greater-london1.html",
          "name": "The Barkston",
          "price": null,
          "rating": "Scored 8.98.9Excellent97 reviews",
          "address": null
        }
      ],
      "total_results": 5
    },
    "status": "success"
  }
}

About the Rapidapi API

Endpoints

search_properties accepts a required query string — a city name, area, or hotel name — plus an optional limit integer to cap results. The response returns an array of property objects, each with name, url, price, rating, and address, along with a total_results count. Prices in search results reflect availability only when check-in and check-out dates are included in the query; otherwise the price field may be absent.

get_property_details takes a full Booking.com property URL and returns a richer dataset: name, address, rating_score (numeric, out of 10), rating_category (e.g. "Excellent", "Good"), review_count, description_text, an amenities array, and an images array of direct image URLs. The price field is present only when date parameters are embedded in the URL — passing a bare property URL without dates returns null for price.

Data Coverage

Rating data comes as both a numeric rating_score and a human-readable rating_category, which makes it straightforward to bucket properties without building your own thresholds. The amenities field is an array of facility strings (e.g. "Free WiFi", "Parking", "Swimming pool") as listed on the property page. Images are returned as an array of direct URLs, ready to use in any front-end display.

Limitations

Availability calendars, room-type breakdowns, and real-time inventory are not returned by either endpoint. Price data depends on dates being present in the URL or query — without dates, price is null. The API returns results in the default Booking.com locale and does not currently expose parameters for language or currency selection.

Reliability & maintenance

The Rapidapi API is a managed, monitored endpoint for booking-com.p.rapidapi.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when booking-com.p.rapidapi.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.p.rapidapi.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?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a hotel comparison tool that ranks properties by rating_score and review_count across multiple cities.
  • Aggregate amenities arrays from dozens of listings to filter hotels that include specific facilities like parking or breakfast.
  • Populate a travel app's property cards using name, address, images, and rating_category from get_property_details.
  • Monitor price changes for a set of property URLs by polling get_property_details with date-stamped URLs.
  • Create a destination guide that surfaces top-rated hotels per city using search_properties with city names as queries.
  • Feed structured hotel metadata into a recommendation engine using description_text and amenities fields.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does Booking.com have an official developer API?+
Yes. Booking.com offers the Booking.com Connectivity APIs and the Affiliate Partner Program API, primarily targeting accommodation partners and affiliates rather than general data access. Documentation is at developers.booking.com. Those APIs require a partner or affiliate agreement. This Parse API provides structured property data without requiring a Booking.com partnership.
When does `get_property_details` return a non-null price?+
The price field is populated only when check-in and check-out dates are embedded in the property URL you supply. A bare property URL (e.g. https://www.booking.com/hotel/gb/stgileshotel.html) without date query parameters returns null for price. To get pricing, append checkin and checkout date parameters to the URL before passing it to the endpoint.
Does the API return room-type breakdowns or availability calendars?+
Not currently. Both endpoints return property-level data: overall price, rating, amenities, and description. Room-type inventory, per-room pricing, and availability calendars are not included. You can fork this API on Parse and revise it to add an endpoint targeting room-level detail pages.
Can I paginate through large search result sets?+
search_properties accepts a limit parameter to cap the number of results returned, but there is no offset or page parameter exposed. The API returns a single batch of results up to the specified limit. You can fork this API on Parse and revise it to add pagination support for deeper result sets.
Does the API support filtering search results by amenity, star rating, or price range?+
The search_properties endpoint accepts only a query string and an optional limit — there are no server-side filter parameters for amenity type, star rating, or price range. Filtering must be done client-side against the returned rating and property fields. You can fork this API on Parse and revise it to add filter parameters if the underlying search supports them.
Page content last updated . Spec covers 2 endpoints from booking-com.p.rapidapi.com.
Related APIs in TravelSee all →
booking.com API
Search for accommodations across Booking.com and instantly access detailed property information including pricing, amenities, and guest reviews to compare your options. Find the perfect stay by filtering thousands of listings and retrieving comprehensive details like room descriptions, availability, and booking terms all in one place.
vrbo.com API
Search and browse vacation rental listings on Vrbo by location, date range, and guest count. Retrieve detailed information about specific properties including descriptions, amenities, photos, pricing, guest reviews, and availability — everything needed to compare rental options in one place.
expedia.com API
Search for hotels and flights across Expedia while viewing detailed property information to compare prices and amenities for your travel plans. Get comprehensive travel options all from one integration without manually browsing the website.
hotels.com API
Search for hotels across millions of properties, view room availability and pricing, and get detailed information about accommodations at specific destinations. Get location suggestions and discover popular travel spots to help plan your next getaway.
airbnb.com API
Search Airbnb stays by destination and dates, then retrieve listing details, availability calendars, and recent guest reviews for a specific listing.
airbnb.pt API
Search for rental listings in any location, view detailed information about properties including availability and guest reviews. Browse hundreds of accommodations to find the perfect place that fits your travel needs and budget.
hotelscan.ai API
Search and compare hotels with detailed guest reviews, room availability, and pricing information across flexible dates. Find similar properties, get autocomplete suggestions for locations, and access comprehensive hotel details all in one place.
airbnb.es API
Search Airbnb listings across multiple cities and retrieve detailed information about properties and hosts, including availability, pricing, and reviews. Access comprehensive rental data to compare accommodations and make informed booking decisions.