Booking Search Async API
Submit Booking destination searches and retrieve listing results asynchronously.
To enable this type, set the engine=booking_async and type=search parameters.
Use type=search to collect Booking listing results for one or more destinations. Submit a POST request with destination and date inputs, then retrieve the processed records with the returned snapshot_id.
Booking Search API Integration Examples
We will use the following URL for the POST request:
https://ecom.webscrapingapi.com/v1?engine=booking_async&api_key=<YOUR_API_KEY>&type=searchWe will use this body for the POST request:
[
{
"url": "https://www.booking.com",
"location": "New York",
"check_in": "2026-08-01",
"check_out": "2026-08-05",
"adults": 2,
"children": 0,
"rooms": 1,
"country": "US",
"currency": "USD"
}
]Ready to Use Booking Search Scraping Scripts
curl --request POST "https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=booking_async&type=search" \
--header "Content-Type: application/json" \
--data '[
{
"url": "https://www.booking.com",
"location": "New York",
"check_in": "2026-08-01",
"check_out": "2026-08-05",
"adults": 2,
"children": 0,
"rooms": 1,
"country": "US",
"currency": "USD"
}
]'const API_KEY = "<YOUR_API_KEY>";
const SCRAPER_URL = "https://ecom.webscrapingapi.com/v1";
const params = new URLSearchParams({
api_key: API_KEY,
engine: "booking_async",
type: "search",
});
const response = await fetch(`${SCRAPER_URL}?${params}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify([
{
url: "https://www.booking.com",
location: "New York",
check_in: "2026-08-01",
check_out: "2026-08-05",
adults: 2,
children: 0,
rooms: 1,
country: "US",
currency: "USD",
},
]),
});
const data = await response.json();
console.log(data.snapshot_id);import requests
API_KEY = "<YOUR_API_KEY>"
SCRAPER_URL = "https://ecom.webscrapingapi.com/v1"
PARAMS = {
"api_key": API_KEY,
"engine": "booking_async",
"type": "search",
}
PAYLOAD = [
{
"url": "https://www.booking.com",
"location": "New York",
"check_in": "2026-08-01",
"check_out": "2026-08-05",
"adults": 2,
"children": 0,
"rooms": 1,
"country": "US",
"currency": "USD",
}
]
response = requests.post(SCRAPER_URL, params=PARAMS, json=PAYLOAD)
response.raise_for_status()
print(response.json()["snapshot_id"])<?php
$apiKey = '<YOUR_API_KEY>';
$scraperUrl = 'https://ecom.webscrapingapi.com/v1';
$query = http_build_query([
'api_key' => $apiKey,
'engine' => 'booking_async',
'type' => 'search',
]);
$payload = json_encode([
[
'url' => 'https://www.booking.com',
'location' => 'New York',
'check_in' => '2026-08-01',
'check_out' => '2026-08-05',
'adults' => 2,
'children' => 0,
'rooms' => 1,
'country' => 'US',
'currency' => 'USD',
],
]);
$context = stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/json\r\n",
'content' => $payload,
],
]);
$response = file_get_contents("{$scraperUrl}?{$query}", false, $context);
echo $response;package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=booking_async&type=search"
payload := []byte(`[
{
"url":"https://www.booking.com",
"location":"New York",
"check_in":"2026-08-01",
"check_out":"2026-08-05",
"adults":2,
"children":0,
"rooms":1,
"country":"US",
"currency":"USD"
}
]`)
req, _ := http.NewRequest("POST", url, bytes.NewReader(payload))
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String payload = """
[
{
"url":"https://www.booking.com",
"location":"New York",
"check_in":"2026-08-01",
"check_out":"2026-08-05",
"adults":2,
"children":0,
"rooms":1,
"country":"US",
"currency":"USD"
}
]
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=booking_async&type=search"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
}
}using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var url = "https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=booking_async&type=search";
var payload = """
[
{
"url":"https://www.booking.com",
"location":"New York",
"check_in":"2026-08-01",
"check_out":"2026-08-05",
"adults":2,
"children":0,
"rooms":1,
"country":"US",
"currency":"USD"
}
]
""";
using var client = new HttpClient();
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
}require "json"
require "net/http"
require "uri"
uri = URI("https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=booking_async&type=search")
request = Net::HTTP::Post.new(uri)
request["Content-Type"] = "application/json"
request.body = [
{
url: "https://www.booking.com",
location: "New York",
check_in: "2026-08-01",
check_out: "2026-08-05",
adults: 2,
children: 0,
rooms: 1,
country: "US",
currency: "USD",
},
].to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.bodyOnce you send the POST request with the required parameters, the API will process your request and return a snapshot_id, which can be used to fetch the results via the Snapshot API.
Response example
{
"snapshot_id": "s_m4x7enmven8djfqak"
}Retrieving Results Using the Snapshot API
Once you've submitted a POST request to the Booking API and received a snapshot_id, you can use the Snapshot API to retrieve the processed results.
https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&snapshot_id=s_m4x7enmven8djfqakResult response example
{
"0": {
"input": {
"location": "New York",
"check_in": "2026-08-01",
"check_out": "2026-08-05"
},
"hotel_name": "Example Booking Hotel",
"url": "https://www.booking.com/hotel/us/example.html",
"price": "$240",
"rating": 8.7
}
}