crawlbaseDocs
Log in

API usage

Add &scraper=booking-serp 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/searchresults.html?ss=Amsterdam' \
  --data-urlencode 'scraper=booking-serp' -G
from crawlbase import CrawlingAPI

api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
    'https://www.booking.com/searchresults.html?ss=Amsterdam',
    {'scraper': 'booking-serp'}
)

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/searchresults.html?ss=Amsterdam',
  { scraper: 'booking-serp' }
);
const data = JSON.parse(res.body);
require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')

res = api.get('https://www.booking.com/searchresults.html?ss=Amsterdam', scraper: 'booking-serp')
data = JSON.parse(res.body)

Example input URL

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

https://www.booking.com/searchresults.html?ss=Amsterdam

Response shape

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

searchUrl
string
Canonical search-results URL.
destination
string
Destination the search was run for.
propertyCount
integer
Number of properties returned in properties.
properties
array
Properties matching the search, in the order Booking.com returned them.
properties[].name
string
Property name.
properties[].url
string
Canonical Booking.com URL of the property.
properties[].address
string
Property address.
properties[].distance
string | null
Distance from the destination centre, when present.
properties[].price
string
Formatted price text as shown on the listing.
properties[].priceAmount
number | null
Numeric price value, or null when it cannot be parsed.
properties[].currency
string | null
Currency code of the price, when present.
properties[].reviewScore
number | null
Average review score, or null when there are no reviews.
properties[].reviewCount
integer | null
Number of reviews, or null when there are no reviews.
properties[].rating
integer | null
Star rating of the property, or null when unrated.
properties[].image
string | null
Thumbnail image URL, when present.

Sample response

{
  "searchUrl": "https://www.booking.com/searchresults.html?ss=Amsterdam",
  "destination": "Amsterdam",
  "propertyCount": 2,
  "properties": [
    {
      "name": "Canal House Amsterdam",
      "url": "https://www.booking.com/hotel/nl/canal-house-amsterdam.html",
      "address": "Keizersgracht 148, Amsterdam City Center, 1015 CX Amsterdam",
      "distance": "0.8 km from centre",
      "price": "€ 245",
      "priceAmount": 245,
      "currency": "EUR",
      "reviewScore": 9.1,
      "reviewCount": 1284,
      "rating": 4,
      "image": "https://cf.bstatic.com/xdata/images/hotel/canal-house.jpg"
    },
    {
      "name": "Jordaan Boutique Stay",
      "url": "https://www.booking.com/hotel/nl/jordaan-boutique-stay.html",
      "address": "Prinsengracht 302, Jordaan, 1016 HX Amsterdam",
      "distance": "1.2 km from centre",
      "price": "€ 189",
      "priceAmount": 189,
      "currency": "EUR",
      "reviewScore": 8.7,
      "reviewCount": 642,
      "rating": 3,
      "image": null
    }
  ]
}