Trivago Hotel Prices API: Deals and Search as JSON
The Perceptlayer Trivago API returns data from trivago, the hotel metasearch site, as JSON through 6 endpoints. With the Trivago API, suggest turns a place name into a destination, search lists hotels for your dates, and deals returns offers for one hotel. Each call is a GET with the X-API-Key header and costs 1 credit. A failed call costs nothing. This guide shows a recorded Paris search response. We recorded only that one, so suggest and deals are described from their parameters, not shown as output. The recorded search has no per-night offer price for each hotel: it returns forecast_price, price_range and price_histogram, and offers come from deals.
What does the Trivago API return?
The Perceptlayer Trivago API (trivago, the hotel metasearch site, 6 endpoints) returns hotel search results, single-hotel details, reviews, price deals for specific dates and the filters available for a destination, all as JSON with named fields. The endpoints sit under /v1/trivago/, all GET requests, all at 1 credit. The Trivago API page has a playground for running any of them with your key.
| Endpoint | Returns | Required parameters |
|---|---|---|
/v1/trivago/suggest |
Suggest | query |
/v1/trivago/search |
Search | destination_id, check_in, check_out |
/v1/trivago/deals |
Deals | hotel_id, check_in, check_out |
/v1/trivago/hotel |
Hotel | hotel_id |
/v1/trivago/reviews |
Reviews | hotel_id |
/v1/trivago/filters |
Filters | destination_id |
Most flows chain them: a name goes into suggest, the destination goes into search, and a hotel you care about goes into deals, hotel or reviews. Trivago is one of the sites in the Travel APIs area of the catalogue.
What price data does search return?
The Perceptlayer Trivago API search endpoint returns price summaries, not per-night offers. In the recorded call, each hotel has a forecast_price (a month, a price_per_night and a currency), and the result set has a price_range and a price_histogram. It has no per-provider price for a stay. Per-hotel offers for your dates are what deals is for.
| Endpoint | What it returns | Price data | Recorded here |
|---|---|---|---|
search |
A page of hotels for a destination and dates | forecast_price per hotel, price_range and price_histogram for the result set |
Yes, Paris |
deals |
Offers for one hotel_id and one stay |
Per-hotel offers for your dates | No |
hotel |
Details for one hotel_id |
Not a price endpoint | No |
One caveat covers the rest of this article: the endpoint documentation lists parameters and types only, so we describe response fields only as they appear in the recorded Paris call.
How do you find a destination ID?
The Trivago API suggest endpoint turns a place name into the ID that other calls need. GET /v1/trivago/suggest takes one required parameter, query (up to 100 characters), and an optional market. It's the lookup step that feeds every other call, because search and filters want a numeric destination_id rather than a city name.
curl "https://api.perceptlayer.com/v1/trivago/suggest?query=Berlin" \
-H "X-API-Key: $API_KEY"
market accepts one of us, de, uk, fr, es, it or nl. We haven't recorded a Suggest response, so none is shown; the Suggest playground runs the call with your key. The recorded search below uses destination_id=22235, which came back with a city centre named Paris.
Don't have a key yet? Get a free API key and the call above works as written.
How do you search hotels for your dates?
The Perceptlayer Trivago search endpoint, GET /v1/trivago/search, takes a destination_id, a check_in date and a check_out date and returns a page of hotels. The recorded request below used only those three required parameters. Dates in the recorded call are written as YYYY-MM-DD, the ISO 8601 calendar-date form.
curl "https://api.perceptlayer.com/v1/trivago/search?destination_id=22235&check_in=2026-11-20&check_out=2026-11-23" \
-H "X-API-Key: $API_KEY"
The optional parameters narrow and order the list:
| Parameter | Type | Notes |
|---|---|---|
adults, rooms |
integer | Party size and room count |
children_ages[] |
list of integer | One entry per child |
currency |
string | Price currency; the recorded call came back as USD |
market |
string | One of us, de, uk, fr, es, it, nl |
limit, offset |
integer | Page size and start position |
sort |
string | relevance, price_asc, rating or price_desc |
min_price, max_price |
integer | Price bounds |
stars[] |
list of integer | Any of 1, 2, 3, 4, 5 |
min_rating |
string | One of 7.0, 7.5, 8.0, 8.5 |
property_type[], amenities[] |
list of integer | Property and amenity filters |
Defaults and maximum page sizes aren't documented, so we don't state them. The Search endpoint page lists them as the catalogue does.
What does the search response look like?
The Trivago API search response wraps the result in success, data and meta. The top of data echoes your search and reports the size of the result set: total was 2500, limit was 35, has_more was true and next_offset was 35. Here is that header, trimmed:
{
"success": true,
"data": {
"destination_id": 22235,
"check_in": "2026-11-20",
"check_out": "2026-11-23",
"market": "us",
"currency": "USD",
"sort": "relevance",
"total": 2500,
"limit": 35,
"offset": 0,
"has_more": true,
"next_offset": 35,
"city_center": {
"name": "Paris",
"coordinates": { "latitude": 48.856445, "longitude": 2.352231 }
},
"price_range": { "min": 2, "max": 600 },
…
price_range and price_histogram summarise the whole result set, so you can see the spread before you fetch a single hotel. In the recorded excerpt the range ran from 2 to 600 in USD. The histogram buckets each carry from, to and count.
Each entry in hotels is one property. Here is the first one, trimmed:
{
"id": 49992,
"position": 1,
"name": "Residence Hoteliere Champ de Mars",
"type": "Hotel",
"stars": 3,
"rating": 8.3,
"review_count": 1284,
"location": "Paris, France",
"distance": "0.5 miles to Eiffel tower",
"free_wifi": true,
"provider_count": 7,
"sponsored": false,
"forecast_price": {
"month": "2027-01",
"price_per_night": 91,
"currency": "USD"
}
…
}
These are the hotel fields in the recorded excerpt:
| Field | Recorded value (first hotel) | Meaning |
|---|---|---|
id |
49992 |
Integer ID of the property |
position |
1 |
Entry number in the list (2 for the second hotel) |
name, type |
Residence Hoteliere Champ de Mars, Hotel |
Property name and type |
stars, rating, review_count |
3, 8.3, 1284 |
Star class, rating, number of reviews |
location, distance |
Paris, France, 0.5 miles to Eiffel tower |
Place and distance to a landmark |
free_wifi |
true |
Wi-Fi flag |
provider_count |
7 |
Per-hotel number, undefined in the docs; the second hotel shows 16 |
sponsored |
false |
Sponsored flag |
forecast_price |
price_per_night 91 USD for 2027-01 |
A forecast month and nightly price, not an offer for your dates |
The first hotel's id is the value this article passes as hotel_id to deals below.
How is a metasearch result different from a single-site price?
In a recorded Perceptlayer Trivago API search for Paris, each of the two hotels shown carries a provider_count field (7 and 16). It counts how many sources trivago compares for that hotel. The response gives price_range and a price_histogram for the whole result set but no per-provider price. Per-hotel offers for your dates come from GET /v1/trivago/deals, which costs 1 credit per successful call.
That changes the question you can ask. A single-site guide such as the ones linked below answers "what does this site charge?", which suits rate monitoring against one channel. A Perceptlayer Trivago API result adds provider_count, a way to see how many sources sit behind each hotel before you spend a deals call on it.
If you want one site's own prices instead, compare with the Booking.com hotel prices guide, the Expedia hotels guide and the Google Hotels guide.
What does the Deals endpoint add?
The Trivago API deals endpoint, GET /v1/trivago/deals, returns the deals for one hotel and one stay. It requires hotel_id, check_in and check_out, and accepts adults, rooms, children_ages[], currency and market. Reuse the same dates as your search so the two calls describe the same stay. The example below uses the first recorded hotel's id as hotel_id.
curl "https://api.perceptlayer.com/v1/trivago/deals?hotel_id=49992&check_in=2026-11-20&check_out=2026-11-23&adults=2" \
-H "X-API-Key: $API_KEY"
We haven't recorded a Deals response, so none is shown here. The Deals endpoint page links to the playground, which runs the call with your key.
What does the Filters endpoint take?
GET /v1/trivago/filters takes a required destination_id and an optional market (us, de, uk, fr, es, it or nl) and costs 1 credit per successful call. The recorded Paris search response also includes an available_filters list. Each entry has a concept code and a hotels count (the recorded entry is "concept": "416-6" with "hotels": 0), so the filter values you pass to search as property_type[] and amenities[] can be traced back to hotel counts. The search parameters are lists of integers. We have no recorded Filters response, so the Filters playground is where to run it.
How do you page through all results?
The Trivago search endpoint pages with offset: a recorded Paris call returned limit 35 of total 2,500 hotels, with has_more true and next_offset 35. Loop until has_more is false and cap the page count in code, since each page is one call at 1 credit.
import os
import requests
URL = "https://api.perceptlayer.com/v1/trivago/search"
HEADERS = {"X-API-Key": os.environ["API_KEY"]}
params = {
"destination_id": 22235,
"check_in": "2026-11-20",
"check_out": "2026-11-23",
"sort": "price_asc",
}
hotels, offset, pages = [], 0, 0
MAX_PAGES = 3
while pages < MAX_PAGES:
r = requests.get(URL, headers=HEADERS, params={**params, "offset": offset}, timeout=30)
r.raise_for_status()
data = r.json()["data"]
hotels.extend(data["hotels"])
pages += 1
if not data["has_more"]:
break
offset = data["next_offset"]
print(len(hotels), "hotels in", pages, "calls")
Each page is one call, so the loop above spends at most 3 credits. For a longer treatment of safe loops, see paginating a web data API in Python, and for the error side, the Errors docs. Rate-limited (429) responses carry a Retry-After header with the seconds to wait; the rate limits page has the per-account numbers.
What does the Trivago API cost?
All six Trivago API endpoints cost 1 credit per successful call; failed calls cost nothing and return X-Credits-Used: 0. A suggest call, one search and deals for 10 hotels is 1 + 1 + 10 = 12 credits. The free tier of 1,000 credits a month covers that about 83 times, with no card needed. You verify an email address to get the free credits. Purchased credits come in prepaid packs and last 12 months. Pricing shows what credits cost.
Checking deals for 50 hotels once a day for 30 days is 50 × 30 = 1,500 credits, which is 500 over the monthly free tier, and the Starter pack of 10,000 credits covers it with room to spare. The Credits docs explain the X-Credits-Used and X-Credits-Remaining headers.
If you hold direct access through a partner arrangement with the site, use that for production booking flows. This API suits research, monitoring and prototypes where you want hotel data without maintaining a scraper. For the wider picture, read hotel price data for rate monitoring.
Next step: get a free API key, then run the Berlin suggest call above and follow its destination into search. Authentication covers the header and the api_key query parameter.
APIs in this post
Frequently asked questions
Does the Trivago API return a price per night for each hotel?
Not in search: the recorded Paris search gives each hotel a forecast_price (a month and a price_per_night), and offers for your dates come from deals.
Which markets does the Trivago API support?
The optional market parameter takes one of seven values: us, de, uk, fr, es, it or nl. The recorded Paris search used us and returned prices in USD. Pass the market your users book from, and use the same one for search and deals so the two calls compare like with like.
How many calls does a hotel price check take?
A search plus deals for 10 hotels is 11 calls and 11 credits, or 12 with a suggest call first.
Can an AI agent call the Trivago API?
Yes: the MCP server at https://api.perceptlayer.com/mcp has a call_endpoint tool that spends 1 credit on a successful Trivago call, and its lookup tools cost nothing (see the AI agents docs).
What happens when a Trivago API call fails?
A failed call is not billed and returns X-Credits-Used: 0, with an HTTP status and a JSON error body; the Errors docs list the codes.
Does this replace a direct trivago partner feed?
No. The Perceptlayer Trivago API returns data collected from publicly available sources, as found at the time of the call, so use a direct partner arrangement for production booking flows.