Skip to main content

Scrape reviews from Booking

Updated over 2 years ago

You are browsing a tutorial guide for the latest Octoparse version. If you are running an older version of Octoparse, we strongly recommend you upgrade because it is faster, easier and more robust! Download and upgrade here if you haven't already done so!

Booking is one of the largest online hotel booking websites. This tutorial will show you how to scrape reviews of hotels from Booking with Octoparse.

To follow through, here is the example URL:

The main steps are shown in the menu on the right and you can download the sample task file here.


1. Create a Go to Web Page - to open the target website

  • Enter the target URL on the homepage of Octoparse and click Start


2. Extract Data - to scrape the basic information of the hotel

  • Select the hotel names, locations, etc, from the page

  • Choose Text under Extract data


3. Click "Read all reviews" - to show all reviews

  • Click Read all reviews in the Guest reviews area

  • Choose the Click element on the Tips

  • Paste the updated XPath //span[contains(text(),"Read all reviews")] for Click Item >Click Apply

  • Set up Load with AJAX 4s for the Click Item


4. Scrape general ratings for the hotel - to scrape the category ratings

  • Click on the spots below after the review panel pops up

  • Choose Extract data from the Tips box


5. Set up a loop for detailed reviews - to scrape reviews from guests

  • Click the entire review box

  • Choose Select sub-elements from the Tips panel after it turns green

  • Click Select all similar groups from the Tips box

  • Click Element data on the Tips panel

  • Double-click the header to rename the field

  • Click More > delete field to delete unwanted fields


6. Set up Pagination Loop - to scrape data from multiple listing pages

  • Click the next page > button

  • Choose Loop click on the Tips panel

  • Click on the Pagination box

  • Input Xpath //a[@class="pagenext"]

  • Click Apply

  • Set up AJAX Load as 10s for the Click to Paginate

The final workflow should look like this:


7. Run the task - to get your target data

  • Click Run to run your task either on your device or in the cloud

  • Select Standard Mode under Run on your device to run the task on your local device

  • Waiting for the task to complete

Here is the sample output data, which can be exported in Excel, CSV, HTML and JSON formats.

Did this answer your question?