# Localization

> Search Google as a user in a specific country, language and city with country, language, location, uule and ll. Code tables for common countries and languages.

Google's results depend heavily on where the searcher is and which language they use. SerpKite exposes the same levers Google uses, with plain names.

| Parameter | Controls | Example |
| --- | --- | --- |
| `country` | Country the search runs from | `de` |
| `language` | Interface language | `de` |
| `location` | City or region, as free text | `"Munich, Bavaria, Germany"` |
| `uule` | A pre-encoded Google location | `w+CAIQICI...` |
| `ll` | A map point to search around ([/v1/maps](https://serpkite.com/docs/endpoints/maps) and [/v1/places](https://serpkite.com/docs/endpoints/places)) | `"@48.137,11.575,14z"` |

Defaults are `country: "us"` and `language: "en"`. The normalised values come back in `request.country` and `request.language` on every response. Without `location`, results are country-level, and queries with local intent can vary between requests: send `location` when the place matters, even if it's only the country (`"Poland"`). `location` and `uule` need an engine that can apply them (Google, Brave, Yandex web search and Yandex Maps): others are skipped, or return `400` when you name one. Among the AI assistants, [`/v1/ai_mode` and `/v1/brave_ai`](https://serpkite.com/docs/ai-assistants) take `location` too, and so does [`/v1/research`](https://serpkite.com/docs/endpoints/research) for its searches.

## Country and language

`country` is a two-letter ISO 3166-1 alpha-2 country code (case-insensitive; `uk` is accepted and comes back as `gb`). `language` is a language code (`en`, `de`, `fil`) or a language plus region (`pt-BR`, `zh-TW`, `es-419`); it is normalised to lower case (`pt-br`). They are independent: `country: "ch"` with `language: "fr"` is a French-speaking user in Switzerland.

cURL:

```bash
curl https://api.serpkite.com/v1/search \
  -H "Authorization: Bearer $SERPKITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"beste Kaffeemühle","country":"de","language":"de"}'
```

TypeScript:

```ts
import { SerpKite } from "serpkite";

const sk = new SerpKite(); // reads SERPKITE_API_KEY
const res = await sk.search({ q: "beste Kaffeemühle", country: "de", language: "de" });
console.log(res.results[0].title, res.meta.credits_used);
```

Python:

```python
from serpkite import SerpKite

sk = SerpKite()  # reads SERPKITE_API_KEY
res = sk.search("beste Kaffeemühle", country="de", language="de")
print(res.results[0].title, res.meta.credits_used)
```

Go:

```go
package main

import (
	"context"
	"fmt"
	"log"

	serpkite "github.com/serpkite/serpkite-go"
)

func main() {
	ctx := context.Background()
	c := serpkite.NewClient() // reads SERPKITE_API_KEY
	res, err := c.Search(ctx, serpkite.SearchParams{Q: "beste Kaffeemühle", Country: "de", Language: "de"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Results[0].Title, res.Meta.CreditsUsed)
}
```

Set both to match your target market. Mixing them (German query, `country: "us"`) is valid but returns what an American user searching in German sees, which is rarely what you want for rank tracking.

Russia is `country: "ru"` and Russian is `language: "ru"`. Both are available for every search vertical, including Maps, Place details, Scholar, Patents and Reviews. Country and language localize Google results; Russian-language searches with another `country` keep that country's localization.

cURL:

```bash
curl https://api.serpkite.com/v1/search \
  -H "Authorization: Bearer $SERPKITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"погода Москва","country":"ru","language":"ru"}'
```

TypeScript:

```ts
import { SerpKite } from "serpkite";

const sk = new SerpKite(); // reads SERPKITE_API_KEY
const res = await sk.search({ q: "погода Москва", country: "ru", language: "ru" });
console.log(res.results[0].title, res.meta.credits_used);
```

Python:

```python
from serpkite import SerpKite

sk = SerpKite()  # reads SERPKITE_API_KEY
res = sk.search("погода Москва", country="ru", language="ru")
print(res.results[0].title, res.meta.credits_used)
```

Go:

```go
package main

import (
	"context"
	"fmt"
	"log"

	serpkite "github.com/serpkite/serpkite-go"
)

func main() {
	ctx := context.Background()
	c := serpkite.NewClient() // reads SERPKITE_API_KEY
	res, err := c.Search(ctx, serpkite.SearchParams{Q: "погода Москва", Country: "ru", Language: "ru"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Results[0].Title, res.Meta.CreditsUsed)
}
```

Locations ending in `Russia`, `Russian Federation` or `Россия` also select `ru` when `country` is omitted. `country: "ru"` is also accepted for webpage fetching, and search `include_content` passes the search country when fetching result pages.

For Patents, a non-English `language` selects the publication language. For example, `language: "ru"` restricts results to Russian-language patents. Supported codes are `ar`, `zh`, `da`, `nl`, `en`, `fi`, `fr`, `de`, `it`, `ja`, `ko`, `no`, `pt`, `ru`, `es` and `sv` (region variants use their base language).

With `engine: "yahoo"`, `language` picks Yahoo's site for `de`, `fr`, `es`, `it` and `pt` when `country` has no regional site of its own. Other languages need such a country and otherwise return `400`, because Yahoo ignores its language filter.

Invalid codes return `400 invalid_request` ("country must be a country code", "language must be a language code") and are not billed.

## Places in other languages

[/v1/maps](https://serpkite.com/docs/endpoints/maps), [/v1/places](https://serpkite.com/docs/endpoints/places) and [/v1/place](https://serpkite.com/docs/endpoints/place) return the address, categories (`type`, `types`), hours text and description in `language`. `opening_hours` keeps English weekday keys with the text in that language; `weekly_hours` (24-hour `HH:MM` intervals), `country` and `timezone` are the same in every language. A Moscow café with `language: "ru"`:

cURL:

```bash
curl https://api.serpkite.com/v1/maps \
  -H "Authorization: Bearer $SERPKITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"кофемания никитская","country":"ru","language":"ru","location":"Moscow, Russia"}'
```

TypeScript:

```ts
import { SerpKite } from "serpkite";

const sk = new SerpKite(); // reads SERPKITE_API_KEY
const res = await sk.maps({ q: "кофемания никитская", country: "ru", language: "ru", location: "Moscow, Russia" });
console.log(res.results[0].title, res.meta.credits_used);
```

Python:

```python
from serpkite import SerpKite

sk = SerpKite()  # reads SERPKITE_API_KEY
res = sk.maps("кофемания никитская", country="ru", language="ru", location="Moscow, Russia")
print(res.results[0].title, res.meta.credits_used)
```

Go:

```go
package main

import (
	"context"
	"fmt"
	"log"

	serpkite "github.com/serpkite/serpkite-go"
)

func main() {
	ctx := context.Background()
	c := serpkite.NewClient() // reads SERPKITE_API_KEY
	res, err := c.Maps(ctx, serpkite.SearchParams{Q: "кофемания никитская", Country: "ru", Language: "ru", Location: "Moscow, Russia"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Results[0].Title, res.Meta.CreditsUsed)
}
```

```json
{
  "title": "Кофемания",
  "address": "Большая Никитская ул., 13, Москва, 125009",
  "type": "Ресторан",
  "country": "RU",
  "timezone": "Europe/Moscow",
  "opening_hours": { "Monday": "24 часа в сутки" },
  "weekly_hours": { "monday": [{ "open": "00:00", "close": "24:00" }] }
}
```

## City-level location

`location` is a free-text place name up to 256 characters. Use the canonical form "City, Region, Country", e.g. `"Austin, Texas, United States"`. It matters most for queries with local intent ("dentist", "coffee near me"), for [/v1/maps](https://serpkite.com/docs/endpoints/maps), [/v1/places](https://serpkite.com/docs/endpoints/places) and [/v1/shopping](https://serpkite.com/docs/endpoints/shopping), and for local packs inside [/v1/search](https://serpkite.com/docs/endpoints/search).

cURL:

```bash
curl https://api.serpkite.com/v1/places \
  -H "Authorization: Bearer $SERPKITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"dentist","location":"Austin, Texas, United States","country":"us"}'
```

TypeScript:

```ts
import { SerpKite } from "serpkite";

const sk = new SerpKite(); // reads SERPKITE_API_KEY
const res = await sk.places({ q: "dentist", location: "Austin, Texas, United States", country: "us" });
console.log(res.results[0].title, res.meta.credits_used);
```

Python:

```python
from serpkite import SerpKite

sk = SerpKite()  # reads SERPKITE_API_KEY
res = sk.places("dentist", location="Austin, Texas, United States", country="us")
print(res.results[0].title, res.meta.credits_used)
```

Go:

```go
package main

import (
	"context"
	"fmt"
	"log"

	serpkite "github.com/serpkite/serpkite-go"
)

func main() {
	ctx := context.Background()
	c := serpkite.NewClient() // reads SERPKITE_API_KEY
	res, err := c.Places(ctx, serpkite.SearchParams{Q: "dentist", Location: "Austin, Texas, United States", Country: "us"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Results[0].Title, res.Meta.CreditsUsed)
}
```

When you don't send `country` and `location` ends in a country name ("Munich, Bavaria, Germany"), `country` is set from it (`de`), so the search runs from that country. A `country` you send always wins. Region codes are never read as countries: "Los Angeles, CA" stays `us`, not Canada.

## uule

`uule` is Google's own encoded location string. If you already store locations in that form (many rank trackers do), pass it directly; it overrides `ll` and `location`. A value copied out of a Google URL may stay percent-encoded (`w%2BCAIQ…`). Maximum length is 512 characters. Most users should use `location` and let SerpKite handle the encoding.

## Map point (ll)

On [/v1/maps](https://serpkite.com/docs/endpoints/maps) and [/v1/places](https://serpkite.com/docs/endpoints/places), `ll` searches the map at an exact point and zoom: `@latitude,longitude,zoomz` (the `@` and the zoom are optional; latitude −90…90, longitude −180…180, zoom 1–21, default 14z). The search covers the map around that point wherever the request comes from, so `ll` overrides `location`. Other endpoints reject `ll` with a 400; use `location` there.

On maps and places, `location` searches the named place: without `ll`, Google is asked for "`q` in `location`" (the response still echoes your `q` and `location`), so a city ("Berlin, Germany") or a district ("Kreuzberg, Berlin") both work. A `uule` alone doesn't move the map; send `location` or `ll`. With neither, Google picks the area from the query (an exact name or address, or "coffee in Berlin", works) or from where the request comes from, so local queries such as "coffee" need one of them.

cURL:

```bash
curl https://api.serpkite.com/v1/maps \
  -H "Authorization: Bearer $SERPKITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"coffee roasters","ll":"@52.52,13.405,14z"}'
```

TypeScript:

```ts
import { SerpKite } from "serpkite";

const sk = new SerpKite(); // reads SERPKITE_API_KEY
const res = await sk.maps({ q: "coffee roasters", ll: "@52.52,13.405,14z" });
console.log(res.results[0].title, res.meta.credits_used);
```

Python:

```python
from serpkite import SerpKite

sk = SerpKite()  # reads SERPKITE_API_KEY
res = sk.maps("coffee roasters", ll="@52.52,13.405,14z")
print(res.results[0].title, res.meta.credits_used)
```

Go:

```go
package main

import (
	"context"
	"fmt"
	"log"

	serpkite "github.com/serpkite/serpkite-go"
)

func main() {
	ctx := context.Background()
	c := serpkite.NewClient() // reads SERPKITE_API_KEY
	res, err := c.Maps(ctx, serpkite.SearchParams{Q: "coffee roasters", LL: "@52.52,13.405,14z"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Results[0].Title, res.Meta.CreditsUsed)
}
```

## Country codes

Common values of `country`. Any valid ISO 3166-1 alpha-2 code works, not only the ones listed.

| `country` | Country |
| --- | --- |
| `us` | United States |
| `gb` | United Kingdom |
| `ca` | Canada |
| `au` | Australia |
| `in` | India |
| `de` | Germany |
| `fr` | France |
| `es` | Spain |
| `it` | Italy |
| `nl` | Netherlands |
| `be` | Belgium |
| `ch` | Switzerland |
| `at` | Austria |
| `se` | Sweden |
| `no` | Norway |
| `dk` | Denmark |
| `fi` | Finland |
| `pl` | Poland |
| `ru` | Russia |
| `cz` | Czechia |
| `pt` | Portugal |
| `ie` | Ireland |
| `br` | Brazil |
| `mx` | Mexico |
| `ar` | Argentina |
| `co` | Colombia |
| `cl` | Chile |
| `jp` | Japan |
| `kr` | South Korea |
| `sg` | Singapore |
| `id` | Indonesia |
| `my` | Malaysia |
| `ph` | Philippines |
| `th` | Thailand |
| `vn` | Vietnam |
| `tr` | Türkiye |
| `ae` | United Arab Emirates |
| `sa` | Saudi Arabia |
| `za` | South Africa |
| `ng` | Nigeria |
| `nz` | New Zealand |

## Language codes

Common values of `language`. Other language codes Google supports work too.

| `language` | Language |
| --- | --- |
| `en` | English |
| `de` | German |
| `fr` | French |
| `es` | Spanish |
| `it` | Italian |
| `pt` | Portuguese |
| `pt-BR` | Portuguese (Brazil) |
| `nl` | Dutch |
| `sv` | Swedish |
| `da` | Danish |
| `no` | Norwegian |
| `fi` | Finnish |
| `pl` | Polish |
| `ru` | Russian |
| `cs` | Czech |
| `tr` | Turkish |
| `ja` | Japanese |
| `ko` | Korean |
| `zh-CN` | Chinese (Simplified) |
| `zh-TW` | Chinese (Traditional) |
| `hi` | Hindi |
| `id` | Indonesian |
| `th` | Thai |
| `vi` | Vietnamese |
| `ar` | Arabic |

## Tips

- For rank tracking, fix `country`, `language`, `location` and `device` per keyword and never change them between runs, or positions stop being comparable. See [Rank tracking](https://serpkite.com/docs/guides/rank-tracking).
- Mobile and desktop layouts differ; set `device: "mobile"` if your users are on phones. See [Common parameters](https://serpkite.com/docs/parameters).
- A parameter an endpoint can't apply is a `400`, never ignored: `ll` outside maps and places, `time` on scholar, maps or places, `location` on patents.
- Localized results are cached per location, so [`max_age`](https://serpkite.com/docs/caching) hits only when all of these parameters match.