curl --request POST \
--url https://api.anysite.io/api/hopper/hotels/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"check_in": "2023-12-25",
"check_out": "2023-12-25",
"count": 2,
"timeout": 300,
"place_id": "<string>",
"lodging_ids": [],
"adults": 2,
"children_ages": [],
"rooms": 1,
"pets": 0,
"property_type": "all",
"star_ratings": [],
"price_min": 1,
"price_max": 1,
"min_guest_score": 0.5,
"free_cancellation": false,
"sort": "recommended"
}
'import requests
url = "https://api.anysite.io/api/hopper/hotels/search"
payload = {
"check_in": "2023-12-25",
"check_out": "2023-12-25",
"count": 2,
"timeout": 300,
"place_id": "<string>",
"lodging_ids": [],
"adults": 2,
"children_ages": [],
"rooms": 1,
"pets": 0,
"property_type": "all",
"star_ratings": [],
"price_min": 1,
"price_max": 1,
"min_guest_score": 0.5,
"free_cancellation": False,
"sort": "recommended"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
check_in: '2023-12-25',
check_out: '2023-12-25',
count: 2,
timeout: 300,
place_id: '<string>',
lodging_ids: [],
adults: 2,
children_ages: [],
rooms: 1,
pets: 0,
property_type: 'all',
star_ratings: [],
price_min: 1,
price_max: 1,
min_guest_score: 0.5,
free_cancellation: false,
sort: 'recommended'
})
};
fetch('https://api.anysite.io/api/hopper/hotels/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/hopper/hotels/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'check_in' => '2023-12-25',
'check_out' => '2023-12-25',
'count' => 2,
'timeout' => 300,
'place_id' => '<string>',
'lodging_ids' => [
],
'adults' => 2,
'children_ages' => [
],
'rooms' => 1,
'pets' => 0,
'property_type' => 'all',
'star_ratings' => [
],
'price_min' => 1,
'price_max' => 1,
'min_guest_score' => 0.5,
'free_cancellation' => false,
'sort' => 'recommended'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/hopper/hotels/search"
payload := strings.NewReader("{\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"place_id\": \"<string>\",\n \"lodging_ids\": [],\n \"adults\": 2,\n \"children_ages\": [],\n \"rooms\": 1,\n \"pets\": 0,\n \"property_type\": \"all\",\n \"star_ratings\": [],\n \"price_min\": 1,\n \"price_max\": 1,\n \"min_guest_score\": 0.5,\n \"free_cancellation\": false,\n \"sort\": \"recommended\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/hopper/hotels/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"place_id\": \"<string>\",\n \"lodging_ids\": [],\n \"adults\": 2,\n \"children_ages\": [],\n \"rooms\": 1,\n \"pets\": 0,\n \"property_type\": \"all\",\n \"star_ratings\": [],\n \"price_min\": 1,\n \"price_max\": 1,\n \"min_guest_score\": 0.5,\n \"free_cancellation\": false,\n \"sort\": \"recommended\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/hopper/hotels/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"place_id\": \"<string>\",\n \"lodging_ids\": [],\n \"adults\": 2,\n \"children_ages\": [],\n \"rooms\": 1,\n \"pets\": 0,\n \"property_type\": \"all\",\n \"star_ratings\": [],\n \"price_min\": 1,\n \"price_max\": 1,\n \"min_guest_score\": 0.5,\n \"free_cancellation\": false,\n \"sort\": \"recommended\"\n}"
response = http.request(request)
puts response.read_body[
{
"@type": "HopperHotelOffer",
"hotel": {
"id": "<string>",
"@type": "HopperHotel",
"name": "<string>",
"hotel_type": "<string>",
"star_rating": 123,
"latitude": 123,
"longitude": 123,
"formatted_address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"image": "<string>",
"images": [],
"amenities": []
},
"nightly_price": 123,
"total_price": 123,
"original_nightly_price": 123,
"original_total_price": 123,
"discount_percentage": 123,
"currency": "<string>",
"meal_plan": "<string>",
"free_cancellation": true,
"pay_now": true,
"pay_at_check_in": true,
"is_preferred": true,
"review_score": 123,
"review_count": 123,
"shop_token": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/hopper/hotels/search
Search Hopper stays (hotels and vacation rentals) for a destination place id or a specific set of lodging ids over a check-in/check-out date range, for a given number of adults, children, rooms and pets. Optionally filter by property type, star rating, nightly price range, minimum guest score and free cancellation, and choose the result ordering. Returns each stay with its hotel details (name, type, star rating, description, coordinates, address, photos, amenities), nightly and total price (with any discount), currency, meal plan, cancellation and payment highlights, guest review score and count, and a shop token for room rates. Resolve place_id via the locations search (kind=stay).
Price: 20 credits per 15 results
⚠️ Common errors: 412: Destination not found or no stays available for the given dates
curl --request POST \
--url https://api.anysite.io/api/hopper/hotels/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"check_in": "2023-12-25",
"check_out": "2023-12-25",
"count": 2,
"timeout": 300,
"place_id": "<string>",
"lodging_ids": [],
"adults": 2,
"children_ages": [],
"rooms": 1,
"pets": 0,
"property_type": "all",
"star_ratings": [],
"price_min": 1,
"price_max": 1,
"min_guest_score": 0.5,
"free_cancellation": false,
"sort": "recommended"
}
'import requests
url = "https://api.anysite.io/api/hopper/hotels/search"
payload = {
"check_in": "2023-12-25",
"check_out": "2023-12-25",
"count": 2,
"timeout": 300,
"place_id": "<string>",
"lodging_ids": [],
"adults": 2,
"children_ages": [],
"rooms": 1,
"pets": 0,
"property_type": "all",
"star_ratings": [],
"price_min": 1,
"price_max": 1,
"min_guest_score": 0.5,
"free_cancellation": False,
"sort": "recommended"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
check_in: '2023-12-25',
check_out: '2023-12-25',
count: 2,
timeout: 300,
place_id: '<string>',
lodging_ids: [],
adults: 2,
children_ages: [],
rooms: 1,
pets: 0,
property_type: 'all',
star_ratings: [],
price_min: 1,
price_max: 1,
min_guest_score: 0.5,
free_cancellation: false,
sort: 'recommended'
})
};
fetch('https://api.anysite.io/api/hopper/hotels/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/hopper/hotels/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'check_in' => '2023-12-25',
'check_out' => '2023-12-25',
'count' => 2,
'timeout' => 300,
'place_id' => '<string>',
'lodging_ids' => [
],
'adults' => 2,
'children_ages' => [
],
'rooms' => 1,
'pets' => 0,
'property_type' => 'all',
'star_ratings' => [
],
'price_min' => 1,
'price_max' => 1,
'min_guest_score' => 0.5,
'free_cancellation' => false,
'sort' => 'recommended'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/hopper/hotels/search"
payload := strings.NewReader("{\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"place_id\": \"<string>\",\n \"lodging_ids\": [],\n \"adults\": 2,\n \"children_ages\": [],\n \"rooms\": 1,\n \"pets\": 0,\n \"property_type\": \"all\",\n \"star_ratings\": [],\n \"price_min\": 1,\n \"price_max\": 1,\n \"min_guest_score\": 0.5,\n \"free_cancellation\": false,\n \"sort\": \"recommended\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/hopper/hotels/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"place_id\": \"<string>\",\n \"lodging_ids\": [],\n \"adults\": 2,\n \"children_ages\": [],\n \"rooms\": 1,\n \"pets\": 0,\n \"property_type\": \"all\",\n \"star_ratings\": [],\n \"price_min\": 1,\n \"price_max\": 1,\n \"min_guest_score\": 0.5,\n \"free_cancellation\": false,\n \"sort\": \"recommended\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/hopper/hotels/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"count\": 2,\n \"timeout\": 300,\n \"place_id\": \"<string>\",\n \"lodging_ids\": [],\n \"adults\": 2,\n \"children_ages\": [],\n \"rooms\": 1,\n \"pets\": 0,\n \"property_type\": \"all\",\n \"star_ratings\": [],\n \"price_min\": 1,\n \"price_max\": 1,\n \"min_guest_score\": 0.5,\n \"free_cancellation\": false,\n \"sort\": \"recommended\"\n}"
response = http.request(request)
puts response.read_body[
{
"@type": "HopperHotelOffer",
"hotel": {
"id": "<string>",
"@type": "HopperHotel",
"name": "<string>",
"hotel_type": "<string>",
"star_rating": 123,
"latitude": 123,
"longitude": 123,
"formatted_address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"image": "<string>",
"images": [],
"amenities": []
},
"nightly_price": 123,
"total_price": 123,
"original_nightly_price": 123,
"original_total_price": 123,
"discount_percentage": 123,
"currency": "<string>",
"meal_plan": "<string>",
"free_cancellation": true,
"pay_now": true,
"pay_at_check_in": true,
"is_preferred": true,
"review_score": 123,
"review_count": 123,
"shop_token": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
x >= 120 <= x <= 15001 <= x <= 161 <= x <= 80 <= x <= 8all, hotel, vacation_rental x >= 0x >= 00 <= x <= 1recommended, price_low, price_high, rating Response
Successful Response
Show child attributes
Show child attributes