Scrape TripAdvisor hotel reviews in Python or Node.js and export them to CSV or JSON — no proxies, no CAPTCHAs, no brittle HTML parsing.
Open In Colab License: MIT Powered by StayAPI
This scraper uses the StayAPI REST API under the hood: one HTTP call returns clean, structured review JSON for any hotel on TripAdvisor — StayAPI handles proxies, bot-detection, and page rendering server-side. Sign up for 50 free requests for testing the API.
# 1. Get a free API key (50 free requests for testing the API): https://stayapi.com/users/sign_up # 2. Install and run: git clone https://github.com/stayapi/tripadvisor-review-scraper.git cd tripadvisor-review-scraper pip install -r requirements.txt export STAYAPI_KEY="your-key" python tripadvisor_review_scraper.py 187686 # The Savoy, London → CSV
Output:
Page 1: 20 reviews (total 20 of 7943)
Page 2: 20 reviews (total 40 of 7943)
...
Wrote 100 reviews to tripadvisor_reviews_187686.csv
Have a TripAdvisor URL instead of an ID? Pass it directly — the ID is parsed locally, no extra API request:
python tripadvisor_review_scraper.py "https://www.tripadvisor.com/Hotel_Review-g186338-d187686-Reviews-The_Savoy-London_England.html"Reviews arrive newest-first as structured JSON with full text, ratings, reviewer profiles, and trip details (full sample →):
{
"id": 1072501577,
"rating": 5,
"title": "Exceptional Afternoon Tea — The Service Made It Truly Special",
"text": "What a wonderful experience. Afternoon tea was one of the things I was most looking forward to during our trip to London...",
"language": "en",
"published_date": "2026年08月10日",
"helpful_votes": 0,
"user": {
"display_name": "Travel JunKie",
"contribution_count": 76
},
"trip_info": {
"stay_date": "2026年08月31日",
"trip_type": "COUPLES"
}
}The CSV export flattens this to one row per review (sample CSV →) with columns: review_id, rating, title, text, language, published_date, stay_date, trip_type, reviewer_name, reviewer_hometown, reviewer_contributions, helpful_votes, photo_count.
# All reviews for a hotel (0 = no limit; 20 reviews per API request) python tripadvisor_review_scraper.py 187686 --max-reviews 0 # Only critical reviews (3 stars or below) — complaint mining python tripadvisor_review_scraper.py 187686 --max-rating 3 --csv complaints.csv # English-only reviews (TripAdvisor language codes: en, ja, es, fr, de, it, zhTW, ru, th...) python tripadvisor_review_scraper.py 187686 --language en # Raw JSON alongside the CSV (for your own pipeline) python tripadvisor_review_scraper.py 187686 --json reviews.json
Reviews are always returned in publication-date order, newest first — paginate until you reach your date cutoff for period-based backfills.
Node 18+ with zero dependencies — the API does the heavy lifting:
cd node export STAYAPI_KEY="your-key" node scraper.js 187686 --max-reviews 100
Every TripAdvisor hotel URL contains the location ID as the -d segment:
https://www.tripadvisor.com/Hotel_Review-g186338-d187686-Reviews-The_Savoy-London_England.html
^^^^^^^ location ID: 187686
Pass either the full URL or the number — the scraper handles both.
- StayAPI TripAdvisor API hub — all TripAdvisor endpoints: reviews, hotel details, live prices, search
- Free TripAdvisor review lookup tool — try it in the browser, no account needed
- API docs · MCP server for Claude, Cursor & other AI agents
MIT. Review content belongs to its authors and TripAdvisor; use responsibly and respect applicable laws and terms.