Skip to content
Docs
Tripadvisor

Tripadvisor details

Tripadvisor details for one hotel, restaurant or attraction.

POST/v1/ota/tripadvisor/details
2 creditsTry itTripadvisor API overview →

Name it by location_id, any Tripadvisor page url, or name (+ city, narrowed by types); resolved echoes the location used. A name with no single confident match answers 404 with candidates, and an unknown id 404, both uncharged.

Returns name, type, address (and its parts), coordinates, rating and review count, the rating breakdown (count per star, from Tripadvisor's own rating filter), sub-ratings (hotels: value, rooms, location, cleanliness, service, sleep quality; restaurants: food, service, value, atmosphere; averaged over the newest 20 reviews that rated them, see sub_ratings_basis), ranking, awards, hotel class, cuisines, category and subcategories, tags, amenities, price level and range, phone, website, email, hours, fee, neighborhoods, the geo hierarchy, the description and photos (the main photo plus recent review photos). Review keywords and Tripadvisor's AI review summary are not exposed by the requests this uses, so they are not returned.

Request

POSThttps://api.scrapercompany.com/v1/ota/tripadvisor/details

Authenticate with your API key in the x-api-key header (see Authentication).

Run this request on your own API key from this page, with the values you type. Signed out? Sign in or get an API key.

Body

JSON object. Unknown fields are rejected with 422.

  • location_idstring | nullmin length 1, max length 2048

    Numeric Tripadvisor id (the digits after -d in a page URL), e.g. 17768161. A Tripadvisor page URL is accepted here too.

  • urlstring | nullmin length 8, max length 2048

    Any Tripadvisor page for the location, on any Tripadvisor domain: Hotel_Review, Restaurant_Review, Attraction_Review, ShowUserReviews ... The -d number is the location id and the -g number its geo id.

  • namestring | nullmin length 2, max length 200

    Place name, resolved with Tripadvisor's own search. Used only when one candidate clearly wins; otherwise the call answers 404 with up to five candidates to pick from. Add city for best results.

  • citystringdefault max length 200

    With name: the city, sent with the name and used to rank same-name places elsewhere lower.

  • typesarray of string | nullmin items 1, max items 3

    With name: kinds of place to search (hotel, restaurant, attraction; default all three).

Example request

curl -X POST "https://api.scrapercompany.com/v1/ota/tripadvisor/details" \
  -H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

200 — Restaurant details with the rating breakdown and sub-ratings. Metered responses carry x-credits-charged and x-credits-remaining headers (see credit headers).

200 response
{
  "search_parameters": {
    "engine": "tripadvisor_details",
    "location_id": "535627"
  },
  "details": {
    "location_id": "535627",
    "type": "restaurant",
    "name": "Neptune Oyster",
    "url": "https://www.tripadvisor.com/Restaurant_Review-g60745-d535627-Reviews-Neptune_Oyster-Boston_Massachusetts.html",
    "address": "63 Salem St Ste 1, Boston, MA 02113",
    "address_parts": {
      "street1": "63 Salem St",
      "street2": "Ste 1",
      "city": "Boston",
      "state": "MA",
      "country": "United States",
      "postalcode": "02113"
    },
    "coordinates": {
      "latitude": 42.36327,
      "longitude": -71.05601
    },
    "timezone": "America/New_York",
    "rating": 4.4,
    "review_count": 2149,
    "ranking": {
      "text": "#74 of 3,095 places to eat in Boston",
      "position": 74,
      "of": 3095,
      "category": "restaurant",
      "geo": "Boston",
      "geo_id": "60745"
    },
    "category": "Restaurant",
    "subcategories": [
      "Sit down"
    ],
    "cuisines": [
      "American",
      "Seafood"
    ],
    "dietary_restrictions": [],
    "tags": [],
    "amenities": [],
    "awards": [],
    "price_range": "$21 - $60",
    "phone": "+1 617-742-3474",
    "website": "https://www.neptuneoyster.com/",
    "hours": {
      "week_ranges": [
        [
          {
            "open_time": 660,
            "close_time": 1290
          }
        ]
      ],
      "timezone": "America/New_York"
    },
    "neighborhoods": [
      "North End"
    ],
    "geo_hierarchy": [
      {
        "name": "Boston",
        "location_id": "60745",
        "level": "City"
      },
      {
        "name": "Massachusetts",
        "location_id": "28942",
        "level": "State"
      }
    ],
    "is_closed": false,
    "photo": {
      "id": "418174987",
      "url": "https://media-cdn.tripadvisor.com/media/photo-o/18/ec/d8/0b/lobster-roll-and-fries.jpg",
      "width": 5016,
      "height": 3344,
      "caption": "Lobster roll and fries"
    },
    "rating_breakdown": {
      "1": 101,
      "2": 68,
      "3": 150,
      "4": 442,
      "5": 1388
    },
    "sub_ratings": {
      "value": 2.89,
      "service": 2.9,
      "food": 4.33,
      "atmosphere": 3.11
    },
    "sub_ratings_basis": {
      "method": "average over the newest reviews that rated them",
      "sample_reviews": 20,
      "reviews_with_sub_ratings": 10
    },
    "photos": [
      {
        "id": "418174987",
        "url": "https://media-cdn.tripadvisor.com/media/photo-o/18/ec/d8/0b/lobster-roll-and-fries.jpg",
        "width": 5016,
        "height": 3344,
        "caption": "Lobster roll and fries"
      },
      {
        "id": "886762059",
        "url": "https://dynamic-media-cdn.tripadvisor.com/media/v2/photo-o/34/da/ea/4b/image.jpg?w=4284&h=5712&s=1",
        "width": 4284,
        "height": 5712,
        "review_id": "1081190873"
      }
    ]
  },
  "warnings": [],
  "meta": {
    "source": "tripadvisor",
    "upstream_requests": 4,
    "elapsed_s": 0.701
  },
  "resolved": {
    "location_id": "535627",
    "input": "https://www.tripadvisor.com/Restaurant_Review-g60745-d535627-Reviews-Neptune_Oyster-Boston_Massachusetts.html",
    "input_kind": "url",
    "geo_id": "60745",
    "type": "restaurant",
    "url": "https://www.tripadvisor.com/Restaurant_Review-g60745-d535627-Reviews-Neptune_Oyster-Boston_Massachusetts.html"
  }
}

Errors

Errors return a JSON body with a detail field. Failed requests are not charged. See Errors for the full list and retry advice.

StatusMeaningRetry?
401Unauthorized

Missing or invalid API key.

{"detail":"missing or invalid API key"}
No, fix the request
402Payment Required

Not enough credits for this request: the account's credits mode is enforce (mode in GET /v1/billing) and the request costs more than the available credits. Nothing is run or charged.

{"detail":"insufficient credits: this request costs 5, 0 available. Credits renew 2026-11-01."}
No, fix the request
404Not Found

The property, stay, job or record was not found.

{"detail":"job not found"}
No, fix the request
422Unprocessable Content

Request validation failed. detail is a list of problems for schema errors, or a string for semantic checks performed by the endpoint.

{"detail":[{"loc":["body","name"],"msg":"Field required","type":"missing"}]}
No, fix the request
429Too Many Requests

Too many requests: the key's requests-per-minute limit was exceeded, or (in enforce credits mode) the plan's concurrent-request limit. No rate-limit or Retry-After headers are sent; back off and retry.

{"detail":"rate limit 60/min exceeded"}
Yes, with backoff
502Bad Gateway

The upstream source failed, blocked the request or returned an unusable answer. Safe to retry later; failed requests are not charged.

{"detail":"RuntimeError"}
Yes, with backoff

Try it

Press Try it above to run this request on your own key, with the values you type (sign in first). For a no-code walkthrough, use the workspace’s guided Try it.

  1. Export your key: export SCRAPERCOMPANY_API_KEY=sk_... (no key yet? start a free trial).
  2. Copy the cURL example above and run it in a terminal.

Credits

2 credits per successful call. Failed, blocked and empty results are free.

Questions about this page?

Send the page link and your question, and the team will answer.

Email support