How to Scrape Tripadvisor Data with an API
Use Tripadvisor’s authorized APIs for location and review data, with eligibility, quotas, migration, code patterns, errors and compliance guidance.
Direct answer: Do not scrape Tripadvisor pages. For an authorized integration, apply for the Tripadvisor partner platform (currently Terra), confirm that your consumer-facing use case is eligible, obtain access to the package and endpoints assigned to your account, then use the documented flow: search for a licensed location, take its Tripadvisor location ID, and request reviews for that ID. Your implementation must follow the current agreement’s attribution, display, caching, linking, quota and budget rules.
1. Confirm that your use case is allowed
Tripadvisor’s Content API materials describe the API as intended for consumer-facing B2C websites and apps. Academic research and B2B reputation-management uses are described as ineligible, and proposed integrations must be submitted for approval so Tripadvisor can check display requirements. A site or app that is not live may not qualify under the documented process.
The Content API Master Terms restrict collecting licensed content or similar content from Tripadvisor sites by any method other than Tripadvisor’s API unless Tripadvisor expressly approves it. Tripadvisor’s site terms also restrict automated collection except where the company expressly permits it in writing. Review the current terms and your account agreement before implementation.
2. Choose the current API product
For new work, investigate the Terra partner platform and confirm the package and endpoints available to your account. The legacy JSON Partner API page describes that API as being in maintenance mode and expected to be deprecated in 2026 Q3, without giving an exact sunset date. Treat that as a migration notice and verify the current status before committing to a new integration.
Terra’s Discover offering is described as providing common factual location content and a limited amount of user-generated content, with lower throughput and quotas. Your package and add-ons determine which licensed content and endpoints you can call.
3. Plan the data flow
- Document the consumer feature: for example, a live travel-planning page that displays an approved location and its permitted review content.
- Submit the integration for approval and agree the required display, attribution, linking and caching behavior.
- Use the account dashboard and agreement to identify the Search Locations and Location Reviews access included in your package.
- Search by a location name or address. Search results are paginated and restricted to locations your account is licensed to access.
- Store the returned Tripadvisor location ID only as permitted by the current policy.
- Request reviews for that location ID, using only filters and fields enabled for your package.
- Render the response with the required Tripadvisor attribution and links.
- Track rate limits, daily quotas, budget usage and 429 responses.
4. Search for a licensed location
The exact URL, authentication scheme and field names are account-specific. Copy them from your current Terra documentation and dashboard rather than copying an endpoint from an old integration. The example below is runnable after you set the documented URL and credentials in environment variables.
import os
import requests
SEARCH_URL = os.environ["TRIPADVISOR_SEARCH_LOCATIONS_URL"]
TOKEN = os.environ["TRIPADVISOR_ACCESS_TOKEN"]
params = {
"query": "Eiffel Tower, Paris",
"page": 1,
"page_size": 20,
}
headers = {
"Authorization": f"Bearer {TOKEN}",
"Accept": "application/json",
}
response = requests.get(SEARCH_URL, params=params, headers=headers, timeout=30)
response.raise_for_status()
data = response.json()
print(data)
# Inspect the documented response and select a licensed Tripadvisor location ID.
# Do not assume a field name or use an ID that your account cannot access.
cURL
curl --fail --silent --show-error \
--get "$TRIPADVISOR_SEARCH_LOCATIONS_URL" \
-H "Authorization: Bearer $TRIPADVISOR_ACCESS_TOKEN" \
-H "Accept: application/json" \
--data-urlencode "query=Eiffel Tower, Paris" \
--data-urlencode "page=1" \
--data-urlencode "page_size=20"
Node.js
const searchUrl = new URL(process.env.TRIPADVISOR_SEARCH_LOCATIONS_URL);
searchUrl.searchParams.set('query', 'Eiffel Tower, Paris');
searchUrl.searchParams.set('page', '1');
searchUrl.searchParams.set('page_size', '20');
const response = await fetch(searchUrl, {
headers: {
Authorization: `Bearer ${process.env.TRIPADVISOR_ACCESS_TOKEN}`,
Accept: 'application/json'
}
});
if (!response.ok) {
throw new Error(`Location search failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
5. Request reviews by location ID
Pass the licensed Tripadvisor location ID returned by Search Locations to the Location Reviews operation. The reviews reference documentation describes filters for minimum rating, trip type, publish date, sort order and language. Availability of fields, filters and volume depends on your package and add-ons.
import os
import requests
REVIEWS_URL = os.environ["TRIPADVISOR_LOCATION_REVIEWS_URL"]
TOKEN = os.environ["TRIPADVISOR_ACCESS_TOKEN"]
LOCATION_ID = os.environ["TRIPADVISOR_LOCATION_ID"]
params = {
"location_id": LOCATION_ID,
"page": 1,
"page_size": 20,
"language": "en",
# Add only filters documented for your package:
# "minimum_rating": 4,
# "trip_type": "family",
# "published_after": "2025-01-01",
# "sort": "newest",
}
headers = {
"Authorization": f"Bearer {TOKEN}",
"Accept": "application/json",
}
response = requests.get(REVIEWS_URL, params=params, headers=headers, timeout=30)
response.raise_for_status()
print(response.json())
cURL
curl --fail --silent --show-error \
--get "$TRIPADVISOR_LOCATION_REVIEWS_URL" \
-H "Authorization: Bearer $TRIPADVISOR_ACCESS_TOKEN" \
-H "Accept: application/json" \
--data-urlencode "location_id=$TRIPADVISOR_LOCATION_ID" \
--data-urlencode "page=1" \
--data-urlencode "page_size=20" \
--data-urlencode "language=en"
Node.js
const reviewsUrl = new URL(process.env.TRIPADVISOR_LOCATION_REVIEWS_URL);
reviewsUrl.searchParams.set('location_id', process.env.TRIPADVISOR_LOCATION_ID);
reviewsUrl.searchParams.set('page', '1');
reviewsUrl.searchParams.set('page_size', '20');
reviewsUrl.searchParams.set('language', 'en');
const response = await fetch(reviewsUrl, {
headers: {
Authorization: `Bearer ${process.env.TRIPADVISOR_ACCESS_TOKEN}`,
Accept: 'application/json'
}
});
if (!response.ok) {
throw new Error(`Review request failed: ${response.status}`);
}
const reviews = await response.json();
console.log(reviews);
6. Pagination, filtering and storage
- Follow the pagination fields documented in your response schema; never assume that a page contains the same number of records.
- Persist the provider’s location ID and your own internal key separately.
- Use publish-date, language, rating, trip-type and sort filters only when your package documents them.
- Do not transform, republish or cache review content based on what the endpoint technically returns. Apply the current display and retention policy.
- Keep attribution and required Tripadvisor links next to the content they identify.
7. Authentication, quotas and cost controls
API credentials do not grant access to every endpoint. Terra ties access to packages and add-ons, publishes rate and daily quota limits, and returns HTTP 429 when a limit is exceeded. Check the live dashboard and account agreement before estimating capacity.
The Content API product page currently describes billing details at signup, a maximum daily budget, and a first-5,000-calls-per-month allowance after signup. These commercial terms can change, so verify them before publishing pricing or forecasting spend.
| Concern | Implementation practice |
|---|---|
| Rate limit | Throttle requests, honor retry guidance and avoid immediate tight retries after 429. |
| Daily quota | Expose usage metrics and stop optional refresh jobs before the account limit. |
| Budget | Set the maximum daily budget required by the product and alert before reaching it. |
| Pagination | Use bounded pages and checkpoint progress so a restart does not duplicate work. |
| Caching | Cache only for the period and purpose permitted by the current agreement. |
8. Reliability and performance
- Put timeouts on every request and record request ID or equivalent provider diagnostics when supplied.
- Retry transient transport failures with exponential backoff and jitter. Do not blindly retry a 401, 403 or 429.
- Use a queue for bulk refreshes so quota consumption is spread across the day.
- Cache location lookups where allowed, then refresh reviews according to the permitted policy and your product’s freshness needs.
- Make rendering tolerant of missing optional fields and language-specific content.
- Monitor success rate, latency, 401/403/429 counts, daily calls and budget consumption.
9. Common errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| 401 Unauthorized | Missing, expired or malformed credential. | Rotate the credential, verify the authentication format in the current docs and keep secrets out of client-side code. |
| 403 Forbidden | Your account or package is not licensed for the operation or location. | Check Terra package access, add-ons and allowlists; request approval instead of trying another endpoint. |
| 404 or empty search results | The location is not in your licensed result set, or the query is too specific. | Try an approved name or address format, inspect pagination and confirm account coverage. |
| 429 Too Many Requests | Rate or daily quota exceeded. | Stop tight retries, back off, reduce concurrency and inspect dashboard limits. |
| Reviews missing expected fields | Field access depends on package, add-ons, language or display rules. | Compare the response with your licensed schema and request only documented fields. |
| Content rejected during review | Display, attribution, linking or integration requirements are not met. | Follow the approved design and current terms; submit the integration for clarification. |
| Legacy integration warning | JSON Partner API maintenance or migration notice. | Plan a Terra review and migration; do not assume a sunset date that Tripadvisor has not published. |
10. Compliance checklist
- Use a live, consumer-facing B2C application that has passed the provider’s approval process.
- Use only the endpoints and content covered by your account package.
- Display required Tripadvisor attribution and links.
- Follow the current rules for caching, retention, transformation and review display.
- Do not collect content from Tripadvisor pages with a browser, scraper, robot or spider.
- Keep credentials server-side and rotate them when required.
- Recheck terms, quotas, pricing and migration notices before launch.
Or skip the browser setup
If your product also needs screenshots of approved travel pages or internal dashboards, ScreenshotNeo provides a single website screenshot API call. It removes cookie banners, newsletter popups and chat widgets before capture; bot checks, blank pages and failed loads are never billed; and its MCP server lets AI agents take screenshots.
See the ScreenshotNeo API documentation for the available options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Free accounts include 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
FAQ
Can I scrape Tripadvisor HTML if I do not use the API?
The supplied Tripadvisor terms prohibit automated collection except where expressly permitted. Use an approved API integration instead.
Does an API key provide access to all locations and reviews?
No. Search results and review access are restricted by your license, package and add-ons.
Is the legacy JSON Partner API already shut down?
The legacy page describes maintenance mode and an expected 2026 Q3 deprecation, but no exact sunset date. Confirm the live status for your account.
What should I do when a request receives 429?
Stop immediate retries, apply backoff, reduce concurrency and check your rate and daily quota dashboards.
Can I use the data for an internal reputation dashboard?
The FAQ describes academic research and B2B reputation-management uses as ineligible. Submit your exact use case for approval before building it.


