| name | booking-com-search |
| description | Search and extract hotel prices from Booking.com |
Task: Search for hotels on Booking.com and extract the top 5 options with real prices.
Search parameters:
- Destination: {city}
- Check-in: {checkin}
- Check-out: {checkout}
- Guests: {guests} adults
- Rooms: {rooms}
Steps:
- Navigate to https://www.booking.com/
- If a sign-in popup or modal appears (button labeled "Dismiss sign-in info" or similar), close it first.
- Find the destination search field (combobox labeled "Where are you going?"). Click it, clear any existing text, then type "{city}" character by character. Wait 2-3 seconds for the autocomplete dropdown to appear.
- From the dropdown, select the option that best matches "{city}" (e.g., "{city}, Japan" or "{city} Tokyo-to, Japan"). The option elements appear as
option or button roles in the dropdown listbox.
- After selecting the destination, the calendar picker opens automatically. It shows two months of dates as checkbox elements (e.g., "Fr 1 May 2026"). Find and click the checkbox for {checkin}. The check-in date is now set.
- The calendar stays open for check-out selection. Find and click the checkbox for {checkout}. Both dates are now confirmed (shown as e.g., "Fri, May 1 โ Wed, May 6" in the date button).
- Close the calendar by clicking the date button itself (toggling it closed).
- Look for an occupancy/guests button (labeled like "2 adults ยท 0 children ยท 1 room"). If visible and the values don't match {guests} adults and {rooms} room(s), click it and adjust using the +/- buttons. If not visible, the defaults (2 adults, 1 room) are already applied.
- Click the "Search" button.
- Wait for the page to load. Booking.com may redirect to a city page (URL like /city/jp/tokyo.html) with the calendar open again. If this happens:
a. The calendar will show again โ re-select {checkin} and {checkout} dates as in steps 5-6.
b. Close the calendar and click "Search" again.
- Once results load, look for sort buttons: "Our top picks", "Lowest Price First", "Star rating and price", "Top reviewed". Click "Lowest Price First" or "Top reviewed" based on preference.
- Extract the top 5 hotels from the results. Each hotel card is a link element containing:
- Hotel name
- Location (e.g., "Hotel in Shibuya Ward, Tokyo")
- Star rating (shown as "X stars")
- Review score and label (e.g., "8.7 Excellent")
- Price for the stay (e.g., "$164" or "S$ 890")
- Each hotel has a "Check availability" link โ use its href as the booking URL
Return the results as a JSON array with this format:
[
{"name": "...", "location": "...", "rating": "...", "price_per_night": "...", "currency": "...", "booking_url": "..."},
...
]
Important notes:
- The calendar uses checkbox elements for dates, NOT regular buttons. Dates are labeled like "Fr 1 May 2026" or "We 6 May 2026".
- Past dates are disabled checkboxes.
- Use "Next month" button if the target month is not visible.
- If no prices are shown (only "Check availability"), it means dates were not properly applied โ go back and re-enter dates.