tripadvisor.com APItripadvisor.com ↗
Search TripAdvisor locations, list hotels by geo ID, and fetch special offers. Get ratings, review counts, price ranges, and coordinates via 3 structured endpoints.
curl -X GET 'https://api.parse.bot/scraper/f436cbcf-96a4-4f9e-85b0-3acad164fed6/search_location?query=London' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for locations (cities, regions, hotels, attractions, restaurants) by keyword to get their locationId and geographic details.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search keyword (e.g., 'London', 'Paris', 'New York') |
{
"type": "object",
"fields": {
"total": "integer count of results returned",
"results": "array of location objects with locationId, name, placeType, latitude, longitude, isGeo, address, url, parentName, parentType"
},
"sample": {
"data": {
"total": 1,
"results": [
{
"url": "/Tourism-g186338-London_England-Vacations.html",
"name": "London",
"isGeo": true,
"address": "England, United Kingdom",
"latitude": 51.519241,
"longitude": -0.096654,
"placeType": "CITY",
"locationId": 186338,
"parentName": "United Kingdom",
"parentType": "COUNTRY"
}
]
},
"status": "success"
}
}About the tripadvisor.com API
The TripAdvisor API exposes 3 endpoints covering location search, hotel listings, and place-level offer details. Use search_location to resolve any city, region, or attraction name into a locationId and geographic coordinates, then pass the resulting geo_id to list_hotels to retrieve paginated hotel records including ratings, review counts, price ranges, phone numbers, and images. Each response uses consistent integer IDs that chain across endpoints.
Endpoints and Data Shape
The search_location endpoint accepts a free-text query (e.g., 'London' or 'New York') and returns an array of location objects. Each object includes locationId, name, placeType, latitude, longitude, isGeo, address, url, parentName, and parentType. This is the standard entry point for resolving human-readable names into the integer IDs the other endpoints require.
Hotel Listings
list_hotels takes a required geo_id integer — obtained from search_location or known in advance (e.g., 60763 for New York City, 186338 for London) — and returns up to 30 hotels per page. Pagination is controlled via the offset parameter in multiples of 30, and the response echoes both geo_id and offset for consistency. Each hotel record includes locationId, name, address, latitude, longitude, telephone, image, rating, reviewCount, priceRange, and a direct TripAdvisor url.
Place Details and Special Offers
get_place_details accepts a location_id integer (from either of the other endpoints) and returns special offer data for that property. The response is structured under BaAggregation_getSpecialOfferDetailsBulk, an array of objects containing locationId and a specialOffers array. This endpoint is suited for surfacing current promotions tied to a specific hotel rather than general metadata.
Coverage Notes
All three endpoints return TripAdvisor url fields, making it straightforward to deep-link users to the original listing. placeType in search_location results distinguishes between geo nodes (cities, regions) and point-of-interest types (hotels, attractions, restaurants), which is useful when you need to filter search results before passing IDs downstream.
- Build a hotel price-range comparison tool using
priceRangeandratingfields fromlist_hotels - Resolve destination names to geographic IDs for use in downstream travel itinerary apps via
search_location - Display hotel contact information and direct booking links using
telephoneandurlfields - Surface special hotel promotions by chaining
list_hotelsresults intoget_place_details - Geocode hotels for map-based UIs using
latitudeandlongitudefromlist_hotels - Filter search results by
placeTypeto separate city-level geo nodes from individual attractions or hotels
| 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 | 250 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 TripAdvisor have an official developer API?+
What does `list_hotels` return, and how does pagination work?+
locationId, name, address, latitude, longitude, telephone, image, rating, reviewCount, priceRange, and url. To paginate, increment the offset parameter by 30 (e.g., 0, 30, 60). The response echoes both geo_id and offset so you can verify the request parameters against the result.Are restaurant or attraction listings available, not just hotels?+
search_location returns results for restaurants, attractions, and other place types alongside hotels — you can identify them via the placeType field. However, dedicated listing endpoints for restaurants or attractions (equivalent to list_hotels) are not currently part of this API. You can fork it on Parse and revise to add those listing endpoints.Does the API return user reviews or review text?+
reviewCount (an integer) and rating per hotel, but do not return individual review text, review titles, or reviewer profiles. You can fork the API on Parse and revise it to add a reviews endpoint that returns per-review content for a given locationId.What is a known limitation of the `get_place_details` endpoint?+
BaAggregation_getSpecialOfferDetailsBulk. It does not return general hotel metadata such as amenities, check-in policies, or room types. If a property has no active special offers, the specialOffers array will be empty.