> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinyfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search in a Specific Country and Language

> Get search results localized to a country and language by setting location and language

> [!NOTE]
>
> **Capability:**`location` + `language`

Use this when the same query should return results from a specific market, such as French restaurants ranked for France.

![Search Playground with Location set to FR and Language set to fr, searching for meilleurs restaurants and returning French results](https://mintcdn.com/tinyfish/3y3w8j-_0LWUJKtn/images/tinysearch-howto/country-language.gif?s=fb7bf166053b25135303abdf1ce1aaa3)

```python Python theme={null}
from tinyfish import TinyFish

client = TinyFish()
response = client.search.query(query="meilleurs restaurants", language="fr")

for r in response.results:
    print(f"{r.position}. {r.title} ({r.site_name})")
```

```typescript TypeScript theme={null}
import { TinyFish } from "@tiny-fish/sdk";

const client = new TinyFish();
const response = await client.search.query({
  query: "meilleurs restaurants",
  language: "fr",
});

for (const r of response.results) {
  console.log(`${r.position}. ${r.title} (${r.site_name})`);
}
```

```bash cURL theme={null}
curl -G "https://api.search.tinyfish.ai" \
  --data-urlencode "query=meilleurs restaurants" \
  --data-urlencode "language=fr" \
  -H "X-API-Key: $TINYFISH_API_KEY"
```

Set `location` as well when you want a specific country regardless of language, for example `location="CA"` with `language="fr"`.

## Common Mistakes

> [accordion] Setting only one of the two
>
> When only `language` is set, `location` resolves to the usual pairing (`fr` becomes `FR`). When both are omitted, `location` defaults to `US`. Set both if you need a specific combination.

> [accordion] Mixing up the two codes
>
> `language` takes a language code such as `fr`, and `location` takes a country code such as `FR`.

## Related

> [card] [Find Only Recent Results](https://docs.tinyfish.ai/tinysearch/how-to/recent-results.md)
>
> Narrow results to the last few minutes, hours, or days

> [card] [TinySearch API Reference](https://docs.tinyfish.ai/tinysearch/reference)
>
> Every parameter, accepted value, and error code


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.