# Yandex (Яндекс) Search Results Parser (`muhammadafzal/yandex-search-parser`) Actor

Parse public Yandex search results for SEO and market research. Query by keyword or URL and export titles, URLs, snippets, domains, ads, pagination, region, and language metadata.

- **URL**: https://apify.com/muhammadafzal/yandex-search-parser.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 yandex results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Yandex (Яндекс) Search Results Parser

Parse public Yandex (Яндекс) search results into one flat JSON record per result. Use it for SEO research, SERP analysis, rank investigations, competitor discovery, and market research. The Actor accepts keyword queries or existing public `yandex.com`, `yandex.ru`, and `yandex.com.tr` search URLs, supports bounded pagination and region/language hints, and keeps the original search URL for traceability.

### What this Yandex search scraper extracts

Each result row includes:

| Field | Meaning |
| --- | --- |
| `query` and `rank` | The query that produced the row and its one-based rank on the source page. |
| `title` and `url` | The visible result title and direct destination URL. Common Yandex redirect links are unwrapped. |
| `snippet` and `displayedUrl` | Visible result summary and breadcrumb/display URL when available. |
| `sourceDomain` | Normalized destination hostname for domain-level analysis. |
| `resultType` and `isAd` | Organic, ad, video, or other classification. |
| `pageNumber` and `sourceUrl` | Pagination position and the exact Yandex search URL used. |
| `breadcrumbs`, `sitelinks`, `dateText` | Additional visible SERP metadata when present. |

The schema is stable across rows, with nullable fields used when Yandex does not expose a value.

### Example input

```json
{
  "searchQueries": ["купить ноутбук", "AI news"],
  "domain": "yandex.com",
  "language": "all",
  "maxResults": 25,
  "maxPagesPerQuery": 2
}
```

Or pass an existing public result URL:

```json
{
  "startUrls": [
    { "url": "https://yandex.ru/search/?text=купить+ноутбук&lr=213" }
  ],
  "maxResults": 20
}
```

### Output

The default dataset contains `query`, `rank`, `title`, direct `url`, `displayedUrl`, `snippet`, `sourceDomain`, `breadcrumbs`, `dateText`, `resultType`, `isAd`, `sitelinks`, `pageNumber`, `sourceUrl`, `scrapedAt`, and `warnings`.

The `OUTPUT` key-value record contains `SUCCEEDED`, `PARTIAL`, `EMPTY`, `BLOCKED`, or `REJECTED` status, counts, source URLs, and diagnostics. A blocked run is reported as a failed run with zero fabricated rows. Invalid-only input is softly rejected with an actionable summary. A valid query with no visible matches is kept distinct as `EMPTY`.

### Pricing

This Actor uses predictable pay-per-event pricing:

| Event | Price |
| --- | ---: |
| One structured result row | $0.006 |
| Actor start | $0.00005 per GB of Actor memory, minimum one event |

Examples, excluding Apify platform usage:

- 10 result rows: up to $0.0601 in event charges at the default 2 GB allocation.
- 100 result rows: up to $0.6001 in event charges at the default 2 GB allocation.
- A valid query with no result rows still incurs the Actor-start event.

Apify platform usage, including compute, storage operations, data transfer, and any proxy traffic, is shown separately by Apify and is passed through to the user. The Actor caps output at 100 unique rows per run so the event portion of a run remains predictable.

### When to use it

Use this Actor when you need a bounded, structured snapshot of public Yandex web search results, such as checking search visibility across queries, collecting competitor result URLs, comparing Russian or Turkish SERPs, or feeding search-result rows into an analysis workflow. It is suitable for both manual runs and API/MCP-driven agent workflows.

Do not use it for private account data, Yandex Mail, Yandex Maps, Yandex Market, arbitrary website crawling, CAPTCHA solving, or guaranteed personalized rank tracking. Yandex may personalize or regionally vary results, and a CAPTCHA or rate-limit response is reported in `OUTPUT` rather than converted into fabricated empty data.

