Booking Data Scraper
While Booking doesn’t offer an official API to collect its public data from (probably for a good reason), we can still legally scrape its search results data without violating the Booking Terms of Service using a little-known technique involving HAR files. The approach we’ll outline is totally legal, as the scraping occurs on a recording of your web traffic instead of the actual Booking website.
1. Browse Booking Data
Run a search on the Booking Hotel, Flight & Car Search Feature (or you can browse another part of their website, as long as it returns interactive data that you can browse and paginate through) for whatever Booking data you want to scrape.
Specify any filters, sort orders or other special options you want, and once the results look good right click in the webpage and hit “Inspect” to open developer tools to begin recording your web traffic.
Now refresh your browser to reload the data (now that we’re recording) and then paginate through the results (click the next button at the end of the results). Every time you do this, Booking will send structured data to your web browser which we’ll be recording.
2. Export a HAR File
Once you’re done browsing, go to the “Network” tab in developer tools and click the down arrow labeled “Export HAR…” to download a HAR file containing all of the hotel, flight & rental car data captured in your recording.
Upload that file to the HAR File Web Scraper and we’ll parse out the file into groups of data you can download, which should include the search results you browsed through.
3. Download Booking Data
Once you find the relevant group from the previous step, click “Parse Group” and you’ll see on the next screen a list of CSV files you can download containing a copy of the data Booking sent to your browser.