All URIs are relative to https://scrapebadger.com, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| bookingBookingScraperHealthCheck() | GET /v1/booking/health | Booking scraper health check |
| bookingBookingScraperHealthCheckHead() | HEAD /v1/booking/health | Booking scraper health check |
| bookingGetPropertyDetail() | GET /v1/booking/properties/{country_code}/{slug} | Get property detail |
| bookingGetPropertyReviews() | GET /v1/booking/properties/{country_code}/{slug}/reviews | Get property reviews |
| bookingGetRoomTypesAndLiveRates() | GET /v1/booking/properties/{country_code}/{slug}/rooms | Get room types and live rates |
| bookingSearchDestinations() | GET /v1/booking/destinations | Search destinations |
| bookingSearchProperties() | GET /v1/booking/search | Search properties |
bookingBookingScraperHealthCheck(): mixedBooking scraper health check
Check health of the Booking scraper service (accepts HEAD).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->bookingBookingScraperHealthCheck();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->bookingBookingScraperHealthCheck: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bookingBookingScraperHealthCheckHead(): mixedBooking scraper health check
Check health of the Booking scraper service (accepts HEAD).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->bookingBookingScraperHealthCheckHead();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->bookingBookingScraperHealthCheckHead: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bookingGetPropertyDetail($country_code, $slug, $photos, $questions, $language): mixedGet property detail
Full detail for one property: description, address and coordinates, star rating, review score with per-category breakdown, facilities, house rules, room types with occupancy and beds, photos and guest Q&A.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$country_code = 'country_code_example'; // string | Two-letter country code, e.g. 'it'
$slug = 'slug_example'; // string | Booking page name, e.g. 'hotel-artemide'
$photos = 40; // int | Gallery photos to return
$questions = 10; // int | Guest Q&A pairs to return
$language = 'language_example'; // string | Locale, e.g. en-us, fr
try {
$result = $apiInstance->bookingGetPropertyDetail($country_code, $slug, $photos, $questions, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->bookingGetPropertyDetail: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| country_code | string | Two-letter country code, e.g. 'it' | |
| slug | string | Booking page name, e.g. 'hotel-artemide' | |
| photos | int | Gallery photos to return | [optional] [default to 40] |
| questions | int | Guest Q&A pairs to return | [optional] [default to 10] |
| language | string | Locale, e.g. en-us, fr | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bookingGetPropertyReviews($country_code, $slug, $limit, $offset, $sort, $review_language, $guest_type, $language): mixedGet property reviews
Paginated guest reviews with score, positive and negative text, stay dates, room type, guest country and type, photos and the partner's reply.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$country_code = 'country_code_example'; // string | Two-letter country code, e.g. 'it'
$slug = 'slug_example'; // string | Booking page name, e.g. 'hotel-artemide'
$limit = 25; // int
$offset = 0; // int
$sort = 'MOST_RELEVANT'; // string | MOST_RELEVANT | NEWEST_FIRST | OLDEST_FIRST | SCORE_DESC | SCORE_ASC
$review_language = 'review_language_example'; // string | Only reviews written in this language, e.g. 'fr'
$guest_type = 'guest_type_example'; // string | FAMILIES | COUPLES | GROUP_OF_FRIENDS | SOLO_TRAVELLERS | BUSINESS_TRAVELLERS
$language = 'language_example'; // string | Locale for labels, e.g. en-us
try {
$result = $apiInstance->bookingGetPropertyReviews($country_code, $slug, $limit, $offset, $sort, $review_language, $guest_type, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->bookingGetPropertyReviews: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| country_code | string | Two-letter country code, e.g. 'it' | |
| slug | string | Booking page name, e.g. 'hotel-artemide' | |
| limit | int | [optional] [default to 25] | |
| offset | int | [optional] [default to 0] | |
| sort | string | MOST_RELEVANT | NEWEST_FIRST |
| review_language | string | Only reviews written in this language, e.g. 'fr' | [optional] |
| guest_type | string | FAMILIES | COUPLES |
| language | string | Locale for labels, e.g. en-us | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bookingGetRoomTypesAndLiveRates($country_code, $slug, $checkin, $checkout, $adults, $children, $rooms, $currency, $language): mixedGet room types and live rates
Every room type at one property with every rate bookable on it for the given dates — price, price before discount, price per night, discounts and badges — plus per-room facilities, bed layouts, occupancy and photos. /search returns only the cheapest rate per property; this returns the whole table.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$country_code = 'country_code_example'; // string | Two-letter country code, e.g. 'it'
$slug = 'slug_example'; // string | Booking page name, e.g. 'hotel-artemide'
$checkin = 'checkin_example'; // string | Check-in date YYYY-MM-DD
$checkout = 'checkout_example'; // string | Check-out date YYYY-MM-DD
$adults = 2; // int
$children = 'children_example'; // string | Comma-separated children ages, e.g. '4,9'
$rooms = 1; // int
$currency = 'currency_example'; // string | ISO currency, e.g. EUR, USD, GBP
$language = 'language_example'; // string | Locale, e.g. en-us, fr, de
try {
$result = $apiInstance->bookingGetRoomTypesAndLiveRates($country_code, $slug, $checkin, $checkout, $adults, $children, $rooms, $currency, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->bookingGetRoomTypesAndLiveRates: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| country_code | string | Two-letter country code, e.g. 'it' | |
| slug | string | Booking page name, e.g. 'hotel-artemide' | |
| checkin | string | Check-in date YYYY-MM-DD | |
| checkout | string | Check-out date YYYY-MM-DD | |
| adults | int | [optional] [default to 2] | |
| children | string | Comma-separated children ages, e.g. '4,9' | [optional] |
| rooms | int | [optional] [default to 1] | |
| currency | string | ISO currency, e.g. EUR, USD, GBP | [optional] |
| language | string | Locale, e.g. en-us, fr, de | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bookingSearchDestinations($query, $limit, $language): mixedSearch destinations
Resolve a place name to Booking's dest_id/dest_type, with coordinates and country — feed the pair back into /search for an exact match.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$query = 'query_example'; // string | Free-text place, e.g. 'amsterd'
$limit = 8; // int
$language = 'language_example'; // string | Locale, e.g. en-us, fr
try {
$result = $apiInstance->bookingSearchDestinations($query, $limit, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->bookingSearchDestinations: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| query | string | Free-text place, e.g. 'amsterd' | |
| limit | int | [optional] [default to 8] | |
| language | string | Locale, e.g. en-us, fr | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bookingSearchProperties($location, $dest_id, $dest_type, $checkin, $checkout, $adults, $children, $rooms, $offset, $limit, $sort, $filters, $currency, $language): mixedSearch properties
Search Booking.com properties by destination, with dates, occupancy, sorting and filters. Returns prices, review scores, coordinates, room configuration and photos. Paginate with offset.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ScrapeBadger\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
$apiInstance = new ScrapeBadger\Api\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$location = 'location_example'; // string | Free-text destination, e.g. 'Rome'
$dest_id = 56; // int | Exact destination id (ufi) from /destinations
$dest_type = 'NO_DEST_TYPE'; // string | Destination type, e.g. CITY
$checkin = 'checkin_example'; // string | Check-in date YYYY-MM-DD
$checkout = 'checkout_example'; // string | Check-out date YYYY-MM-DD
$adults = 2; // int
$children = 'children_example'; // string | Comma-separated children ages, e.g. '4,9'
$rooms = 1; // int
$offset = 0; // int | Result offset for pagination
$limit = 25; // int
$sort = 'sort_example'; // string | popularity | price | class_descending | class_ascending | distance_from_search | bayesian_review_score | review_score_and_price | upsort_bh
$filters = 'filters_example'; // string | Semicolon-separated Booking filter ids, e.g. 'class=4'
$currency = 'currency_example'; // string | ISO currency, e.g. EUR, USD, GBP
$language = 'language_example'; // string | Locale, e.g. en-us, fr, de, es
try {
$result = $apiInstance->bookingSearchProperties($location, $dest_id, $dest_type, $checkin, $checkout, $adults, $children, $rooms, $offset, $limit, $sort, $filters, $currency, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->bookingSearchProperties: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| location | string | Free-text destination, e.g. 'Rome' | [optional] |
| dest_id | int | Exact destination id (ufi) from /destinations | [optional] |
| dest_type | string | Destination type, e.g. CITY | [optional] [default to 'NO_DEST_TYPE'] |
| checkin | string | Check-in date YYYY-MM-DD | [optional] |
| checkout | string | Check-out date YYYY-MM-DD | [optional] |
| adults | int | [optional] [default to 2] | |
| children | string | Comma-separated children ages, e.g. '4,9' | [optional] |
| rooms | int | [optional] [default to 1] | |
| offset | int | Result offset for pagination | [optional] [default to 0] |
| limit | int | [optional] [default to 25] | |
| sort | string | popularity | price |
| filters | string | Semicolon-separated Booking filter ids, e.g. 'class=4' | [optional] |
| currency | string | ISO currency, e.g. EUR, USD, GBP | [optional] |
| language | string | Locale, e.g. en-us, fr, de, es | [optional] |
mixed
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]