Scrape property data from Booking.com using Google Chrome

This tutorial will show you how to extract property details from Booking.com using Web Scraper Chrome Extension. It helps to gather basic property details in and around a neighborhood, city or state.

What data are we extracting from Booking.com?

  1. Property Name
  2. Property Location
  3. Type of Room
  4. Price
  5. Star Rating
  6. Property Demand
  7. Overall Review
  8. Number of Reviews
  9. Customer Rating

The annotated screenshot below shows the data fields we will be scraping:

how-to-scrape-booking-com

Prerequisites

  • Google Chrome Browser – You will need to download the Chrome browser. The extension requires Chrome 49+.
  • Web Scraper Chrome Extension – The Web Scraper extension can be downloaded from the Chrome Web Store.  After downloading the extension you will see a spider icon in your browser toolbar.

Import the Booking Scraper

After installation, right-click anywhere on a page, go to ‘Inspect’ and the developer tools console will pop up. Click on the tab Web Scraper and go on to the ‘Create new sitemap’ button and click on the ‘Import sitemap’ option. Now paste the JSON given below in the Sitemap JSON box.

You can also copy it from Github – https://gist.github.com/scrapehero/e4d61dba2ef37c1e6278bbcce58f864a

how-to-import-booking-scraper

Obtaining the URL from Booking.com

Booking.com allows you to search for properties that you can filter based on parameters like destination, date, budget, star rating, distance from a city’s center, and other specific features. This scraper allows you to scrape data from Booking.com based on your requirements. You can select the filters for the data you need and copy the corresponding URL. In the Web Scraper toolbar, click on the Sitemap button, select the option “Edit metadata’ and paste the new URL (based on your filter) as the Start URL.

obtain-url-from-booking-com

Run the Scraper

Go to the Sitemap and click ‘Scrape’ from the drop down. A new instance of Chrome will launch, enabling the extension to scroll and grab the data. Once the scrape is complete, the browser will close automatically and send a notification.

run-booking-com-scraper

Download the Data

To download the scraped data as a CSV file that you can open in Microsoft Excel or Google Sheets, go to the Sitemap drop down > Export as CSV > Download Now.

We can help with your data or automation needs

Turn the Internet into meaningful, structured and usable data


Please DO NOT contact us for any help with our Tutorials and Code using this form or by calling us, instead please add a comment to the bottom of the tutorial page for help

Disclaimer: Any code provided in our tutorials is for illustration and learning purposes only. We are not responsible for how it is used and assume no liability for any detrimental usage of the source code. The mere presence of this code on our site does not imply that we encourage scraping or scrape the websites referenced in the code and accompanying tutorial. The tutorials only help illustrate the technique of programming web scrapers for popular internet websites. We are not obligated to provide any support for the code, however, if you add your questions in the comments section, we may periodically address them.

Posted in:   Travel Data Gathering Tutorials, Web Scraping Tutorials

Responses

nicowarschauer June 24, 2019

Guys, amazing stuff. Would you help me out modifying the JSON code so that the script also extracts hotel’s addresses?
Thanks!

Reply

flaviaanoukiebanshee September 5, 2019

Hey that’s great! I would like to have the same help asked by nicowarschauer. Thank you guys!

Reply

Comments or Questions?

Turn the Internet into meaningful, structured and usable data   

Enjoying our Tutorials?

Subscribe to our weekly updates on the latest tutorials in Web Scraping and Data Extraction