Search by URL API
Search for hotels using a Booking.com search results URL directly from your browser.
Overview
Simplest Search Method
Copy any Booking.com search URL from your browser and use it directly to get hotel results via the API.
The Search by URL endpoint allows you to use any Booking.com search results URL directly. This is perfect when you want to replicate a search you've already configured on Booking.com's website without manually extracting all the parameters.
Endpoint URL
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Required | Booking.com search results URL to parse and execute |
| debug | boolean | Optional | Return parsed parameters without executing search (default: false) |
| country_market | string (ISO-3166) | Optional |
Two-letter market country (default: US). Booking.com prices by the visitor's country, so the same stay can cost different amounts per market. Use the same value across search, rooms, and prices for matching numbers; the value used is echoed in the response.
|
How It Works
Step 1: Get Your URL
- Go to Booking.com
- Search for hotels with your desired criteria
- Copy the URL from your browser's address bar
Step 2: Use the API
Pass the copied URL to this endpoint:
Supported URL Parameters
The API reads these parameters from the URL:
- Destination:
dest_id,dest_type - Dates:
checkin,checkout - Guests and rooms:
group_adults,group_children,age[0],age[1], …,no_rooms - Paging:
offset,rows - Language and currency:
lang,selected_currency - Highlighted hotels:
highlighted_hotels
Filters (nflt), price ranges, and sort order in the URL are not applied; results use Booking.com's default ranking. The URL must be percent-encoded when passed as the url parameter. Pass country_market as its own parameter, not inside the Booking.com URL.
Debug Mode
Testing Parameters
Use debug=true to see what parameters are extracted from your URL without running the actual search.
When debug=true, the API returns the parsed parameters instead of search results. This is useful for:
- Verifying the URL is parsed correctly
- Understanding what parameters are being used
- Debugging search issues