API 文档提供英文版本。

Tripadvisor Search

Search Tripadvisor hotels, restaurants and attractions.

GET/api/v1/tripadvisor/search

Costs 1 credit per request; failed requests are refunded. Authentication, the search_metadata envelope and error codes are the same as for every endpoint (see the API reference). Try it in the playground.

Parameters

Place search

Search Tripadvisor places.

ParameterTypeDescription
qrequiredstringRequired search text, up to 500 characters.
tripadvisor_domainstringSupported localized Tripadvisor hostname.Default: www.tripadvisor.com.
localestringLanguage or language-COUNTRY code.Default: en-US.
geo_idintegerOptional positive Tripadvisor geography identifier.
latconditionalnumberOptional search-center latitude; requires lon.
lonconditionalnumberOptional search-center longitude; requires lat.
place_type"all" | "accommodation" | "attraction" | "attraction_product" | "eatery" | "geo"Result entity type.Default: all.
startintegerResult offset from 0 through 10,000.Default: 0.
numintegerResult count from 1 through 30.Default: 30.

Response

A JSON object with search_metadata (request id, credits used and remaining) and the result data: search_results. Groups and fields depend on the content of each page, so treat every field as optional.

Examples

cURL
curl "https://serpfast.com/api/v1/tripadvisor/search?q=coffee+Austin+Texas" \
  -H "Authorization: Bearer $SERPFAST_KEY"
Node.js 18+
const params = new URLSearchParams({
  "q": "coffee Austin Texas"
});
const res = await fetch(`https://serpfast.com/api/v1/tripadvisor/search?${params}`, {
  headers: { Authorization: `Bearer ${process.env.SERPFAST_KEY}` },
});
const data = await res.json();
console.log(data);
Python
import os, requests

params = {
  "q": "coffee Austin Texas"
}
res = requests.get(
    "https://serpfast.com/api/v1/tripadvisor/search",
    params=params,
    headers={"Authorization": f"Bearer {os.environ['SERPFAST_KEY']}"},
    timeout=120,
)
print(res.json())