100 free credits. No credit card required. Get a key

Tripadvisor place suggestions API

Tripadvisor place suggestions for a partial name: ids, types and links.

GET /v1/tripadvisor/autocompleteBeta1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/tripadvisor/autocomplete?q=pari",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"query": "pari",
"results": [
{
"locationId": 187147,
"name": "Paris",
"placeType": "CITY",
"isGeo": true,
"geoName": "Paris",
"url": "/Tourism-g187147-Paris_Ile_de_France-Vacations.html"
},
{
"locationId": 7171724,
"name": "Parfait Paris",
"placeType": "EATERY",
"isGeo": false,
"geoName": "San Diego",
"url": "/Restaurant_Review-g60750-d7171724-Reviews-Parfait_Paris-San_Diego_California.html"
},
"… 8 more"
]
}

Parameters

NameTypeDescription
qquery · requiredstringThe partial name. Example: pari.
languagequerystringLanguage for names and reviews: en, fr, de-DE, … (default en-US).
limitquerynumberSuggestions, 1-20 (default 10).
Response fields

200 with a TripadvisorAutocompleteResponse, in Tripadvisor’s own JSON.

FieldTypeDescription
querystring
resultsTripadvisorSuggestion[]
Status codes
StatusMeaning
200The suggestions.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No Tripadvisor place or destination like that.
429Too many requests. Wait for Retry-After seconds.
503Tripadvisor is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Tripadvisor is a trademark of its owner. We are not affiliated with or endorsed by it.