---
title: "Autocomplete TripAdvisor locations and places"
method: GET
path: "/tripadvisor/autocomplete"
tags: ["TripAdvisor"]
---

# Autocomplete TripAdvisor locations and places

`GET /tripadvisor/autocomplete`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/tripadvisor/autocomplete`
- Auth: API key in header `x-api-key`

Returns TripAdvisor typeahead suggestions for the required query `q`, optionally narrowed by `limit`, `locale`, `scope_geo_id` and a `type` hint. Each result has its id, title, type, URL, image, parent location and coordinates, and may carry nested search shortcuts. Results can be locations, hotels, restaurants or attractions.

## Query parameters

- `q` string, required
- `limit` integer
- `locale` string
- `scope_geo_id` integer
- `type` string
- `search_session_id` string
- `typeahead_id` string
- `route_uid` string

## Headers

- `x-api-key` string, required

## Response `200`

OK

- TripadvisorTripadvisorAutocompleteResponseDoc
  - `code` integer
  - `data` TripadvisorAutocompleteResponse
    - `locale` string: Locale code the suggestions were returned in, for example `en-HK`.
    - `query` string: Search text that was run.
    - `results` TripadvisorSearchItem[]: Suggested locations and places for the search text, one entry per suggestion.
      - `document_id` string: TripAdvisor document id of the suggestion, for example `loc;294217;g294217`.
      - `id` string: TripAdvisor id of the suggested place or location.
      - `image` string: URL of an image for the suggestion.
      - `latitude` number: Latitude of the suggestion in decimal degrees.
      - `longitude` number: Longitude of the suggestion in decimal degrees.
      - `nested_results` TripadvisorNestedSearchItem[]: Search shortcuts TripAdvisor offers under the suggestion, such as hotels or things to do in that location.
        - `query` string: Search text the shortcut runs, for example `hong kong hotels`.
        - `title` string: Label of the shortcut, for example `Hotels`.
        - `type` string: Kind of search the shortcut opens, for example `hotel_search`.
        - `url` string: TripAdvisor page URL of the shortcut.
      - `parent` string: Parent locations of the suggestion, for example `China, Asia`.
      - `title` string: Name of the suggested place or location.
      - `type` string: Kind of suggestion, for example `geo` for a destination.
      - `url` string: TripAdvisor page URL of the suggestion.
    - `scope_geo_id` integer: TripAdvisor geo id the suggestions were limited to. Defaults to `60763` when no scope is given.
  - `msg` string

## Other responses

- `400`: Bad Request
- `429`: Too Many Requests
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/0497899e2016?raw)
