Booking Scraper avatar

Booking Scraper

Try for free

Pay $5.00 for 1,000 results

View all Actors
Booking Scraper

Booking Scraper

voyager/booking-scraper
Try for free

Pay $5.00 for 1,000 results

Scrape Booking with this hotels scraper and get data about accommodation on Booking.com. You can crawl by keywords or URLs for hotel prices, ratings, addresses, number of reviews, stars. You can also download all that room and hotel data from Booking.com with a few clicks: CSV, JSON, HTML, and Excel

Do you want to learn more about this Actor?

Get a demo
CL

Scrape data by hotel name

Open

Clickspider opened this issue
4 months ago

I am trying to scrape data on a specific hotel, is there a way in which I can robustly do that without knowing the URL ahead of time?, the data that I do have is the name of the hotel and check-in, check-out, etc.

lukas.prusa avatar

Hi Daniel, thanks for opening this issue!

Yes, the hotel ID/name is all you need. Simply append www.booking.com/hotel/ before the ID and you've got a functional start URL. e.g. hotel ID cz/residence-agnes + www.booking.com/hotel/ = www.booking.com/hotel/cz/residence-agnes.

And supply your check-in and check-out under the checkIn and checkOut input fields of the scraper.

I hope this helps, thanks!

Also, we have some issues currently with users not being able to comment/reopen on closed issues, so I will keep this open for now and feel free to close this if everything has been resolved :) Thanks and happy scraping!

CL

Clickspider

4 months ago

Hmm, I see but that will require me to know how booking.com exactly indexed their hotel in the system but I do not know that.

The best thing I could do now is have a start URL that the system can use to search the hotel (this is a URL I can create -

https://www.booking.com/searchresults.en-gb.html?ss=The%2BFirst%2BCollection%2Bat%2BJumeirah%2BVillage%2BCircle%252C%2Ba%2BTribute%2BPortfolio%2BHotel

)

Hotel name (example) - The First Collection at Jumeirah Village Circle, a Tribute Portfolio Hotel

What would be great is actually if I could search by hotel name from the start without giving any URLs and the API will do it like booking.com input ->

lukas.prusa avatar

I see, yeah, this is something the scraper currently doesn't support as of now. We do have a search input field, used pretty much like the booking one, but trying the direct hotel name there fails the scraper :D We use a bit unconventional way to get the results from the booking search feature, so it might take some time to fix this.

Btw, the URL that you've shared leads to a different hotel as the first result, see the screenshot. But I was able to modify it like this to get the expected outcome: https://www.booking.com/searchresults.en-gb.html?ss=The+First+Collection+at+Jumeirah+Village+Circle%2C+a+Tribute+Portfolio+Hotel

Looks like booking is once again very unreliable with its URLs and somehow escaping the URI characters leads to different results. Yet another reason I would recommend you to use the direct hotel IDs approach.

I will keep you updated here in the meantime, thanks!

CL

Clickspider

4 months ago

Thanks! do you know how I can get a hotel ID by just providing the hotel name somewhere?

lukas.prusa avatar

Well, manually opening the hotel detail page the URL have the hotel ID in it. So in your case, https://www.booking.com/hotel/ae/the-first-collection-jumeirah-village-dubai.en-gb.html the hotel ID would be ae/the-first-collection-jumeirah-village-dubai.

And you don't even need to filter out the hotel ID, you can just use that URL straight in this scraper :)

Sadly, I'm not aware of any other automation tools for this kind of job right now. But we will add this to the scraper :)

CL

Clickspider

4 months ago

Thanks, I managed to find a fix to generating automatically URLs, I just created my solution for that and would love to see it here.

zuzka avatar

Can you share the solution? It would/might be easy for us to add it to the scraper than :)

Developer
Maintained by Apify

Actor Metrics

  • 150 monthly users

  • 33 stars

  • 98% runs succeeded

  • 9.2 days response time

  • Created in Aug 2023

  • Modified 2 hours ago

Categories