GET

TripAdvisor Hotel Subratings API

Retrieve a hotel's aggregate TripAdvisor category ratings by location ID.

Copy for your AI agent

Paste into Claude, ChatGPT, Cursor or Copilot — endpoint, parameters, response fields and a curl example in Markdown.

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:

  • location
  • rooms
  • value
  • cleanliness
  • service
  • sleep_quality

Errors

  • 404 — no category ratings were found for the location ID.
  • 502 — TripAdvisor returned unavailable or malformed rating data.
  • 503 / 504 — the service is temporarily busy or the request timed out; retry shortly.
Request
curl -X GET "https://api.stayapi.com/v1/tripadvisor/hotel/subratings/236154" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "success": true,
  "location_id": 236154,
  "data": {
    "location": 4.86,
    "rooms": 4.36,
    "value": 4.38,
    "cleanliness": 4.65,
    "service": 4.59,
    "sleep_quality": 4.55
  },
  "message": "Successfully retrieved TripAdvisor hotel subratings",
  "retrieved_at": "2026-07-13T11:06:07.976853Z"
}
Browse documentation