logo

Localization & Supported Domains

Configure language, country, location, and Google domain for targeted search results

The Google Search API provides multiple localization parameters to control exactly which results you get. You can set the interface language, target country, specific location, and Google domain to see results exactly as your target audience sees them.


Language Parameter (hl)

The hl (Host Language) parameter controls the language of the Google UI (buttons, labels, and interface text). It uses ISO 639-1 language codes.

CodeLanguage
enEnglish (default)
trTurkish
deGerman
frFrench
esSpanish
itItalian
ptPortuguese
jaJapanese
koKorean
zhChinese
arArabic
ruRussian
nlDutch
plPolish
svSwedish

hl sets the search context. Google treats it as a hint, so results may still include other languages. Use lr for strict language filtering.


Country Parameter (gl)

The gl (Geo Location) parameter determines from which country's perspective results are ranked and returned. It uses ISO 3166-1 alpha-2 country codes.

CodeCountry
usUnited States (default)
gbUnited Kingdom
trTurkey
deGermany
frFrance
esSpain
itItaly
caCanada
auAustralia
jpJapan
krSouth Korea
brBrazil
mxMexico
inIndia
nlNetherlands

gl sets the search context. Google treats it as a hint, so results may still include global results. Use cr for strict country filtering.


Location & UULE

For precise geographic targeting beyond country-level, use the location or uule parameter.

location

The location parameter accepts a location name in Google's canonical format. It is automatically encoded to a UULE string internally.

Format: City,State/Region,Country

Examples:

  • Istanbul,Istanbul,Turkey
  • New York,New York,United States
  • London,England,United Kingdom
  • Tokyo,Tokyo,Japan
  • Berlin,Berlin,Germany

uule

The uule parameter accepts a pre-encoded Google UULE location string. This is auto-generated from location when not provided.

If both location and uule are sent, uule takes priority. For most use cases, location is sufficient. Use uule only when you need to pass a pre-encoded value.


hl vs lr / gl vs cr

The Google Search API has two levels of language and country control:

Context (Hint) vs Strict Filter

Context (Hint)Strict Filter
Languagehl=tr: Google UI in Turkish. Results may include other languages.lr=lang_tr: Only Turkish-language pages are returned.
Countrygl=tr: Results from Turkey datacenter. May include global results.cr=countryTR: Only pages originating from Turkey.

When to Use What

  • hl + gl: Best for general localization. You want results relevant to a market but don't mind mixed languages.
  • lr + cr: Best for strict filtering. You need only pages in a specific language or from a specific country.
  • Combine both: Use hl/gl for context and add lr/cr when you need strict filtering on top.

Example: Turkish results from Turkey

/plugin/google/search?token=TOKEN&q=pizza&hl=tr&gl=tr&google_domain=google.com.tr

Example: Strictly Turkish-language pages from Turkey

/plugin/google/search?token=TOKEN&q=pizza&hl=tr&gl=tr&lr=lang_tr&cr=countryTR&google_domain=google.com.tr

Time-Based Filtering

The time_period parameter limits results to a specific recency window:

ValueDescription
last_hourResults from the last hour
last_dayResults from the last 24 hours
last_weekResults from the last 7 days
last_monthResults from the last 30 days
last_yearResults from the last 12 months

Supported Google Domains

The google_domain parameter accepts the following domains. Prefixes (https://, http://, www.) are automatically stripped.

Americas

DomainCountry
google.comUnited States
google.caCanada
google.com.brBrazil
google.com.mxMexico
google.com.arArgentina
google.clChile
google.com.coColombia
google.com.pePeru

Europe

DomainCountry
google.co.ukUnited Kingdom
google.deGermany
google.frFrance
google.esSpain
google.itItaly
google.nlNetherlands
google.beBelgium
google.atAustria
google.chSwitzerland
google.seSweden
google.noNorway
google.dkDenmark
google.fiFinland
google.plPoland
google.ptPortugal
google.com.trTurkey
google.ieIreland
google.com.uaUkraine
google.roRomania
google.grGreece
google.huHungary
google.czCzech Republic
google.skSlovakia
google.bgBulgaria
google.hrCroatia
google.rsSerbia
google.siSlovenia
google.ltLithuania
google.lvLatvia
google.eeEstonia
google.ruRussia

Asia Pacific

DomainCountry
google.co.jpJapan
google.co.krSouth Korea
google.com.auAustralia
google.co.nzNew Zealand
google.co.inIndia
google.co.idIndonesia
google.co.thThailand
google.com.sgSingapore
google.com.myMalaysia
google.com.phPhilippines
google.com.vnVietnam
google.com.twTaiwan
google.com.hkHong Kong
google.com.pkPakistan
google.com.bdBangladesh
google.com.npNepal
google.lkSri Lanka
google.com.mmMyanmar
google.com.khCambodia
google.laLaos

Middle East & Africa

DomainCountry
google.co.zaSouth Africa
google.com.egEgypt
google.com.saSaudi Arabia
google.aeUAE
google.co.ilIsrael
google.com.ngNigeria
google.co.keKenya
google.com.ghGhana
google.com.etEthiopia
google.co.tzTanzania
google.co.ugUganda
google.com.lyLibya
google.dzAlgeria
google.co.maMorocco
google.tnTunisia
google.com.qaQatar
google.com.kwKuwait
google.com.bhBahrain
google.com.omOman
google.joJordan
google.com.lbLebanon
google.iqIraq

Central Asia & Caucasus

DomainCountry
google.azAzerbaijan
google.kzKazakhstan
google.geGeorgia

On this page