# Tripadvisor search: `POST /v1/ota/tripadvisor/search`

Cost: 2 credits (2 (failed requests are free)). Docs: https://scrapercompany.com/docs/reference/tripadvisor-search

**Not available yet.** Tripadvisor name search is not implemented in the current release: this operation always returns `502` with `{"detail": "TripadvisorError"}` (not charged). Take the `locationId` from the hotel's Tripadvisor URL instead — the digits after `-d` in `/Hotel_Review-g{geoId}-d{locationId}-...` — and pass it to `POST /v1/ota/tripadvisor`. The 200 example below shows the planned response shape.

Resolve a hotel, restaurant or attraction name to Tripadvisor's
locationId.

`types` picks the kinds of place (hotels by
default; any of `hotel`, `restaurant`, `attraction`) and every match
carries its `type` and `geo_id`. Add `city` to rank same-name places
elsewhere lower, then store `recommended_match.location_id` for
`/v1/ota/tripadvisor/reviews` (any type) or `POST /v1/ota/tripadvisor`
(hotels). It is null when only weak or ambiguous candidates were found.

Request body (JSON):

- `name` (string; required; min length 1): Place name as a visitor would search for it (`query` is accepted as an alias).
- `city` (string; optional; default ): Strongly recommended. Sent with the name to Tripadvisor's search and used to rank same-name places in other cities lower.
- `limit` (integer; optional; default 5; min 1, max 10): Maximum candidates to return, best match first.
- `types` (array of string; optional; min items 1, max items 3): Kinds of place to search: any of `hotel`, `restaurant`, `attraction` (default hotels only).

Base URL: `https://api.scrapercompany.com`. Auth: send your key in the `x-api-key` header. A failed request (4xx or 5xx) or an empty result costs 0 credits.

- [Full API reference as one Markdown file](https://scrapercompany.com/llms-full.txt)
- [OpenAPI spec](https://scrapercompany.com/openapi.json)
