# Yandex Search API

### Basic Information

**Interface Description:** Retrieve real-time search data from Yandex via API.

**Interface URL:** <https://scraperapi.thordata.com/request>

**Request Method:** <mark style="color:green;">POST</mark>

### Request parameters

**Headers：**

<table><thead><tr><th width="129.727294921875">Parameter name</th><th width="129.6363525390625">Type</th><th width="130.3636474609375">Required</th><th width="358.272705078125">Describe</th></tr></thead><tbody><tr><td><code>token</code></td><td>string</td><td>Yes</td><td>Please log in to the <a href="https://dashboard.thordata.com/account-settings">Dashboard-account-settings</a> to view your <code>token</code></td></tr></tbody></table>

**Body：**

<table><thead><tr><th width="130">Parameter</th><th width="130">Type</th><th width="130">Required</th><th width="359.555419921875">Description</th></tr></thead><tbody><tr><td><code>text</code></td><td>string</td><td>Yes</td><td>Defines the search query for scraping (default: q=pizza).<br>For a list of possible values, see <a href="https://yandex.com/dev/xml/doc/dg/concepts/request.html">Query Parameter</a></td></tr><tr><td><code>json</code></td><td>string</td><td>No</td><td>This parameter defines the output format of the crawl results. <br><code>json=1</code> for JSON, <br><code>json=2</code> for both,<br><code>json=3</code> for HTML.</td></tr><tr><td><code>url</code></td><td>string</td><td>Yes</td><td>Domain for scraping (default <code>yandex.com</code>)</td></tr><tr><td><code>lang</code></td><td>string</td><td>No</td><td>This parameter defines the language of the search results.For a list of possible values, see <a href="https://yandex.com/dev/xml/doc/dg/concepts/request-lang.html">lang parameter</a></td></tr><tr><td><code>lr</code></td><td>string</td><td>No</td><td>This parameter defines the language of the search result.For a list of possible values, see  <a href="https://yandex.com/dev/xml/doc/dg/concepts/request-lr.html">lr parameter</a></td></tr><tr><td><code>rstr</code></td><td>string</td><td>No</td><td>Double filtering - enforces results to match either the specified region (<code>lr</code>) or enables SafeSearch (e.g., <code>rstr=family</code> blocks adult content).<br>For a list of possible values, see <a href="https://yandex.com/dev/xml/doc/dg/concepts/request-safe-search.html">family parameter</a></td></tr><tr><td><code>p</code></td><td>string</td><td>No</td><td>Pagination control (starts from p=0), must be used with the results-per-page parameter.For a list of possible values, see <a href="https://yandex.com/dev/xml/doc/dg/concepts/request-page.html">page parameter</a>.</td></tr><tr><td><code>within</code></td><td>string</td><td>No</td><td><p>Time range to search.</p><p>Available values are:<br><code>77</code> - Past 24 hours<br><code>1</code> - Past 2 weeks<br><code>[%pm]</code> - Past month.<br>For a list of possible values, see <a href="https://yandex.com/dev/xml/doc/dg/concepts/request-filters.html">site/date parameters</a></p></td></tr></tbody></table>

### Response example

```json
    {
    "spider_parameter": {
        "engine": "Yandex",
        "text": "pizza"
    }
    "search_metadata": {
        "created_at": "2025-06-21 14:08:06",
        "id": "xxx",
        "url": "https://yandex.com/search?text=pizza"
    },
    "result":{}
```

<table><thead><tr><th width="170.33331298828125">Parameter Name</th><th width="129.77783203125">Type</th><th width="130.7777099609375">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>spider_parameter</code></td><td>object</td><td>yes</td><td>Search engine parameters configuration</td></tr><tr><td>   <code>engine</code></td><td>string</td><td>yes</td><td>Search engine type </td></tr><tr><td>   <code>text</code></td><td>string</td><td>yes</td><td>Search keyword</td></tr><tr><td><code>search_metadata</code></td><td>object</td><td>yes</td><td>Metadata of the search</td></tr><tr><td>   <code>created_at</code></td><td>string</td><td>yes</td><td>Timestamp of the search </td></tr><tr><td>   <code>id</code></td><td>string</td><td>yes</td><td>Unique task ID</td></tr><tr><td>   <code>url</code></td><td>string</td><td>yes</td><td>Full URL of the search request</td></tr><tr><td><code>result</code></td><td>string</td><td>yes</td><td>Return Result</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.thordata.com/interface-documentation/serp-api/yandex-search-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
