Integration Guide
How to Monitor a Hotel or Restaurant's Tripadvisor Reviews
'Tripadvisor reviews — why are they disappearing?' has 19 comments and no real answer. Here's how to track new reviews, catch the ones that vanish, and watch the rating trend for a specific property.
Written by Alex P.
- Tripadvisor
- review monitoring
- hospitality
- reputation management
- hotel reviews
“Tripadvisor reviews — why are they disappearing?” and “TripAdvisor gone bad, what’s the new alternative?” (373 upvotes) are both live threads with the same undertone: guests and owners alike have noticed reviews coming and going without explanation, and there’s no dashboard that tells either side what actually changed. If you manage a property’s reputation — or you’re benchmarking a competitor’s — that opacity is the actual problem, not a lack of review text to read.
This applies the same pattern as monitoring any other review platform for deletions, but Tripadvisor’s data shape is specific to hospitality: trip type, per-aspect sub-ratings, and a city ranking that moves independently of the star rating.
Pull the current review window
const API_KEY = process.env.FETCHLAYER_API_KEY;
async function fetchReviews(location) {
const res = await fetch('https://api.fetchlayer.dev/tripadvisor/location-reviews', {
method: 'POST',
headers: { Authorization: `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ location, sortBy: 'recent', limit: 100 }),
});
return (await res.json()).reviews;
}
location takes a Tripadvisor location id or a page URL — resolve a name to an id once with search-locations and cache it. Reviews arrive 20 per page regardless of what limit asks for; pages is the actual depth control, so a limit of 100 without enough pages set will come back short. Sort by recent, not a relevance-style default, for the same reason it matters everywhere else you’re polling for change: a re-rankable default produces false “new review” signals when the ranking itself shifts between polls.
Catching reviews that disappear
Tripadvisor doesn’t expose a “removed” flag, but every review does carry a stable reviewId — “the dedupe key for incremental pulls” — so unlike some review platforms, there’s no need to fingerprint on content. Diff on id, and apply the same guard you’d use anywhere else you’re watching a paged listing shrink:
import { readFile, writeFile } from 'node:fs/promises';
const STATE_FILE = './tripadvisor-state.json';
async function run(location) {
let seen;
try {
seen = new Set(JSON.parse(await readFile(STATE_FILE, 'utf8')));
} catch {
seen = new Set();
}
const reviews = await fetchReviews(location);
const isFirstRun = seen.size === 0;
const currentIds = new Set(reviews.map((r) => r.reviewId));
const fresh = reviews.filter((r) => !seen.has(r.reviewId));
const missing = [...seen].filter((id) => !currentIds.has(id));
// If the poll window was fully replaced by newer reviews, a "missing"
// review may have simply scrolled past it rather than been taken down.
const confidentRemovals = fresh.length < reviews.length ? missing : [];
reviews.forEach((r) => seen.add(r.reviewId));
await writeFile(STATE_FILE, JSON.stringify([...seen]));
if (isFirstRun) {
console.log(`Seeded ${reviews.length} reviews.`);
return;
}
console.log(`${fresh.length} new, ${confidentRemovals.length} likely removed.`);
}
Watching the rating trend, not just the reviews
A property’s overall bubble rating and its position in the local ranking move independently of any single review — location-profile carries both, plus a distribution across the five bubble ratings that shows whether a rating slide is broad or driven by a handful of very negative reviews:
async function checkProfile(location) {
const res = await fetch('https://api.fetchlayer.dev/tripadvisor/location-profile', {
method: 'POST',
headers: { Authorization: `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ location }),
});
const { profile } = await res.json();
return {
rating: profile.rating,
reviewCount: profile.reviewCount,
ratingDistribution: profile.ratingDistribution,
ranking: profile.ranking, // rank + total among comparable places, e.g. "#118 of 526 hotels"
};
}
Log rating and ranking.rank alongside your review diff on the same schedule. A rating that holds steady while ranking.rank slides means competitors are improving faster than you’re declining — a different problem than an actual drop in guest experience, and one the review text alone won’t tell you.
Segmenting by trip type
Hospitality reviews vary a lot by who’s writing them — a property can be excellent for couples and mediocre for families, and averaging across trip types hides that. tripTypes filters the pull itself rather than requiring you to filter client-side:
async function reviewsByTripType(location, tripType) {
const res = await fetch('https://api.fetchlayer.dev/tripadvisor/location-reviews', {
method: 'POST',
headers: { Authorization: `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ location, tripTypes: [tripType], sortBy: 'recent', limit: 100 }),
});
return (await res.json()).reviews;
}
// business, couples, family, friends, solo
const familyReviews = await reviewsByTripType(location, 'family');
Run this once per trip type you care about rather than trying to reconstruct the split from an unfiltered pull — Tripadvisor’s own trip-type tagging is more consistent than pattern-matching review text for it yourself.
Practical notes
translateis a translation target, not a language filter. Settinglanguage: 'en', translate: truegets every review’s text translated to English — Tripadvisor still returns reviews originally written in other languages either way. UsereviewCountsByLanguagefromlocation-profileto size a non-English segment before deciding whether translation is worth the pass.- The city ranking label is hotel-only.
ranking.label(“#118 of 526 hotels in New York City”) is published for hotels specifically; the underlying rank and total numbers exist for restaurants and attractions too, just without the pre-formatted sentence. isClosedis worth checking before alerting on a sudden review drop. A property Tripadvisor has marked permanently closed will naturally stop accumulating reviews — that’s not a monitoring failure, it’s the actual state of the listing.
Next Steps
- Tripadvisor Reviews API — full endpoint reference and pricing
- Get a free API key — no credit card required