[Home](/)[Blog](/blog)How to Find a Booking.com Hotel ID (3 Ways, With Examples)

# How to Find a Booking.com Hotel ID (3 Ways, With Examples)

 ![Denis Gramm, StayAPI](/blog_post_author.png)

By Denis Gramm, StayAPI· Aug 20, 2026 ·5 min read

I hope you enjoy reading this blog post. If you want our team to help you with hotel data integration, [click here](/book-demo).

Quick summary

Every Booking.com property has a numeric hotel ID that never appears in the URL. Here are three ways to find it: read the page source, convert the URL with an API call, or look up IDs in bulk for a whole hotel list.

## Table of contents

- [Method 1: Read the Hotel ID From the Page Source](#method-1-read-the-hotel-id-from-the-page-source)
- [Method 2: Convert the URL With an API](#method-2-convert-the-url-with-an-api)
- [Method 3: Bulk Lookup for a Hotel List](#method-3-bulk-lookup-for-a-hotel-list)
- [What You Can Do With a Hotel ID](#what-you-can-do-with-a-hotel-id)
- [FAQ](#faq)

![How to Find a Booking.com Hotel ID (3 Ways, With Examples) — StayAPI](/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzI0LCJwdXIiOiJibG9iX2lkIn19--4ff0c263b88a93456993810d665a8d7c8d3a170b/hero_a.png?disposition=inline)

Every property on Booking.com has a numeric hotel ID.  
 It's how Booking.com's own systems, and any API working with Booking.com data, identify a specific property.  
 You need it for review extraction, price monitoring, and data pipelines; if you searched for a Booking.com hotel ID finder, this page is that, in three methods.  
 The catch: unlike TripAdvisor, Booking.com never prints the ID in the URL.

| Method | Best when | Time |
| --- | --- | --- |
| **1. Read the page source** | You have the property page open in a browser | 30 seconds |
| **2. URL-to-ID API call** | You have the URL (or just the hotel name) and want it in code | 1 request |
| **3. Bulk lookup** | You have a spreadsheet of 50+ properties | One no-code flow |

## Method 1: Read the Hotel ID From the Page Source

![Method 1: Read the Hotel ID From the Page Source — StayAPI](/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzI2LCJwdXIiOiJibG9iX2lkIn19--895141bb92c4c29289fcd9fc696f845c4e62ff5f/method_1_read_the_hotel_id_from_the_page_source_a.png?disposition=inline)

First, what the URL does and doesn't tell you:

```
https://www.booking.com/hotel/th/baan-coconut.html
```

| Segment | What it is | In this example |
| --- | --- | --- |
| `th` | Country code | Thailand |
| `baan-coconut` | Property slug | Baan Coconut hotel |
| (nowhere) | Hotel ID | Missing from the URL entirely |

The numeric ID lives in the page's HTML instead.  
 On a typical property page it appears over 100 times, so it's easy to find once you know what to search for:  
 1. Open the property page on Booking.com.  
 2. View the page source: `Cmd+U` on Mac, `Ctrl+U` on Windows (or right-click and pick "View Page Source").  
 3. Search for `b_hotel_id`. The number next to it is the hotel ID.  
 For Baan Coconut, the source contains `b_hotel_id: '1302021'`, so the hotel ID is `1302021`.  
 The same number also appears in `data-hotel-id="1302021"` attributes throughout the page, if you prefer searching for that.  
 This works for any public listing, no login required.

## Method 2: Convert the URL With an API

![Method 2: Convert the URL With an API — StayAPI](/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzI4LCJwdXIiOiJibG9iX2lkIn19--4d3c5e1048e740716b0bd6df90c6d361d438fb9c/method_2_convert_the_url_with_an_api_a.png?disposition=inline)

When you're working in code, or you have a hotel name instead of a URL, an API lookup beats view-source.  
 StayAPI's [Booking.com URL-to-ID endpoint](https://stayapi.com/docs/endpoints/booking/url-to-id) takes the country/slug segment of the listing URL and returns the numeric ID:

```
curl -X GET "https://api.stayapi.com/v1/booking/hotel/url-to-id?url=th/baan-coconut" \
  -H "x-api-key: YOUR_API_KEY"
```

```
{
  "hotel_id": "1302021",
  "url": "https://www.booking.com/hotel/th/baan-coconut.html"
}
```

The `url` parameter is the part after `/hotel/` in the listing URL: `th/baan-coconut` here.  
 One `split()` on the URL you already have produces it.  
 Starting from a hotel name with no URL at all?  
 The [meta match endpoint](https://stayapi.com/docs/endpoints/meta-match) resolves a name like "Baan Coconut Phuket" to its canonical Booking.com URL, which you then feed into URL-to-ID.  
 Sign up at [stayapi.com](https://stayapi.com/users/sign_up) to get an API key. Free tier, no credit card.  
 For a one-off lookup with no code, the free [Booking.com hotel details tool](https://stayapi.com/free-tools/booking-hotel-details) takes the full listing URL in the browser.

## Method 3: Bulk Lookup for a Hotel List

![Method 3: Bulk Lookup for a Hotel List — StayAPI](/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzMwLCJwdXIiOiJibG9iX2lkIn19--c3717816312086f639fc8a05fa61733e0937b8d8/method_3_bulk_lookup_for_a_hotel_list_a.png?disposition=inline)

The scenario: 50-500 hotel names or URLs in a spreadsheet, and you need the Booking.com hotel ID for each.  
 View-source stops scaling at around 10 properties.  
 The workflow, no code required:  
 1. Put your hotel names or URLs in a Google Sheet, one per row.  
 2. Build an N8N or Make.com flow: for each row, resolve the name to a URL with meta match (skip this step if you already have URLs).  
 3. Send the URL's country/slug segment to the URL-to-ID endpoint.  
 4. Write `hotel_id` back to the row.  
 Starting from URLs, each hotel costs 1 request; starting from names, 2.  
 For very large lists (1,000+), run the flow overnight rather than firing everything at once.

## What You Can Do With a Hotel ID

Once you have the ID, the rest of the [Booking.com data API](https://stayapi.com/apis/booking) surface takes it as input:

| Use | Input | What you get |
| --- | --- | --- |
| **Review extraction** | Hotel ID | Full review text, scores, dates, nationalities, in JSON |
| **Price monitoring** | Hotel ID + dates | Room types and nightly rates for any stay window |
| **Details and photos** | Hotel ID | Facilities, location data, photo URLs |

The most common next step is [pulling Booking.com reviews programmatically](https://stayapi.com/blog/booking-com-reviews-api): the hotel ID is the one required parameter of the [hotel reviews endpoint](https://stayapi.com/docs/endpoints/booking/hotel-reviews).  
 Comp-set work follows the same pattern: collect the IDs for your competitor set once, then track their prices and review scores on a schedule.

## FAQ

### What is a Booking.com hotel ID?

A unique numeric identifier Booking.com assigns to every property on the platform.  
 It doesn't appear in the listing URL; it lives in the page source and in API responses.

### Is the hotel ID the same as the property ID in the extranet?

Booking.com shows partners a property ID inside the [extranet](https://partner.booking.com/en-us/help/account-and-log/settings/logging-bookingcom-extranet) after login.  
 For any public listing, including your own, the page-source method in this guide gets you the numeric ID without logging in.

### Is the hotel ID the same as my booking confirmation number?

No.  
 A confirmation number identifies one reservation and comes in your booking email.  
 The hotel ID identifies the property itself, for every guest and every date.

### Do Booking.com hotel IDs change?

Rarely.  
 IDs are stable unless a listing is removed and re-created, for example after an ownership change where the new owner lists the property fresh.

### How do I find hotel IDs for hundreds of hotels at once?

Feed names or URLs through a lookup API in a loop, as in Method 3.  
 A spreadsheet plus an N8N flow handles it without code, and each hotel resolves in 1-2 requests.

50 free requests, no card
## Ready to simplify your hotel data?

Join other developers using StayAPI to build the next generation of travel applications. Get started for free today.

[Start Building Free](/users/sign_up)[Book a call](/book-demo)

[← Back to Blog](/blog)[Previous: Airbnb Scraper: Tools, DIY Python, and Scraper APIs Compared →](/blog/airbnb-scraper)

Hotel data
### Want accurate hotel data?

Stop building data pipelines and start building product. Reliable access to hotel reviews, prices, and details with StayAPI.

[Book a call](/book-demo)

## Table of contents

- [Method 1: Read the Hotel ID From the Page Source](#method-1-read-the-hotel-id-from-the-page-source)
- [Method 2: Convert the URL With an API](#method-2-convert-the-url-with-an-api)
- [Method 3: Bulk Lookup for a Hotel List](#method-3-bulk-lookup-for-a-hotel-list)
- [What You Can Do With a Hotel ID](#what-you-can-do-with-a-hotel-id)
- [FAQ](#faq)

About StayAPI

StayAPI: Hotel Data API

For travel-tech developers

We collect, clean, and standardize hotel data so you can build amazing travel products without maintaining your own data collection.

Live on every request

One x-api-key header

Supported sources

Booking.comTripAdvisorAirbnbAgodaGoogle Hotelsand more
