booking-scraper-api
v0.0.1
Published
Node.js client for scraping Booking.com hotel rates and reviews using the ScrapingBee web scraping API.
Downloads
135
Maintainers
Readme
Booking Scraper API (Node.js)
Collect Booking.com hotel rates from Node without a browser or an HTML parser. This package wraps the ScrapingBee web scraping API: pass a destination and check-in and check-out dates, and it resolves to a JSON array of properties with name, price, review score, and location.
Booking.com leans on JavaScript and anti-bot challenges, which is why a raw fetch tends to come back empty. This Booking scraper renders the page and uses residential proxies by default, and it exposes a Stealth switch for searches that hit a challenge wall.
Install
npm install booking-scraper-apiNode 14 or newer. axios comes along as a dependency.
Usage
const { BookingScraper } = require('booking-scraper-api');
const scraper = new BookingScraper({ apiKey: 'YOUR_SCRAPINGBEE_API_KEY' });
(async () => {
const { hotels } = await scraper.search('Rome, Lazio, Italy', {
checkin: '2026-10-25',
checkout: '2026-10-26',
adults: 2,
rooms: 1,
});
hotels.forEach((h) => console.log(`${h.name} - ${h.price} - ${h.score}`));
})();Sign up at ScrapingBee for 1,000 free credits, no card required.
Options
search(destination, options) takes the destination first and an options object second. Booking.com pages in increments of 25, so offset: 25 is the second page.
| Option | Default | What it does |
|---|---|---|
| checkin / checkout | required | Stay dates in YYYY-MM-DD |
| adults | 2 | Guests |
| rooms | 1 | Rooms |
| offset | 0 | Pagination offset (25 per page) |
| renderJs | true | Render in a headless browser |
| premiumProxy | true | Use residential proxies |
| stealthProxy | false | Escalate to Stealth for anti-bot pages |
| countryCode | 'us' | Proxy country |
Returned data
Each property object follows the selectors in ScrapingBee's data extraction rules:
{
name: 'Hotel Example Roma',
price: '€180',
score: '8.9',
location: 'Trevi, Rome'
}Getting past a challenge
When residential proxies are not enough, turn on Stealth mode. It targets aggressive anti-bot systems and always renders JavaScript:
const { hotels } = await scraper.search('Paris', {
checkin: '2026-11-10', checkout: '2026-11-12', stealthProxy: true,
});Scraping one property URL
scrape(url, options) fetches a single Booking.com page, returning HTML by default or JSON with your own extractRules.
Credits
A residential request with rendering costs 25 ScrapingBee credits; a Stealth request costs 75. Full breakdown on ScrapingBee pricing.
Notes
An independent, community-built client on the public ScrapingBee API, not affiliated with Booking.com. It targets public search pages only. The underlying walkthrough is ScrapingBee's Booking.com guide.
License
MIT
