Tripadvisor APItripadvisor.it ↗
Search for travel destinations and discover attractions, restaurants, and things to do at any location by accessing TripAdvisor's comprehensive listings. Find detailed information about popular spots and activities to plan your perfect trip.
curl -X GET 'https://api.parse.bot/scraper/bfabbf7f-4741-4838-9523-2368d5177864/search_locations?query=Rome' \ -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 tripadvisor-it-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.
"""Walkthrough: TripAdvisor Listings API — search destinations and browse attractions."""
from parse_apis.tripadvisor_it_api import TripAdvisor, NotFoundError
client = TripAdvisor()
# Search for a destination by name
for loc in client.locations.search(query="Rome", limit=3):
print(loc.name, loc.geo_id, loc.coords)
# Take the first result and list its attractions
location = client.locations.search(query="Paris", limit=1).first()
if location:
for listing in location.listings.list(category="47", limit=5):
print(listing.title, listing.rating, listing.review_count)
# Handle errors for invalid locations
try:
bad_loc = client.location(geo_id="9999999")
for item in bad_loc.listings.list(limit=1):
print(item.title)
except NotFoundError as exc:
print(f"Location not found: {exc}")
print("exercised: locations.search / location.listings.list / NotFoundError")
Search for travel destinations by name. Returns a list of matching locations with their geo_id (TripAdvisor's numeric location identifier), full name, and coordinates. Use the returned geo_id to fetch listings via list_listings.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Location search query (city, region, or country name, e.g. 'Rome', 'Paris', 'New York'). |
{
"type": "object",
"fields": {
"query": "string",
"locations": "array of location objects with geo_id, name, url, coords"
},
"sample": {
"query": "Rome",
"locations": [
{
"url": "/Tourism-g187791-Rome_Lazio-Vacations.html",
"name": "Rome, Lazio, Italy",
"coords": "41.893623,12.495978",
"geo_id": "187791"
}
]
}
}About the Tripadvisor API
The Tripadvisor API on Parse exposes 2 endpoints for the publicly available data on tripadvisor.it. Calls return JSON over HTTPS and are billed per successful response.
Pin a release with the API-Snapshot-Version header so canonical updates don't silently change your contract.