crawlbaseDocs
Log in

API usage

Add &scraper=booking-hotel to a Crawling API request. URL-encode the target URL in the url parameter.

curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
  --data-urlencode 'url=https://www.booking.com/hotel/nl/example-amsterdam.html' \
  --data-urlencode 'scraper=booking-hotel' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.booking.com/hotel/nl/example-amsterdam.html',
    {'scraper': 'booking-hotel'}
)

import json
data = json.loads(res['body'])
const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });

const res = await api.get(
  'https://www.booking.com/hotel/nl/example-amsterdam.html',
  { scraper: 'booking-hotel' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.booking.com/hotel/nl/example-amsterdam.html', scraper: 'booking-hotel')
data = JSON.parse(res.body)

Example input URL

The URL passed in the url parameter (URL-decoded for readability):

https://www.booking.com/hotel/nl/example-amsterdam.html

Response shape

JSON response body. Field types may be null when the source page omits the value.

name
string
Hotel name.
url
string
Canonical Booking.com URL of the hotel.
description
string
Full hotel description.
address
string
Hotel address.
coordinates
object
Geographic coordinates of the hotel.
coordinates.latitude
number | null
Latitude of the hotel, or null when unavailable.
coordinates.longitude
number | null
Longitude of the hotel, or null when unavailable.
rating
integer | null
Star rating of the hotel, or null when unrated.
reviewScore
number | null
Average review score, or null when there are no reviews.
reviewCount
integer | null
Number of reviews, or null when there are no reviews.
reviewLabel
string | null
Textual review label (for example Superb), when present.
image
string | null
Main image URL, when present.
facilities
array
Facility names offered by the hotel.

Sample response

{
  "name": "Canal House Amsterdam",
  "url": "https://www.booking.com/hotel/nl/example-amsterdam.html",
  "description": "A restored 17th-century canal house in the heart of Amsterdam, steps from the Jordaan district. Rooms overlook the Keizersgracht with original beamed ceilings and a private garden terrace.",
  "address": "Keizersgracht 148, Amsterdam City Center, 1015 CX Amsterdam, Netherlands",
  "coordinates": {
    "latitude": 52.3738,
    "longitude": 4.8846
  },
  "rating": 4,
  "reviewScore": 9.1,
  "reviewCount": 1284,
  "reviewLabel": "Superb",
  "image": "https://cf.bstatic.com/xdata/images/hotel/canal-house.jpg",
  "facilities": [
    "Free WiFi",
    "Non-smoking rooms",
    "Garden",
    "Bar",
    "Family rooms",
    "24-hour front desk"
  ]
}