GET
TripAdvisor Hotel Subratings API
Retrieve a hotel's aggregate TripAdvisor category ratings by location ID.
Overview
Six category scores
Returns Location, Rooms, Value, Cleanliness, Service, and Sleep Quality on TripAdvisor's 1–5 rating scale.
Use subratings to compare the parts of the guest experience that an overall bubble rating hides. Values are returned as numbers rounded to two decimal places. A category can be null when TripAdvisor has not published enough data for it.
Endpoint URL
GET https://api.stayapi.com/v1/tripadvisor/hotel/subratings/{location_id}
Path parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| location_id | integer | Yes | The number after d in a TripAdvisor hotel URL, for example 236154. |
Response fields
The data object always contains these keys:
locationroomsvaluecleanlinessservicesleep_quality
Errors
- 404 — no category ratings were found for the location ID.
- 502 — TripAdvisor's upstream GraphQL request failed.
- 503 / 504 — the scraper pool is temporarily busy or timed out.
Request
Response