TripAdvisor

Autocomplete TripAdvisor locations and places

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.

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

Query parameters

qstring required

Autocomplete query

limitinteger

Maximum results

localestring

TripAdvisor locale

scope_geo_idinteger

Optional scoped geo id

typestring

Optional result type hint

search_session_idstring

Optional captured search session id

typeahead_idstring

Optional captured typeahead id

route_uidstring

Optional captured route uid

Headers

x-api-keystring required

API key required

Response

OK

codeinteger
msgstring

Example response

{
  "code": 200,
  "data": {
    "locale": "en-HK",
    "query": "hong kong",
    "results": [
      {
        "document_id": "loc;294217;g294217",
        "id": "294217",
        "latitude": 22.28331,
        "longitude": 114.15874,
        "nested_results": [
          {
            "query": "hong kong hotels",
            "title": "Hotels",
            "type": "hotel_search",
            "url": "https://en.tripadvisor.com.hk/Hotels-g294217-Hong_Kong-Hotels.html"
          }
        ],
        "parent": "China, Asia",
        "title": "Hong Kong",
        "type": "geo",
        "url": "https://en.tripadvisor.com.hk/Tourism-g294217-Hong_Kong-Vacations.html"
      }
    ],
    "scope_geo_id": 60763
  },
  "msg": "OK"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.