Tripadvisor.com is a popular travel platform that officially operates in 40 countries and supports 20 languages. To support these localization efforts, Tripadvisor uses country-specific TLDs and subdomains.
In the Tripadvisor Reviews endpoints of Business Data API, you can find several parameters that will help you manage the localization in Tripadvisor and get reviews in a language you need:
location_code
andlocation_name
define a location and thus the choice of a certain Tripadvisor subdomain;language_code
andlanguage_name
indicates a preferred language of Tripadvisor reviews;url_path
can include a specific domain name and thus version of a Tripadvisor website;translate_reviews
is a special parameter that will translate reviews according to the sybdomain specified in theurl_path
Below is the list of Tripadvisor domains and subdomains that are supported in the Tripadvisor Reviews endpoints with the respective country codes:
GB - www.tripadvisor.co.uk
CA - www.tripadvisor.ca
fr.tripadvisor.ca (only if specified in url_path
)
IT - www.tripadvisor.it
ES - www.tripadvisor.es
DE - www.tripadvisor.de
FR - www.tripadvisor.fr
JP - www.tripadvisor.jp
CN - cn.tripadvisor.com
IN - www.tripadvisor.in
SE - www.tripadvisor.se
NL - www.tripadvisor.nl
BR - www.tripadvisor.com.br
TR - www.tripadvisor.com.tr
DK - www.tripadvisor.dk
MX - www.tripadvisor.com.mx
IE - www.tripadvisor.ie
ar.tripadvisor.com (only if specified in url_path
)
EG - www.tripadvisor.com.eg
AT - www.tripadvisor.at
GR - www.tripadvisor.com.gr
AU - www.tripadvisor.com.au
MY - www.tripadvisor.com.my
NZ - www.tripadvisor.co.nz
PH - www.tripadvisor.com.ph
SG - www.tripadvisor.com.sg
ZA - www.tripadvisor.co.za
AR - www.tripadvisor.com.ar
CL - www.tripadvisor.cl
CO - www.tripadvisor.co
PE - www.tripadvisor.com.pe
VE - www.tripadvisor.com.ve
ID - www.tripadvisor.co.id
IL - www.tripadvisor.co.il
KR - www.tripadvisor.co.kr
NO - no.tripadvisor.com
PT - www.tripadvisor.pt
TH - th.tripadvisor.com
VN - www.tripadvisor.com.vn
TW - www.tripadvisor.com.tw
CH - www.tripadvisor.ch
fr.tripadvisor.ch (only if specified in url_path
)
it.tripadvisor.ch (only if specified in url_path
)
BE - www.tripadvisor.be
fr.tripadvisor.be (only if specified in url_path
)
HK - www.tripadvisor.com.hk
en.tripadvisor.com.hk (only if specified in url_path
)
Please not that if the domain you specified is not listed in the list provided above, reviews will be returned for the tripadvisor.com
Let’s consider a few examples to illustrate how to get Tripadvisor reviews in a required language using different parameters in the request.
Domain in URL path and undefined language
If the url_path
contains a domain with a .it
TTL and unspecified language, for example:
"url_path":"https:\/\/www.tripadvisor.it\/Hotel_Review-g1087254-d1151902-Reviews-Gitavillage_Argentario-Albinia_Orbetello_Province_of_Grosseto_Tuscany.html",
"language_code":"all"
In this case the reviews will be obtained from the www.tripadvisor.it
in the Italian language.
On the other hand, if the domain’s TTL is a standard .com
, but the url_path
points at the Italian establishment, some reviews will be translated to English because Tripadvisor should translate them automatically.
"url_path":"https:\/\/www.tripadvisor.com\/Hotel_Review-g1087254-d1151902-Reviews-Gitavillage_Argentario-Albinia_Orbetello_Province_of_Grosseto_Tuscany.html",
"language_code":"all"
Location, keyword, and undefined language
You can use the location_code
to 1008059
(Italy) and pass the identifier of the establishment in the keyword
field:
"location_code":"1008059",
"keyword": "Hotel_Review-g1087254-d1151902-Reviews-Gitavillage_Argentario-Albinia_Orbetello_Province_of_Grosseto_Tuscany",
"language_code":"all"
The reviews will be returned in Italian language from the www.tripadvisor.it
domain.
Translate reviews parameter
By default, the translate_reviews
parameter is set to true
, so reviews will be translated according to the domain specified in the url_path
parameter.
For example, if the url_path
contains a .com
TTL, reviews will be translated to English.
"url_path":"https:\/\/www.tripadvisor.com\/Hotel_Review-g1087254-d1151902-Reviews-Gitavillage_Argentario-Albinia_Orbetello_Province_of_Grosseto_Tuscany.html",
"language_code":"all"
However, if you set the translate_reviews
to false
, reviews will not be translated no matter what you specify in the location, language and url_path fields.
"url_path":"https:\/\/www.tripadvisor.com\/Hotel_Review-g1087254-d1151902-Reviews-Gitavillage_Argentario-Albinia_Orbetello_Province_of_Grosseto_Tuscany.html",
"language_code":"all",
"translate_reviews": false