Trivago APItrivago.com.br ↗
Search hotels on Trivago by destination, dates, and guest count. Get autocomplete suggestions, live pricing from booking sites, and detailed hotel info.
What is the Trivago API?
The Trivago API exposes 3 endpoints covering hotel search, destination autocomplete, and hotel detail retrieval from trivago.com.br. The search_hotels endpoint returns up to 45 hotels per query with per-night pricing sourced from multiple booking sites, star ratings, guest ratings, and review counts. Filter results by arrival/departure dates, number of adults, currency, and price range. Use autocomplete to resolve freeform location input into structured destination identifiers.
curl -X GET 'https://api.parse.bot/scraper/c0845b42-e172-40e0-b541-1ddd9b39e91d/autocomplete?query=Paris' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace trivago-com-br-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Trivago Hotel Search — find hotels, get details, compare prices."""
from parse_apis.trivago_hotel_search_api import Trivago, NotFound
client = Trivago()
# Search for destination suggestions
for loc in client.locations.search(query="London", limit=3):
print(loc.name, loc.type, loc.label)
# Search hotels in a destination with a price cap
hotel = client.hotels.search(location="London", currency="USD", max_price=300, limit=1).first()
if hotel:
print(hotel.name, hotel.star_rating, hotel.price.amount, hotel.price.currency)
# Drill into full hotel details
try:
detail = hotel.details()
print(detail.name, detail.rating, detail.reviews_count, detail.address)
print(detail.coordinates.latitude, detail.coordinates.longitude)
except NotFound as exc:
print(f"Hotel not found: {exc}")
print("exercised: locations.search / hotels.search / hotel.details")
Autocomplete/suggest destinations as the user types a location name. Returns up to 5 suggestions including cities, regions, airports, and landmarks. Each suggestion includes a structured nsid (namespace/id pair) usable with search_hotels internally, a human-readable type, and a location label for disambiguation.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search keyword for location (e.g. 'New York', 'London', 'Paris') |
{
"type": "object",
"fields": {
"items": "array of location suggestion objects with name, nsid, type, and label"
},
"sample": {
"items": [
{
"name": "Paris",
"nsid": {
"id": 22235,
"ns": 200
},
"type": "City",
"label": "Île-de-France, France"
},
{
"name": "Paris Orly Airport",
"nsid": {
"id": 134104,
"ns": 500
},
"type": "Airport",
"label": "Paris, France"
}
]
}
}About the Trivago API
Endpoints Overview
The API covers three operations. autocomplete accepts a partial location string and returns up to 5 structured suggestions — cities, regions, airports, and landmarks — each with a name, type, label, and nsid field. The nsid is the namespace/id pair that uniquely identifies a destination within Trivago. search_hotels takes a freeform location string, resolves it to an internal destination ID, and returns a list of hotels with pricing. get_hotel_info accepts a hotel id in ns/id format (e.g., 100/49218) and returns detailed metadata for a single property.
search_hotels Parameters and Response
search_hotels requires a location string and accepts optional arrival and departure dates in YYYY-MM-DD format. If dates are omitted, the API defaults to a stay starting 14 days from today and ending 18 days from today. You can specify the number of adults (1–6), a currency code (e.g., USD, BRL, EUR), and min_price / max_price per night in the selected currency. Each hotel object in the response includes id, name, star_rating, guest_rating, reviews_count, distance, price, booking_site, and a representative image URL. The params field in the response echoes back the resolved arrival, departure, currency, and location_nsids used for the query.
get_hotel_info Response Fields
get_hotel_info takes the id returned by search_hotels and returns name, rating, address, coordinates (latitude and longitude as floats), star_rating, photos_count, and reviews_count. This endpoint is useful when you want to display a map pin or validate a property address before showing it to an end user. The hotel ID must be in ns/id format as returned by search_hotels; constructing IDs manually is not reliable.
The Trivago API is a managed, monitored endpoint for trivago.com.br — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when trivago.com.br changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official trivago.com.br API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a hotel price comparison widget that shows per-night rates from multiple booking sites using
priceandbooking_sitefields. - Power a destination search input with live autocomplete using the
autocompleteendpoint and itsname,type, andlabelfields. - Filter hotel results by budget using
min_priceandmax_priceparameters to surface only affordable options. - Plot hotel locations on a map using the
coordinatesfield returned byget_hotel_info. - Display star ratings and guest review scores alongside review counts to help users compare properties.
- Support multi-currency travel apps by passing a
currencycode to normalize all returned prices. - Aggregate hotel metadata including photo counts and addresses for a travel database or content pipeline.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Trivago offer an official developer API?+
What does search_hotels return, and how does the price field work?+
price field representing the lowest per-night rate found across booking sites for your specified dates and currency, along with the booking_site name that offers that rate. The guest_rating and reviews_count fields are also included so you can display both price and social proof in one response.Does the API return room-level details such as room types, amenities, or cancellation policies?+
How many hotels does a single search_hotels call return?+
Can I retrieve hotel photos through this API?+
search_hotels response includes one representative image URL per hotel, and get_hotel_info returns a photos_count integer indicating how many photos exist for that property. Full photo gallery URLs are not returned. You can fork this API on Parse and revise it to add an endpoint that fetches the complete photo list for a given hotel ID.