### Access and reliability

This Actor reads public search pages only. Apify Proxy is enabled by default because direct Yandex access can return a CAPTCHA or rate-limit page. Set `proxyConfiguration` to `{ "useApifyProxy": false }` only when direct access is appropriate; do not force a country/group until it has been tested for the target region. The Actor does not bypass authentication or solve CAPTCHAs.

For reliable runs, keep `maxResults` and `maxPagesPerQuery` bounded. The default is one `OpenAI` query, up to 20 unique rows, and up to three pages per query. Multiple queries are supported, but all queries share the run-level result cap. If one page is blocked after retries, the run exposes a `BLOCKED` or `PARTIAL` status and warning details in `OUTPUT`.

### MCP-friendly scope

Use this Actor when an agent needs structured public Yandex web-search results for a bounded list of queries. Do not use it for private account data, Yandex Mail/Maps/Market content, CAPTCHA solving, arbitrary website crawling, or guaranteed rank tracking across personalized sessions. Output is capped by `maxResults` and pagination is capped by `maxPagesPerQuery`.

### API input example

```bash
curl -X POST "https://api.apify.com/v2/acts/muhammadafzal~yandex-search-parser/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQueries": ["купить ноутбук", "AI news"],
    "domain": "yandex.com",
    "language": "all",
    "maxResults": 25,
    "maxPagesPerQuery": 2
  }'
```

The same narrow input/output contract is suitable for Apify MCP clients that need a Yandex search tool.

### Compliance note

Use this Actor only for public pages and in accordance with Yandex terms, applicable law, and your own data-use requirements. Results reflect what Yandex returns to the Actor's configured region, language, session, and proxy route at run time.

### Local development

```bash
npm ci
npm test
```

The parser is covered by fixture-style unit tests. A live Yandex canary requires network access and should be run privately with a small result/page cap before publication.

# Actor input Schema

## `searchQueries` (type: `array`):

Yandex web search terms. Example: \['купить ноутбук', 'AI news']. If startUrls is supplied, URLs take precedence.

## `startUrls` (type: `array`):

Existing public Yandex search URLs such as https://yandex.com/search/?text=OpenAI or https://yandex.ru/search/?text=купить+ноутбук.

## `domain` (type: `string`):

Yandex regional domain used when building URLs from searchQueries. Existing startUrls keep their own domain.

## `regionCode` (type: `integer`):

Optional Yandex region code (lr), for example 213 for Moscow. Leave empty to use the default region inferred by Yandex.

## `language` (type: `string`):

Optional Yandex interface/result language hint.

## `maxResults` (type: `integer`):

Maximum unique result rows written to the dataset across all queries. Keep this capped for predictable runtime and output size.

## `maxPagesPerQuery` (type: `integer`):

Maximum Yandex result pages to visit per query or start URL. Yandex pages are requested with its p pagination parameter.

## `proxyConfiguration` (type: `object`):

Apify Proxy is enabled by default to reduce Yandex CAPTCHA risk. Set {"useApifyProxy":false} for direct access, or add groups/country when you have a tested proxy route. Example: {"useApifyProxy":true}.

## Actor input object example

```json
{
  "searchQueries": [
    "купить ноутбук"
  ],
  "startUrls": [],
  "domain": "yandex.com",
  "language": "all",
  "maxResults": 20,
  "maxPagesPerQuery": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Structured Yandex result rows with query, rank, title, direct URL, snippet, source domain, result type, and provenance.

## `summary` (type: `string`):

Run diagnostics and warnings written after crawling.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "купить ноутбук"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/yandex-search-parser").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "searchQueries": ["купить ноутбук"] }

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/yandex-search-parser").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "купить ноутбук"
  ]
}' |
apify call muhammadafzal/yandex-search-parser --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/yandex-search-parser"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YggptcurnWgzSSBlS/builds/FYDYnJ62HML3H00dp/openapi.json
