TripAdvisor APItripadvisor.it ↗
Search TripAdvisor locations by name and list attractions, tours, and things to do. Returns geo_id, coordinates, listings, and category filters.
What is the TripAdvisor API?
The TripAdvisor.it API exposes 2 endpoints for querying travel destinations and retrieving attraction listings. search_locations resolves a city, region, or country name into TripAdvisor's numeric geo_id along with coordinates and a canonical URL. list_listings uses that geo_id to return up to 100–200+ attractions across category shelves, or 30 items per page when a specific category filter like Museums (49) or Sights & Landmarks (47) is applied.
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
Location Search
search_locations accepts a free-text query parameter — a city name like Rome, a region, or a country — and returns an array of matching location objects. Each object includes a geo_id (TripAdvisor's internal numeric identifier), a full name, a canonical url, and coords for mapping. The geo_id is the key output: it feeds directly into list_listings to pull attraction data for that location.
Listing Attractions and Things To Do
list_listings takes a required geo_id and returns attraction data for that location. Without a category filter, it returns a cover page (is_cover_page: true) that aggregates items from multiple category shelves, typically yielding 100–200+ listings. The offset parameter enables client-side pagination of these cover page results. With a category filter — common values include 47 (Sights & Landmarks), 42 (Tours), 49 (Museums), and 41 (Outdoor Activities) — the response switches to a structured list page with 30 items per page and server-side pagination. Responses always include a listings array, a categories array with name, primary_id, and secondary_id fields, search_title, total_results, count, and the resolved location string.
Response Shape and Pagination Behavior
The is_cover_page boolean in the list_listings response tells you which mode you're in. Cover pages aggregate across shelves but pagination is handled client-side via offset. Category-filtered pages use server-side pagination with 30 results per page. The total_results field lets you calculate how many pages remain. Category IDs are discoverable from the categories array returned in any list_listings response, so you can enumerate valid filters programmatically.
The TripAdvisor API is a managed, monitored endpoint for tripadvisor.it — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when tripadvisor.it 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 tripadvisor.it 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 city travel guide by resolving a destination name to a
geo_idand listing top attractions by category - Aggregate Sights & Landmarks (category 47) listings across multiple European cities for a destination comparison tool
- Populate a tour-booking platform with Tours category (42) listings including names and URLs for a given location
- Geocode TripAdvisor destinations using the
coordsfield returned bysearch_locations - Enumerate all attraction categories available for a location using the
categoriesarray inlist_listingsresponses - Track total attraction counts per city using the
total_resultsfield across multiplegeo_idqueries - Build an itinerary planner that pages through Museums (category 49) listings for a destination using offset-based pagination
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does TripAdvisor have an official developer API?+
What does list_listings return when no category filter is supplied?+
is_cover_page: true) that pulls attractions from multiple category shelves, typically yielding 100–200+ listing objects. The offset parameter controls client-side pagination of these results. Supplying a category ID switches to a structured list page with 30 items per page and a reliable total_results count for server-side pagination.Does the API return reviews, ratings, or photos for individual attractions?+
search_locations and attraction listing data via list_listings, including names, URLs, and category metadata. Per-attraction review text, star ratings, and photos are not part of the current response schema. You can fork this API on Parse and revise it to add an endpoint targeting individual attraction detail pages.Does the API cover restaurant or hotel listings, not just attractions?+
geo_id.How do I find valid category filter IDs to pass to list_listings?+
list_listings response includes a categories array, where each object contains a name, primary_id, and secondary_id. You can make an unfiltered cover-page call for a destination and read that array to discover all valid category IDs for that location before making filtered requests.