Travel-hacking-toolkit tripadvisor
Search TripAdvisor for hotels, restaurants, and attractions. Get ratings, reviews, photos, rankings, amenities, and nearby locations via the Content API. Use when evaluating hotels, comparing restaurants, or researching destinations.
git clone https://github.com/borski/travel-hacking-toolkit
T=$(mktemp -d) && git clone --depth=1 https://github.com/borski/travel-hacking-toolkit "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tripadvisor" ~/.claude/skills/borski-travel-hacking-toolkit-tripadvisor && rm -rf "$T"
skills/tripadvisor/SKILL.mdTripAdvisor Content API
Search and retrieve hotel, restaurant, and attraction data from TripAdvisor. Ratings, rankings, reviews, photos, amenities, subratings, trip types, awards.
Base URL:
https://api.content.tripadvisor.com/api/v1
Rate limit: 50 calls per second.
Monthly quota: 5,000 API calls per month. Each curl request = 1 call. A full hotel lookup (search + details + reviews + photos) = 4 calls. Budget accordingly. Prefer search + details (2 calls) and only fetch reviews/photos when specifically needed.
API limits: Up to 10 results per search. Up to 5 reviews and 5 photos per location.
Authentication
Set
TRIPADVISOR_API_KEY in your .env file:
# In .env (gitignored) TRIPADVISOR_API_KEY=your_key_here
Then source it before calling:
export $(grep TRIPADVISOR_API_KEY .env | xargs)
Endpoints
1. Location Search
Find locations by name. Returns up to 10 results.
curl -s "https://api.content.tripadvisor.com/api/v1/location/search?key=$TRIPADVISOR_API_KEY&searchQuery=NOFO+Hotel+Stockholm&category=hotels&language=en"
Parameters:
| Param | Required | Description |
|---|---|---|
| Yes | Text search query (name of hotel, restaurant, city) |
| No | Filter: , , , |
| No | Phone number filter (any format, no leading +) |
| No | Address filter |
| No | Lat/long pair, e.g. |
| No | Radius from latLong (number) |
| No | , , or |
| No | Default . Supports 40+ languages. |
Response shape:
{ "data": [ { "location_id": "237656", "name": "Nofo Hotel", "address_obj": { "street1": "Tjarhovsgatan 11", "city": "Stockholm", "country": "Sweden", "postalcode": "116 21", "address_string": "Tjarhovsgatan 11, Stockholm 116 21 Sweden" } } ] }
2. Location Details
Get comprehensive info for a location by ID. This is the richest endpoint.
curl -s "https://api.content.tripadvisor.com/api/v1/location/{locationId}/details?key=$TRIPADVISOR_API_KEY&language=en¤cy=USD"
Parameters:
| Param | Required | Description |
|---|---|---|
| Yes (path) | TripAdvisor location ID from search |
| No | Default |
| No | ISO 4217 code, default |
Response includes:
,name
,web_url
,address_obj
,latitude
,longitude
,timezonephone
(string, e.g. "4.6"),rating
(string, e.g. "845")num_reviews
: breakdown by star (review_rating_count
){"1": "7", "2": "10", ...}
:ranking_data
(#10),ranking
(168),ranking_out_of
("#10 of 168 hotels in Stockholm")ranking_string
: Location, Sleep Quality, Rooms, Service, Value, Cleanliness (each 0.0 to 5.0)subratings
: "$", "$$", "$$$", "$$$$"price_level
: array of stringsamenities
: array (e.g. "Family", "Centrally Located")styles
: array with location_id and nameneighborhood_info
: business, couples, solo, family, friends with count valuestrip_types
: Travelers Choice, Best of Best, etc. with year and imagesawards
,parent_brand
: chain affiliationbrand
,category
: hotel/restaurant/attractionsubcategory
,photo_count
URLsee_all_photos
URLwrite_review
3. Location Reviews
Get up to 5 most recent reviews.
curl -s "https://api.content.tripadvisor.com/api/v1/location/{locationId}/reviews?key=$TRIPADVISOR_API_KEY&language=en"
Parameters:
| Param | Required | Description |
|---|---|---|
| Yes (path) | TripAdvisor location ID |
| No | Default |
| No | Number of results (max 5 on free tier) |
| No | Index of first result |
Response shape:
{ "data": [ { "id": 123456, "lang": "en", "location_id": "237656", "published_date": "2026-03-15T00:00:00-04:00", "rating": 5, "text": "Review text...", "title": "Review title", "trip_type": "Couples", "travel_date": "2026-03", "user": { "username": "traveler123" }, "subratings": {} } ] }
Note: Reviews may return empty
data: [] for locations with few English reviews. Try different language values for international hotels.
4. Location Photos
Get up to 5 recent photos with multiple size options.
curl -s "https://api.content.tripadvisor.com/api/v1/location/{locationId}/photos?key=$TRIPADVISOR_API_KEY&language=en"
Parameters:
| Param | Required | Description |
|---|---|---|
| Yes (path) | TripAdvisor location ID |
| No | Default |
| No | Number of results (max 5 on free tier) |
| No | Index of first result |
| No | Comma-separated: , , |
Photo sizes in response:
: 50x50 croppedthumbnail
: 150x150 croppedsmall
: max 250px dimensionmedium
: max 550px dimensionlarge
: full resolutionoriginal
5. Nearby Location Search
Find locations near coordinates. Returns up to 10.
curl -s "https://api.content.tripadvisor.com/api/v1/location/nearby_search?key=$TRIPADVISOR_API_KEY&latLong=59.3127,18.0716&category=hotels&language=en"
Parameters:
| Param | Required | Description |
|---|---|---|
| Yes | Lat/long pair, e.g. |
| No | , , , |
| No | Phone number filter |
| No | Address filter |
| No | Radius from latLong |
| No | , , |
| No | Default |
Response includes
(km) and distance
(e.g. "northwest") for each result.bearing
Common Workflows
Hotel Research (most common)
# 1. Search for hotel curl -s "https://api.content.tripadvisor.com/api/v1/location/search?key=$TRIPADVISOR_API_KEY&searchQuery=Amerikalinjen+Oslo&category=hotels" | python3 -m json.tool # 2. Get details with location_id from step 1 curl -s "https://api.content.tripadvisor.com/api/v1/location/1234567/details?key=$TRIPADVISOR_API_KEY¤cy=USD" | python3 -m json.tool # 3. Get reviews (optional, costs 1 call) curl -s "https://api.content.tripadvisor.com/api/v1/location/1234567/reviews?key=$TRIPADVISOR_API_KEY" | python3 -m json.tool # 4. Get photos (optional, costs 1 call) curl -s "https://api.content.tripadvisor.com/api/v1/location/1234567/photos?key=$TRIPADVISOR_API_KEY" | python3 -m json.tool
Compare Multiple Hotels in a City
# Search all hotels in city curl -s "https://api.content.tripadvisor.com/api/v1/location/search?key=$TRIPADVISOR_API_KEY&searchQuery=hotels+Copenhagen&category=hotels" # Then get details for each location_id returned # Compare: rating, num_reviews, ranking_data.ranking, subratings, price_level, amenities
Find Restaurants Near Hotel
# Use hotel's lat/long from details response curl -s "https://api.content.tripadvisor.com/api/v1/location/nearby_search?key=$TRIPADVISOR_API_KEY&latLong=59.31555,18.078924&category=restaurants"
Destination Research
# Search for attractions curl -s "https://api.content.tripadvisor.com/api/v1/location/search?key=$TRIPADVISOR_API_KEY&searchQuery=things+to+do+Stockholm&category=attractions" # Nearby attractions from a point curl -s "https://api.content.tripadvisor.com/api/v1/location/nearby_search?key=$TRIPADVISOR_API_KEY&latLong=59.3293,18.0686&category=attractions"
When to Use
- Evaluating hotels (ratings, rankings, subratings, review sentiment)
- Comparing restaurants near a hotel or in a neighborhood
- Finding attractions and things to do near a destination
- Getting TripAdvisor ranking data ("#1 of 168 hotels in Stockholm")
- Checking amenities, trip type breakdown, award status
- Verifying hotel chain affiliation and neighborhood info
When NOT to Use
- Pricing or availability. TripAdvisor Content API has no pricing data. Use
,serpapi
,liteapi
,chase-travel
, oramex-travel
for prices.rapidapi - Booking. This is read-only data. No booking capability.
- Bulk scraping. 5,000 calls/month. Be deliberate.
Key Data Points for Hotel Comparison
When comparing hotels, extract and present:
| Field | Path | Example |
|---|---|---|
| Rating | | "4.6" |
| Review count | | "845" |
| Ranking | | "#10 of 168 hotels in Stockholm" |
| Location subrating | | "4.7" |
| Service subrating | | "4.7" |
| Cleanliness subrating | | "4.8" |
| Price level | | "$$$$" |
| Trip type leader | highest | "Couples: 381" |
| Awards | | "Travelers Choice 2025" |
| Breakfast | contains "Breakfast included" | Yes/No |
| Chain | | "Worldhotels" |
Supported Languages
ar, zh, zh_TW, da, nl, en, en_AU, en_CA, en_HK, en_IN, en_IE, en_MY, en_NZ, en_PH, en_SG, en_ZA, en_UK, fr, fr_BE, fr_CA, fr_CH, de, de_AT, el, iw, it, it_CH, ja, ko, no, pt, pt_PT, ru, es, es_AR, es_CO, es_MX, es_PE, es_VE, es_CL, sv, th, tr, vi
Use
da for Danish, no for Norwegian, sv for Swedish when searching Scandinavian hotels for local-language reviews.