# Yandex Dzen Scraper (`sashaebashu/yandex-dzen-scraper`) Actor

Yandex Dzen (Zen) scraper :
extract public stats from articles and videos in bulk: views, likes, comments, author info, subscribers. Paste a list of URLs.

- **URL**: https://apify.com/sashaebashu/yandex-dzen-scraper.md
- **Developed by:** [Sasha Ebashu](https://apify.com/sashaebashu) (community)
- **Categories:** Social media, Videos, News
- **Stats:** 47 total users, 9 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Yandex Dzen Scraper

### What does Yandex Dzen Scraper do?

Yandex Dzen Scraper extracts public stats from [Yandex Zen / Dzen](https://dzen.ru/)
publications without an API key or login. **Paste a list of links** (articles or
videos) and it returns clean, structured data for every one — built for **bulk**
runs.

Yandex Dzen Scraper can extract:

- View counts
- Likes
- Comment counts
- Engagement rate (calculated)
- Author / channel name, ID, profile URL and subscriber count
- Title, category and publish date

It works for **articles** (`/a/…`), **posts** (`/b/…`), **videos**
(`/video/watch/…`) and **shorts** (`/shorts/…`).

***

### How does it work?

Unlike many sites, Dzen publication pages are gated behind Yandex sign-in for
plain HTTP requests. Dzen Scraper therefore uses a **real headless browser**
(Playwright) to render each page anonymously — exactly like a normal reader —
and reads the stats from the rendered page. No Yandex account is needed.

Because Yandex aggressively blocks datacenter IPs with SmartCaptcha, the scraper
uses **Apify Residential Proxy (country RU) by default**.

***

### How to use it

1. Click **Start**
2. Paste your Dzen links into the **Yandex Zen URLs** field — one per line, or a
   whole blob separated by spaces/commas/new lines (they are split automatically).
   You can also upload a file or link a Google Sheet via the second field.
3. Click **Run**
4. When the run finishes, preview or download your data from the **Output** tab
   (JSON, CSV, Excel)

Supported URL formats (query strings `?…` and anchors `#…` are ignored):

- `https://dzen.ru/a/<id>` — articles
- `https://dzen.ru/b/<id>` — posts (short text publications)
- `https://dzen.ru/video/watch/<id>` — videos
- `https://dzen.ru/shorts/<id>` — shorts

Duplicate URLs are removed automatically, so bulk lists with repeats are fine.

***

### Input parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| urls | array | Dzen URLs, bulk paste (one per line or a separated blob) | — |
| startUrls | array | Alternative bulk input: list / file / Google Sheet | — |
| maxItems | integer | Max publications per run (1–5000) | 1000 |
| engagementScore | boolean | Score each item vs its author's median reach (`authorMedianViews`, `viewsVsAuthorMedian`, `engagementVsAuthorMedian`) — standout posts surface regardless of channel size | false |
| maxConcurrency | integer | Parallel browser pages (keep 1–3) | 2 |
| proxyConfiguration | object | Proxy settings | Residential RU |

> **Proxy note.** Yandex blocks datacenter IPs quickly, so **Residential proxy
> (RU)** is enabled by default. You can turn it off, but expect SmartCaptcha on
> anything beyond a few requests.

***

### Results

One JSON object is returned per input URL.

Example output:

```json
[
  {
    "inputUrl": "https://dzen.ru/a/afRiHXixAFfUTmXO",
    "platform": "dzen",
    "contentId": "afRiHXixAFfUTmXO",
    "contentType": "article",
    "contentUrl": "https://dzen.ru/a/afRiHXixAFfUTmXO",
    "title": "Овощи, которые стоит сажать рядом друг с другом 🍅🌿",
    "author": "Садовый клуб. Вероника Поливкина",
    "authorId": "5ddebbefc429860a2f8e4c3c",
    "authorUrl": "https://dzen.ru/id/5ddebbefc429860a2f8e4c3c",
    "authorSubscribers": 86128,
    "views": 16158,
    "likes": 263,
    "dislikes": null,
    "comments": 3,
    "reposts": null,
    "favorites": null,
    "engagementRate": 1.65,
    "category": "Садоводство",
    "publishedAt": "2026-05-06T05:30:37.272Z",
    "scrapedAt": "2026-06-14T12:08:19.363Z",
    "status": "success",
    "error": null
  }
]
```

#### Field description

| Field             | Description                                              |
| ----------------- | -------------------------------------------------------- |
| inputUrl          | Original Dzen URL provided as input                      |
| platform          | Always `"dzen"`                                          |
| contentId         | Dzen publication id                                      |
| contentType       | `article`, `post`, `video` or `short`                    |
| contentUrl        | Canonical publication URL                                |
| title             | Publication title                                        |
| author            | Channel / author name                                    |
| authorId          | Channel id                                               |
| authorUrl         | Link to the channel                                      |
| authorSubscribers | Channel subscriber count (see caveat below)              |
| views             | View count                                               |
| likes             | Like count                                               |
| dislikes          | Not exposed publicly by Dzen → always `null`             |
| comments          | Comment count                                            |
| reposts           | Not exposed publicly by Dzen → always `null`             |
| favorites         | Not exposed publicly by Dzen → always `null`             |
| engagementRate    | (likes + comments) / views × 100                         |
| category          | Category / tag                                           |
| publishedAt       | Publish timestamp                                        |
| scrapedAt         | Timestamp of when the data was collected                 |
| status            | `success`, `unavailable` or `failed`                     |
| error             | Reason string when not successful, otherwise `null`      |

#### Which metrics are available?

| ✅ Available | 🚫 Not available |
| --- | --- |
| views, likes, comments, title, author, authorId, authorUrl, category, publishedAt | dislikes, reposts, favorites — Dzen does not expose these publicly (always `null`) |

#### Special cases & caveats

- **Deleted / private / unavailable publication** → `status: "unavailable"`,
  `error: "likely_deleted"`.
- **Unrecognised URL** → `status: "failed"`, `error: "invalid_url"`.
- **Blocked by Yandex** (captcha/SSO) → the request is retried with a fresh proxy
  session; if it keeps failing the item is marked `failed`.
- **Subscriber count** is accurate for both articles and videos. (For video/short
  pages the count is fetched from the public channel feed API, because the player
  embeds recommended channels on those pages.)
- **Billing:** successful items and `unavailable` rows (deleted / private,
  `status: "unavailable"`) go to the main output — so you can see exactly what's
  gone instead of an empty result. Genuine failures (invalid URLs, blocks) are
  collected into a separate **ERRORS** record in the key-value store — you are not
  charged for those.

***

### Notes

- Built with the Apify SDK + Crawlee + Playwright (headless Chromium).
- Endpoints and extraction are documented in [`RESEARCH.md`](./RESEARCH.md).
- Only public data is collected — do not scrape personal data without a
  legitimate reason.

# Actor input Schema

## `urls` (type: `array`):

Paste one URL per line. Supports articles (https://dzen.ru/a/<id>), videos (https://dzen.ru/video/watch/<id>) and shorts (https://dzen.ru/shorts/<id>). You can also paste many links separated by spaces, commas or new lines — they will be split automatically. Query strings and anchors are ignored.

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

Alternative bulk input: paste a list, upload a file, or link a Google Sheet of Dzen URLs. Combined with the field above.

## `maxItems` (type: `integer`):

Maximum number of publications to scrape in a single run. Helps control cost and run time.

## `engagementScore` (type: `boolean`):

Score each item against its author's OWN median reach, so standout posts surface regardless of the channel's size. Adds authorMedianViews, viewsVsAuthorMedian and engagementVsAuthorMedian to each row (values > 1 beat the author's typical performance). Best when scraping many items from the same author. Off by default.

## `maxConcurrency` (type: `integer`):

How many browser pages to run in parallel. 4-6 is a good balance of speed and safety; lower it to 2 if you start seeing SmartCaptcha.

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

Proxy settings. Yandex aggressively blocks datacenter IPs, so Residential proxy in country RU is strongly recommended and enabled by default. Turn it off only if you have another way around blocking.

## Actor input object example

```json
{
  "urls": [
    "https://dzen.ru/a/afRiHXixAFfUTmXO",
    "https://dzen.ru/video/watch/6a2d6ac6f3ceb430b1660fd1"
  ],
  "maxItems": 1000,
  "engagementScore": false,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "RU"
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `details` (type: `string`):

No description

# 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 = {
    "urls": [
        "https://dzen.ru/a/afRiHXixAFfUTmXO",
        "https://dzen.ru/video/watch/6a2d6ac6f3ceb430b1660fd1"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "RU"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("sashaebashu/yandex-dzen-scraper").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 = {
    "urls": [
        "https://dzen.ru/a/afRiHXixAFfUTmXO",
        "https://dzen.ru/video/watch/6a2d6ac6f3ceb430b1660fd1",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "RU",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("sashaebashu/yandex-dzen-scraper").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 '{
  "urls": [
    "https://dzen.ru/a/afRiHXixAFfUTmXO",
    "https://dzen.ru/video/watch/6a2d6ac6f3ceb430b1660fd1"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "RU"
  }
}' |
apify call sashaebashu/yandex-dzen-scraper --silent --output-dataset

```

## MCP server setup

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

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/gNp1VLqd17XeaQkHa/builds/U8qa5wCZQg8K39rtV/openapi.json
