# Yandex Search API

> Get Yandex web results for a query with organic results and pagination, localized by Yandex domain, region and language.

Source: https://www.sandbase.ai/apis/yandex/search
API reference: https://www.sandbase.ai/apis/yandex/search#api

## Facts

- Provider: Yandex
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/yandex/search`
- Price: $0.01 per call
- Capabilities: api, yandex, web search, serp
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/yandex/search` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `text` | string | yes |  |
| `yandex_domain` | string | no |  |
| `lang` | string | no |  |
| `lr` | string | no |  |
| `family_mode` | string | no |  |
| `fix_typo` | string | no |  |
| `groups_on_page` | string | no |  |
| `sort_mode` | string | no |  |
| `period` | string | no |  |
| `p` | string | no |  |
| `json_restrictor` | string | no |  |

## FAQ

### How do I use the Yandex Search API?

Send a POST request to https://api.sandbase.ai/v1/api/yandex/search with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Yandex Search API cost?

$0.01 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

### What parameters does the Yandex Search API accept?

Required: text (string). Optional: yandex_domain (string), lang (string), lr (string), family_mode (string), fix_typo (string) and groups_on_page (string) and 4 more. The Parameters table and the Playground on this page list every field.

### What does the Yandex Search API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a Yandex developer account or API key?

No. Yandex Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Yandex API access separately.

## README

### Yandex Search

Get Yandex web results for a query with organic results and pagination, localized by Yandex domain, region and language.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/yandex/search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "best coffee grinder"}'
```

The result is returned in `outputs[0].data` as structured JSON.

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `text` | string | Yes | Parameter defines the search query. You can use anything that you would use in a regular Yandex search. It can be 400 characters at maximum. Yandex usually accepts first 40 words of the query. |
| `yandex_domain` | string | No | Parameter defines the Yandex domain to use. It defaults to `yandex.com`. Head to the Yandex domains for a full list of supported Yandex domains. A default&nbsp;`lr` is used for each&nbsp;`yandex_domain`. Example: `84`(US) for `yandex.com` A |
| `lang` | string | No | Parameter defines the language to use for the Yandex search. Head to the Yandex languages for a full list of supported Yandex languages. It defaults to `en` when `yandex_domain` is `yandex.com`. |
| `lr` | string | No | Parameter defines country or region ID to limit the search results to. Head to the Yandex locations for a full list of supported Yandex locations. If parameter is not set - the matching location of selected `yandex_domain` is used, e.g. `84 |
| `family_mode` | string | No | Parameter enables or disables Family Mode (safe search). It can be set to: - Off(`0`) - Moderate(`1`) - Strict(`2`). It defaults to Moderate(`1`). |
| `fix_typo` | string | No | Parameter enables or disables automatic spelling correction. It can be set to: `true` - `false`. It defaults to `true`. |
| `groups_on_page` | string | No | Parameter defines the maximum number of groups displayed on a single results page. It defaults to `20`. |
| `sort_mode` | string | No | Parameter defines the sorting mode of search results. It can be set to: `relevance` - by relevance (default) `date` - by date. |
| `period` | string | No | Parameter defines the time period for search results. It can be set to: `all` - all time (Default) `day` - last day `last_two_weeks` - last two weeks `month` - last month |
| `p` | string | No | Parameter defines page number. Pagination starts from 0. |
| `json_restrictor` | string | No | Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |

#### Pricing

$0.010 per successful call. Failed calls are not charged.
