Tony Wang5 min readHow to Scrape TripAdvisor in 2026 (API & Python)
Scrape TripAdvisor in 2026 — DIY Python, no-code, or a structured API for hotel, restaurant, and attraction search plus reviews — with the legal basics.
The fastest way to scrape TripAdvisor in 2026 is to call a structured API that returns normalized JSON — hotel, restaurant, and attraction search, place details, and reviews — instead of reverse-engineering TripAdvisor's GraphQL endpoints and fighting its anti-bot stack. You can build a DIY scraper, but TripAdvisor is well defended and its official API omits the review text most people want. This guide covers all three approaches, what each returns, where each breaks, and the legal basics.
Why scrape TripAdvisor?
TripAdvisor is one of the largest travel data sources, which makes it valuable for:
- Hotel & restaurant market analysis — track ratings, rankings, and pricing across a destination.
- Review & sentiment analysis — quantify what guests praise and complain about.
- Competitive intelligence — benchmark a property against its local rank and peers.
- Travel content & products — power destination, attraction, and "things to do" research.
Is it legal to scrape TripAdvisor?
Option 1: DIY in Python (and why it breaks)
TripAdvisor loads search and listing data through GraphQL, so a DIY scraper reverse-engineers those calls:
import httpx
# TripAdvisor's typeahead runs on a GraphQL endpoint keyed by a rotating query id
payload = [{"variables": {"request": {"query": "New York", "limit": 10, "locale": "en-US"}},
"query": "84b17ed122fbdbd4"}] # preRegisteredQueryId — changes over time
r = httpx.post("https://www.tripadvisor.com/data/graphql/ids", json=payload, http2=True,
headers={"Origin": "https://www.tripadvisor.com",
"Referer": "https://www.tripadvisor.com/Hotels",
"X-Requested-By": "<random-tracking-id>"}) # required, or you're blocked
It demos and then breaks:
- DataDome + Cloudflare. TripAdvisor runs DataDome bot detection behind a Cloudflare WAF with TLS fingerprinting and JavaScript challenges; datacenter IPs draw CAPTCHAs and 403s, so you need residential proxies and a low rate (roughly 10 requests/minute with 3–7s delays).
- Rotating GraphQL query ids. The data lives behind
/data/graphql/idscalls keyed by apreRegisteredQueryIdthat changes, plus requiredOrigin/Referer/X-Requested-Byheaders — when the id rotates, your scraper stops returning data. - Hidden web data and drifting selectors. Hotel and review detail is embedded as JSON in the page (the
aggregateRatingscript blocks), reviews paginate via-orN-URL offsets, and thedata-test-targethooks change without notice. - The official API won't fill the gap. TripAdvisor's Content API gives ~5,000 free calls/month (credit card required) but returns ratings and links — not full review text — so the content people actually want still means scraping.
Option 2: No-code tools
Visual extractors and marketplace "TripAdvisor reviews" actors export CSV/JSON and suit one-off pulls, but they're awkward in an in-product pipeline with predictable fields and they break on the same anti-bot churn.
Option 3: A structured TripAdvisor API
For repeatable workflows, a TripAdvisor scraping API returns normalized JSON with no browser to run. Resolve a location first:
curl "https://api.crawlora.net/api/v1/tripadvisor/autocomplete?q=New%20York" \
-H "x-api-key: $CRAWLORA_API_KEY"
Then chain autocomplete → search → reviews in Python:
import requests
h = {"x-api-key": "YOUR_API_KEY"}
base = "https://api.crawlora.net/api/v1/tripadvisor"
# 1) resolve a location to a geo_id
geo = requests.get(f"{base}/autocomplete", headers=h, params={"q": "New York"}).json()["data"]["results"][0]
geo_id = geo["id"]
# 2) search hotels (or restaurants / attractions) in that geo
hotels = requests.get(f"{base}/search", headers=h,
params={"geo_id": geo_id, "type": "hotel", "limit": 20}).json()["data"]["results"]
# 3) pull a place's reviews by its own id
place_id = hotels[0]["id"]
reviews = requests.get(f"{base}/reviews", headers=h,
params={"id": place_id, "page": 1, "language": "en"}).json()["data"]["reviews"]
A reviews response is normalized JSON you can store directly (fields are illustrative — check the docs):
{
"code": 200,
"msg": "OK",
"data": {
"id": "113311",
"page": 1,
"language": "en",
"total": 1517,
"reviews": [
{
"id": "1060008752",
"title": "Outstanding weekend",
"text": "Excellent stay with attentive service.",
"author": "Jane D.",
"date": "May 2026",
"rating": 5,
"helpful_votes": 1,
"photos": ["https://dynamic-media-cdn.tripadvisor.com/media/photo.jpg"]
}
]
}
}
Search results carry id, title, type, url, rating, review_count, rank_label, price_level, address, categories, and booking_url. Use /tripadvisor/hotels for hotel-specific results with price/star_rating, /tripadvisor/place for full place detail, and /tripadvisor/enums for valid type/sort values. Reviews paginate via page; pass language and sort_by. Store one row per review and re-pull on a schedule.
What you can collect
Where the public pages expose them: location autocomplete (geo ids and parents), search results for hotels, restaurants, and attractions (rating, review_count, rank_label, price_level or price, categories, booking_url), place detail (address, images, rating, review total), and reviews (title, text, author, date, rating, helpful_votes, photos) — scoped by geo and locale/currency. Stick to public, factual fields.
Limitations and common challenges
- No easy official path to review text. The Content API caps at ~5,000 calls/month (card required) and omits full review text, and direct scraping draws DataDome/Cloudflare CAPTCHAs at scale — a structured API absorbs proxies and anti-bot behind one key.
- geo_id vs place id. Locations are addressed by a
geo_id(from autocomplete); individual hotels, restaurants, and attractions by their ownid— resolve the geo first. - Reviews are per-locale and personal data. Reviews are tied to a language/locale, and author names plus review text are personal under GDPR/CCPA — collect public, factual fields with a lawful basis.
- Rankings and prices are dynamic. Rank labels and nightly prices shift, so re-pull on a schedule rather than trusting a one-time snapshot.
Where this gets used
- Travel & hospitality research — track hotels, restaurants, and attractions across destinations. See the travel & hospitality research use case.
- Review & reputation monitoring — watch ratings and review sentiment for a property. See review & reputation monitoring.
- Market & competitive analysis — benchmark a venue against its local rank and peers.
Sources
Start collecting
Try it first, free: run any public URL through the Free Web Scraper, or check whether a site blocks bots with the Anti-Bot Checker — no signup.
Test the search and reviews endpoints in the Playground, check the schema in the API docs, and review pricing. See also how to scrape Airbnb for the rest of the travel stack, how to scrape Trustpilot reviews and how to scrape App Store reviews for more review sources, how to choose a web scraping API, and is web scraping legal.
Frequently asked questions
Can I scrape TripAdvisor without getting blocked?
TripAdvisor runs DataDome bot detection behind a Cloudflare WAF with TLS fingerprinting and JavaScript challenges, so datacenter IPs draw CAPTCHAs and 403s — DIY needs residential proxies and a slow rate (around 10 requests/minute). A structured API handles proxies and anti-bot behind one key for public search and review data.
Does TripAdvisor have an official API?
Yes, but it's limited. The TripAdvisor Content API gives roughly 5,000 free calls/month (a credit card is required) and returns ratings and links — not full review text — so collecting the actual review content people want still means scraping.
How do I get a hotel or restaurant's reviews?
Resolve the location to a geo_id with /tripadvisor/autocomplete, search that geo with /tripadvisor/search (type hotel, restaurant, or attraction) to get a place's id, then call /tripadvisor/reviews with that id. Reviews paginate by page and accept language and sort_by.
What's the difference between a geo_id and a place id?
A geo_id identifies a location (city, region) and comes from autocomplete; a place id identifies a specific hotel, restaurant, or attraction and comes from search results. You resolve the geo first, then address the place by its own id.
What TripAdvisor data can I collect?
Public fields: location autocomplete, search results for hotels/restaurants/attractions (rating, review_count, rank_label, price level, categories, booking_url), place detail (address, images, rating), and reviews (title, text, author, date, rating, helpful_votes, photos) — scoped by geo and locale.
Are TripAdvisor reviews personal data?
Yes. Author names and review text are personal data under GDPR/CCPA — collect only public, factual fields with a lawful basis, and don't republish reviewers' identities.
How often can I refresh?
Rankings and prices change, so re-pull on a schedule within your plan and responsible-use limits rather than polling continuously.