/trivago/hotels/search
curl --request POST \
--url https://api.anysite.io/api/trivago/hotels/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"destination": "<string>",
"count": 2,
"timeout": 300,
"locale": "en-US",
"currency": "USD",
"arrival": "<string>",
"departure": "<string>",
"adults": 2,
"children": [],
"rooms": 1,
"sort": "featured",
"min_price": 0,
"max_price": 2,
"star_ratings": [],
"property_types": [],
"amenities": [],
"meal": [],
"payment": [],
"styles": [],
"popular_with": []
}
'import requests
url = "https://api.anysite.io/api/trivago/hotels/search"
payload = {
"destination": "<string>",
"count": 2,
"timeout": 300,
"locale": "en-US",
"currency": "USD",
"arrival": "<string>",
"departure": "<string>",
"adults": 2,
"children": [],
"rooms": 1,
"sort": "featured",
"min_price": 0,
"max_price": 2,
"star_ratings": [],
"property_types": [],
"amenities": [],
"meal": [],
"payment": [],
"styles": [],
"popular_with": []
}
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({
destination: '<string>',
count: 2,
timeout: 300,
locale: 'en-US',
currency: 'USD',
arrival: '<string>',
departure: '<string>',
adults: 2,
children: [],
rooms: 1,
sort: 'featured',
min_price: 0,
max_price: 2,
star_ratings: [],
property_types: [],
amenities: [],
meal: [],
payment: [],
styles: [],
popular_with: []
})
};
fetch('https://api.anysite.io/api/trivago/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/trivago/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([
'destination' => '<string>',
'count' => 2,
'timeout' => 300,
'locale' => 'en-US',
'currency' => 'USD',
'arrival' => '<string>',
'departure' => '<string>',
'adults' => 2,
'children' => [
],
'rooms' => 1,
'sort' => 'featured',
'min_price' => 0,
'max_price' => 2,
'star_ratings' => [
],
'property_types' => [
],
'amenities' => [
],
'meal' => [
],
'payment' => [
],
'styles' => [
],
'popular_with' => [
]
]),
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/trivago/hotels/search"
payload := strings.NewReader("{\n \"destination\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"locale\": \"en-US\",\n \"currency\": \"USD\",\n \"arrival\": \"<string>\",\n \"departure\": \"<string>\",\n \"adults\": 2,\n \"children\": [],\n \"rooms\": 1,\n \"sort\": \"featured\",\n \"min_price\": 0,\n \"max_price\": 2,\n \"star_ratings\": [],\n \"property_types\": [],\n \"amenities\": [],\n \"meal\": [],\n \"payment\": [],\n \"styles\": [],\n \"popular_with\": []\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/trivago/hotels/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"locale\": \"en-US\",\n \"currency\": \"USD\",\n \"arrival\": \"<string>\",\n \"departure\": \"<string>\",\n \"adults\": 2,\n \"children\": [],\n \"rooms\": 1,\n \"sort\": \"featured\",\n \"min_price\": 0,\n \"max_price\": 2,\n \"star_ratings\": [],\n \"property_types\": [],\n \"amenities\": [],\n \"meal\": [],\n \"payment\": [],\n \"styles\": [],\n \"popular_with\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/trivago/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 \"destination\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"locale\": \"en-US\",\n \"currency\": \"USD\",\n \"arrival\": \"<string>\",\n \"departure\": \"<string>\",\n \"adults\": 2,\n \"children\": [],\n \"rooms\": 1,\n \"sort\": \"featured\",\n \"min_price\": 0,\n \"max_price\": 2,\n \"star_ratings\": [],\n \"property_types\": [],\n \"amenities\": [],\n \"meal\": [],\n \"payment\": [],\n \"styles\": [],\n \"popular_with\": []\n}"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"name": "<string>",
"@type": "TrivagoSearchHotel",
"accommodation_type": "<string>",
"category": "<string>",
"star_rating": 123,
"is_superior": true,
"rating": 123,
"review_count": 123,
"aspects": [],
"highlights": [],
"is_popular": true,
"is_sponsored": true,
"from_price": 123,
"from_price_month": "<string>",
"partner_count": 123,
"latitude": 123,
"longitude": 123,
"country": "<string>",
"locality": "<string>",
"locality_id": 123,
"distance_label": "<string>",
"construction_year": 123,
"image": "<string>",
"image_count": 123,
"alias": "<string>",
"units": []
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/trivago
/trivago/hotels/search
Search Trivago hotels in a destination. Returns a paginated list of properties with id, name, accommodation type, star class, guest rating with review count and top aspects, highlights, lowest ‘from’ price, number of comparing partner sites, coordinates, locality, distance, images and room details. Filter by dates, occupancy, price, star class, property type, amenities, meal plan, payment and cancellation options, style, traveller type and minimum guest rating, and choose the sort order.
Price: 5 credits per 35 results
⚠️ Common errors: 412: Destination not found or no hotels available for the given filters
POST
/
api
/
trivago
/
hotels
/
search
/trivago/hotels/search
curl --request POST \
--url https://api.anysite.io/api/trivago/hotels/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"destination": "<string>",
"count": 2,
"timeout": 300,
"locale": "en-US",
"currency": "USD",
"arrival": "<string>",
"departure": "<string>",
"adults": 2,
"children": [],
"rooms": 1,
"sort": "featured",
"min_price": 0,
"max_price": 2,
"star_ratings": [],
"property_types": [],
"amenities": [],
"meal": [],
"payment": [],
"styles": [],
"popular_with": []
}
'import requests
url = "https://api.anysite.io/api/trivago/hotels/search"
payload = {
"destination": "<string>",
"count": 2,
"timeout": 300,
"locale": "en-US",
"currency": "USD",
"arrival": "<string>",
"departure": "<string>",
"adults": 2,
"children": [],
"rooms": 1,
"sort": "featured",
"min_price": 0,
"max_price": 2,
"star_ratings": [],
"property_types": [],
"amenities": [],
"meal": [],
"payment": [],
"styles": [],
"popular_with": []
}
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({
destination: '<string>',
count: 2,
timeout: 300,
locale: 'en-US',
currency: 'USD',
arrival: '<string>',
departure: '<string>',
adults: 2,
children: [],
rooms: 1,
sort: 'featured',
min_price: 0,
max_price: 2,
star_ratings: [],
property_types: [],
amenities: [],
meal: [],
payment: [],
styles: [],
popular_with: []
})
};
fetch('https://api.anysite.io/api/trivago/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/trivago/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([
'destination' => '<string>',
'count' => 2,
'timeout' => 300,
'locale' => 'en-US',
'currency' => 'USD',
'arrival' => '<string>',
'departure' => '<string>',
'adults' => 2,
'children' => [
],
'rooms' => 1,
'sort' => 'featured',
'min_price' => 0,
'max_price' => 2,
'star_ratings' => [
],
'property_types' => [
],
'amenities' => [
],
'meal' => [
],
'payment' => [
],
'styles' => [
],
'popular_with' => [
]
]),
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/trivago/hotels/search"
payload := strings.NewReader("{\n \"destination\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"locale\": \"en-US\",\n \"currency\": \"USD\",\n \"arrival\": \"<string>\",\n \"departure\": \"<string>\",\n \"adults\": 2,\n \"children\": [],\n \"rooms\": 1,\n \"sort\": \"featured\",\n \"min_price\": 0,\n \"max_price\": 2,\n \"star_ratings\": [],\n \"property_types\": [],\n \"amenities\": [],\n \"meal\": [],\n \"payment\": [],\n \"styles\": [],\n \"popular_with\": []\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/trivago/hotels/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"locale\": \"en-US\",\n \"currency\": \"USD\",\n \"arrival\": \"<string>\",\n \"departure\": \"<string>\",\n \"adults\": 2,\n \"children\": [],\n \"rooms\": 1,\n \"sort\": \"featured\",\n \"min_price\": 0,\n \"max_price\": 2,\n \"star_ratings\": [],\n \"property_types\": [],\n \"amenities\": [],\n \"meal\": [],\n \"payment\": [],\n \"styles\": [],\n \"popular_with\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/trivago/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 \"destination\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"locale\": \"en-US\",\n \"currency\": \"USD\",\n \"arrival\": \"<string>\",\n \"departure\": \"<string>\",\n \"adults\": 2,\n \"children\": [],\n \"rooms\": 1,\n \"sort\": \"featured\",\n \"min_price\": 0,\n \"max_price\": 2,\n \"star_ratings\": [],\n \"property_types\": [],\n \"amenities\": [],\n \"meal\": [],\n \"payment\": [],\n \"styles\": [],\n \"popular_with\": []\n}"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"name": "<string>",
"@type": "TrivagoSearchHotel",
"accommodation_type": "<string>",
"category": "<string>",
"star_rating": 123,
"is_superior": true,
"rating": 123,
"review_count": 123,
"aspects": [],
"highlights": [],
"is_popular": true,
"is_sponsored": true,
"from_price": 123,
"from_price_month": "<string>",
"partner_count": 123,
"latitude": 123,
"longitude": 123,
"country": "<string>",
"locality": "<string>",
"locality_id": 123,
"distance_label": "<string>",
"construction_year": 123,
"image": "<string>",
"image_count": 123,
"alias": "<string>",
"units": []
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
application/json
Minimum string length:
1Required range:
x >= 1Required range:
20 <= x <= 1500Required range:
1 <= x <= 10Required range:
1 <= x <= 8Available options:
featured, rating, price, distance, top_rated, price_ascending, price_descending, distance_from_center Required range:
x >= 0Required range:
x >= 1Available options:
hotel, bed_and_breakfast, guesthouse, motel, serviced_apartment, aparthotel, apartment, hostel, camping, hostal, countryside_stay, resort, pousada, ryokan Available options:
parking, pool, wifi, pet_friendly, spa, hot_tub, air_conditioning, kitchen, restaurant, gym, reception_24h, airport_shuttle, ev_charger, sauna, indoor_pool, sun_umbrellas, adults_only, fridge, bar, non_smoking_rooms, balcony_terrace, smoking_rooms, wheelchair_accessible, in_room_accessibility, accessible_parking, crib, childcare, playground, kids_pool, arcade, hiking_trail, horse_riding, golf_course, yoga Available options:
breakfast_not_included, breakfast_included, half_board, full_board, all_inclusive Available options:
free_cancellation, non_refundable, pay_at_property, pay_in_installments Available options:
budget, local, modern, luxury Available options:
couples, families Available options:
8.5, 8.0, 7.5, 7.0 Response
Successful Response
Show child attributes
Show child attributes