Booking.com APIunofficial
Booking.com stays, logged out: search a destination for dates, a property's details, and its rooms and rates for dates.
- booking.com
all live 3 operations, checked by the installs that call them.
Seeded by the maintainers.
Try it
Set up API Anything for your agents:
npx -y api-anything setupThen ask your agent, which finds this site by itself, or call it from a shell:
api-anything pull booking
api-anything call booking getHotel country=pt hotel=santa-justaOperations
| Operation | Method | Login | Writes | Status |
|---|---|---|---|---|
getHotel(country, hotel) -> name, address, latlng, rating, reviews, subscores, facilities, description, checkIn, checkOutOne property's page without dates: name, address, latlng ("lat,lng"), rating (out of 10), reviews, subscores (one string per category), the most popular facilities, the description, checkIn and checkOut times. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
getRooms(country, hotel, checkin, checkout, adults?) -> roomId, room, maxPeople, price, taxes, conditions, leftA property's rooms and rates for dates and guests: one row per rate, with roomId, room (named on a room's first rate only), maxPeople, price (total for the stay), taxes (what the price excludes), conditions (meals, cancellation, prepayment) and left (scarcity note, when shown). |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
searchHotels(destination, checkin, checkout, adults?) -> name, country, hotel, location, distance, price, rating, reviews, roomSearch stays in a destination for dates: the first page of results (about 25) in Booking.com's default order (which mixes in sponsored stays), with name, country and hotel (the URL parts getHotel and getRooms take), location, distance, price (total for the stay, before some taxes), rating (out of 10), reviews and the suggested room. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
Notes
No account is needed.
- Dates are
YYYY-MM-DD, today or later.adultsdefaults to 2, in one room, with no children. - A property is named by two parts of its URL,
/hotel/<country>/<hotel>.html:searchHotelsreturns them ascountryandhotel, andgetHotelandgetRoomstake them. - Prices are strings in US dollars (
"$248"), the total for the whole stay. Taxes the price leaves out are ingetRooms'taxes. searchHotelsreturns the first page only (about 20 to 25 stays), in Booking.com's default order, which includes sponsored stays.ratingis out of 10 andreviewsis the review count, as text.getRoomsreturns one row per rate.roomis named only on the first rate of each room; the rows after it with the sameroomIdare other rates (breakfast, cancellation) for that room.maxPeopleis missing on some properties. Sold-out dates answerinput(no rates on the page).getHotelhas no dates: it does not say whether the property is available.- Plain HTTP to the search page meets an AWS WAF challenge when no earlier visit set its cookie, so the first
searchHotelscall often runs in the browser (about 20 s, then about 8 s a call).getHotelandgetRoomsanswer over plain HTTP.
About these operations
Each operation is a request learned from Booking.com's own web pages: API Anything replays it over plain HTTP and falls back to a browser when it must. Read them as JSON.