# VK Scraper - VKontakte Posts, Comments, Profiles & Videos (`topapi/vk-scraper`) Actor

Scrape VK (VKontakte) without login: wall posts of any community or profile with likes, views, reposts and attachments, comments with threads, profile and community data, videos and clips, VK video search. Date windows, keyword filters, monitor mode. $1.30 per 1,000 posts.

- **URL**: https://apify.com/topapi/vk-scraper.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** Social media, Videos, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.30 / 1,000 posts

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

## VK Scraper - VKontakte Posts, Comments, Profiles & Videos

Scrape **VK (VKontakte, ВКонтакте)** without a VK account, token or cookie: the **wall posts** of any public community, public page, event or person, with text, date, author, **likes, comments, reposts, views, reactions**, photos, videos, links, files, polls and reposted posts; each post's **comments** with their threads; **profile and community data** (followers / members, description, status, city, website, contacts, address); and **videos and clips** of any owner or from a **VK Video search**, with likes, comments, description, embed link and media links. Everything comes from what vk.com shows a signed-out visitor.

### What you can scrape

| What you enter | Example | What you get |
|---|---|---|
| A community, public page or event | `https://vk.com/vk`, `rambler`, `@tproger`, `club22822305`, `public1`, `-22822305` | Its wall posts, newest first |
| A person's profile | `durov`, `https://vk.com/id1`, `id5` | The posts on their wall |
| A post link | `https://vk.com/wall-22822305_1734948`, `https://m.vk.com/wall1_2442097` | That post (and its comments with the add-on) |
| Profiles mode | any of the above with **What to collect** = Profiles | One profile / community row each |
| Videos mode, or a VK Video channel | `https://vkvideo.ru/@vk`, or any owner with **What to collect** = Videos | The owner's videos and clips, newest first |
| A video or clip link | `https://vkvideo.ru/video-22822305_456243492`, `https://vk.com/clip-22822305_456243513` | That video |
| A VK Video search | `футбол` in **VK Video search terms**, or `https://vkvideo.ru/search?q=футбол` | The videos VK Video finds |

Mix links, handles, ids and search terms freely in one run.

### Quick input

```json
{
  "targets": ["https://vk.com/vk", "durov"],
  "maxPostsPerTarget": 10
}
```

This is the prefilled input: the 10 newest posts of the VK community and of Pavel Durov's wall, 20 rows in 4-5 seconds ($0.026). With no input at all, a 10-post sample (vk.com/vk) runs.

More examples:

```json
{ "targets": ["rambler", "tproger", "habr"], "maxPostsPerTarget": 200, "publishedAfter": "30 days" }
```

```json
{ "targets": ["https://vk.com/vk"], "maxPostsPerTarget": 20, "includeComments": true, "maxCommentsPerPost": 100, "includeProfile": true }
```

```json
{ "targets": ["https://vk.com/vk"], "publishedAfter": "2024-03-01", "publishedBefore": "2024-06-01", "maxPostsPerTarget": 0 }
```

```json
{ "targets": ["rambler", "lentach"], "keywordsAny": ["выборы", "налог"], "minLikes": 50, "maxPostsPerTarget": 100 }
```

```json
{ "mode": "profiles", "targets": ["vk", "durov", "rambler", "tproger", "id5"] }
```

```json
{ "mode": "videos", "targets": ["https://vkvideo.ru/@habr"], "maxVideosPerTarget": 50, "videoSearchQueries": ["рецепты"], "maxVideosPerSearch": 100 }
```

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `targets` | list | - | Communities, profiles, posts, videos, clips, VK Video channels or searches: links, handles or ids (see the table above). |
| `mode` | `posts` / `profiles` / `videos` | `posts` | What to collect from each community / profile. Post and video links always return that post or video. |
| `videoSearchQueries` | list | - | VK Video search terms. Cyrillic terms find the most. |
| `maxPostsPerTarget` | number | 20 | Posts read from each wall, newest first (the pinned post counts). 0 = the whole wall. |
| `maxItems` | number | 1,000 | Posts / videos (profiles in Profiles mode) delivered in total; 0 = no limit. Comments do not count here. |
| `maxVideosPerTarget` | number | 20 | Videos read from each owner / channel; 0 = all. |
| `maxVideosPerSearch` | number | 20 | Videos per search term; 0 = as many as VK shows. |
| `publishedAfter` / `publishedBefore` | date | - | `2026-01-31`, an ISO time, or `7 days`, `24 hours`, `3 months`. A wall stops at the first older post; a window in the past is found by a binary search over the wall, so newer posts are not read. |
| `keywordsAny` / `keywordsAll` / `excludeKeywords` | list | - | Keep posts whose text (hashtags and a repost's text included) has any / all of these words, drop those with any excluded word. Case-insensitive, ё = е. Videos: title and description. |
| `includePinnedPosts` / `includeReposts` / `onlyReposts` / `includeAds` / `onlyWithMedia` | boolean | true / true / false / true / false | Pinned post, reposts, ads, posts with photos / videos / files. |
| `minLikes` / `minComments` / `minReposts` / `minViews` | number | - | Engagement floors. |
| `minDurationSeconds` / `maxDurationSeconds` | number | - | Video length range. |
| `maxPostsToScan` | number | 2,000 | With filters on, stop reading a wall after this many posts. |
| `wallFilter` | `all` / `own` | `all` | Every post on the wall, or only the owner's own posts. |
| `includeComments` | boolean | false | Each post's comments as their own rows (paid per comment). |
| `maxCommentsPerPost` | number | 20 | Comment rows per post, thread replies included; 0 = all. |
| `commentsSort` | `newest` / `oldest` | `newest` | Which comments come first. |
| `includeCommentReplies` | boolean | true | Also the replies inside comment threads. |
| `includeProfile` | boolean | false | One profile row per community / profile (paid per profile). Always on in Profiles mode. |
| `includeVideoDetails` | boolean | true | Read each video's page: likes, comments, description, embed link, media links. Included in the video price. |
| `includeTopComments` | boolean | true | Each post row carries up to 3 of the comments VK shows under it (`topComments`). Free. |
| `monitorMode` | boolean | false | Only rows not delivered by an earlier run (see Monitor mode). |
| `monitorStoreName` | text | `vk-monitor` | Name of the monitor memory; one name per watch list. |
| `resetMonitor` | boolean | false | Forget earlier runs. |
| `compact` | boolean | false | Main fields only, empty fields left out. |
| `includeRaw` | boolean | false | Posts: add VK's own post object as `raw`. |
| `notifyWebhookUrl` | URL | - | POST a short JSON summary here when a run delivers rows (Slack, Discord, Make, Zapier, n8n). |
| `maxConcurrency` | 1-24 | 8 | Requests in flight. |
| `proxyConfiguration` | proxy | none | Leave empty: the actor connects directly and moves to Apify datacenter, then residential proxy, only if VK refuses it. |

Input names used by other VK actors also work: `startUrls`, `urls`, `communities`, `maxPosts`, `maxPostsPerUrl`, `maxItemsPerTarget`, `containsText`, `keyword`, `includeComments`, `monitoringMode`, `searchKeywords`, `videoUrls`, `clipUrls` and more.

### Output

Every row has a `type`: `post`, `comment`, `profile` or `video`. The dataset's Output tab has a view for each.

A real post row (rambler, 2026-11-13; long strings and lists shortened):

```json
{
  "type": "post",
  "id": "-97751087_968487",
  "url": "https://vk.com/wall-97751087_968487",
  "ownerName": "Рамблер",
  "ownerScreenName": "rambler",
  "authorName": "Рамблер",
  "text": "В какой момент человек, который когда-то учил вас завязывать шнурки, начал спрашивать...",
  "outboundLinks": ["https://www.rambler.ru/dom/poryadok/56893066-..."],
  "publishedAt": "2026-11-05T16:16:05.000Z",
  "likesCount": 6,
  "commentsCount": 7,
  "repostsCount": 1,
  "viewsCount": 2476,
  "reactions": [{ "id": 0, "count": 5 }, { "id": 4, "count": 1 }],
  "isPinned": false,
  "isRepost": false,
  "attachments": [{ "type": "photo", "id": "-97751087_457419194", "url": "https://sun9-71.userapi.com/...", "width": 800, "height": 1000 }],
  "images": ["https://sun9-71.userapi.com/..."],
  "topComments": [{ "authorName": "Анастасия Романова", "text": "Была почта и нету!", "publishedAt": "2026-11-09T16:41:45.000Z", "likesCount": 1 }],
  "target": "rambler"
}
```

A real comment row (Comments add-on, a reply inside a thread; vk.com/vk, 2026-11-13):

```json
{
  "type": "comment",
  "id": "-22822305_1738865",
  "postUrl": "https://vk.com/wall-22822305_1738794",
  "url": "https://vk.com/wall-22822305_1738794?reply=1738865&thread=1738861",
  "authorName": "Руслан Юрьевич",
  "authorUrl": "https://vk.com/ruslan_bu",
  "text": "ВКонтакте, вы ИИ наняли что он отвечает в комментах также в поддержке которую вы скинули?) отлично работает",
  "publishedAt": "2026-11-13T17:27:30.000Z",
  "likesCount": 0,
  "parentCommentId": 1738862,
  "threadId": 1738861,
  "isReply": true,
  "replyToUserId": -22822305,
  "replyToName": "Сообществу"
}
```

A profile row (Profiles mode or the Profile details add-on) carries `name`, `screenName`, `profileType`, `followersCount` / `membersCount`, `wallPostsCount`, `description`, `status`, `city`, `country`, `website`, `links`, `contacts` (e-mail / phone the community publishes), `addresses`, `isVerified`, `isClosed`, `photoUrl`, `coverUrl`; for people also `birthDate`, `sex`, `occupation`, `career`, `universities`, `schools`, `languages` and the other profile fields they make public.

A video row carries `url`, `title`, `description`, `publishedAt`, `durationSeconds`, `viewsCount`, `likesCount`, `commentsCount`, `isClip`, `isLive`, `thumbnailUrl`, `authorName`, `authorUrl`, `embedUrl` and `videoUrls` (MP4 by quality, e.g. `[{ "quality": "720p", "url": "..." }]`) with `hlsUrl` and `mediaExpiresAt`.

#### Fields and how often they are filled

Measured on platform runs on 2026-11-13 (share of rows with a value):

| Field | rambler, 1,000 posts | club1 (2010-2025), 1,000 posts | vk.com/vk, 10 posts + 2,082 comments |
|---|---|---|---|
| `id`, `url`, `ownerId`, `ownerUrl`, `publishedAt`, `likesCount`, `commentsCount`, `repostsCount`, `postType` | 100% | 100% | 100% |
| `text` | 100% | 96% | 90% |
| `viewsCount` (VK counts views since 2017) | 100% | 11% | 100% |
| `attachments`, `mediaTypes` | 100% | 20% | 100% |
| `images` | 100% | 16% | 40% |
| `outboundLinks` | 100% | 91% | 50% |
| `reactions` | 46% | 100% | 100% |
| `topComments` | 18% | 100% | 90% |
| comments: `authorName`, `authorUrl`, `publishedAt`, `likesCount` | - | - | 99-100% |
| comments: `text` (the rest are stickers or photos) | - | - | 89% |
| comments: `parentCommentId` / `threadId` (replies in threads) | - | - | 51% |

Profiles (9 communities and people): `name`, `screenName`, `url`, `photoUrl` 100%, `followersCount` 89%, `wallPostsCount` 89%, `website` 78%, `status` 78%, `description` 67%, `contacts` 44%, `city` / `country` 44%. Videos with details (30): every field 100% except `description` 47%; videos from a search without details carry the list fields (`title`, `publishedAt`, `durationSeconds`, `viewsCount`, `thumbnailUrl`, `authorName`) at 100%.

### Monitor mode

Turn on `monitorMode` and schedule the run (Apify Schedules, the API, a webhook or an MCP client). The first run delivers the newest posts (up to `maxPostsPerTarget` per wall) and remembers them in a named dataset in your account; every later run with the same targets returns only posts, comments, profiles and videos that are new (`changeType: "new"`). A quiet poll reads one page per wall and charges nothing (measured: $0 billed, 3-4 s). A post delivered earlier without comments comes back once with them when you switch the Comments add-on on (`changeType: "details"`). If a run stops at your maximum cost, the next run delivers the rest of the window and nothing twice (measured: 23 posts at a $0.03 limit, then the other 127, then 0).

```json
{ "targets": ["rambler", "lentach"], "maxPostsPerTarget": 50, "monitorMode": true, "monitorStoreName": "news-walls", "notifyWebhookUrl": "https://hooks.slack.com/services/..." }
```

Run it on a schedule through the API:

```bash
curl -X POST "https://api.apify.com/v2/acts/TopApi~vk-scraper/runs?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"targets":["https://vk.com/vk"],"maxPostsPerTarget":30,"monitorMode":true}'
```

### Pricing

Pay per result, no start fee:

| Event | Price |
|---|---|
| Post (one row) | **$1.30 per 1,000** |
| Comment (Comments add-on, per comment row) | $1.30 per 1,000 |
| Profile (Profiles mode or the Profile details add-on) | $1.30 per 1,000 |
| Video (one row, video details included) | $2.30 per 1,000 |

| You scrape | You pay |
|---|---|
| 100 posts | $0.13 |
| 1,000 posts | $1.30 |
| 100 posts + 1,500 comments | $2.08 |
| 50 community profiles | $0.065 |
| 100 videos | $0.23 |

Posts removed by your filters, rows already delivered (monitor mode), private walls, posts that do not exist and failed requests are never charged. If you set a maximum cost per run, the run stops cleanly at it and every row it delivers is charged once.

### Speed and limits

- Walls: 10 posts a request; 1,000 posts in 64-76 seconds, a whole 1,160-post wall in about 3 minutes, 3,000 posts in about 5 minutes (measured at the default 256 MB).
- Comments: up to 100 threads a request; 2,082 comments of 10 posts in 30 seconds.
- VK shows signed-out visitors public walls only: a private profile or a closed community returns no posts (the run says which), and a few communities are visible only from inside Russia.
- VK-wide post search and people / community search need a VK account, so this actor reads the walls you name; use the keyword filters to keep matching posts.
- A VK Video search shows signed-out visitors about the first 100-120 videos of a term (measured: 104-119); use several narrower terms for more.
- Media links (`videoUrls`, `hlsUrl`) work for a few hours and only from the IP of the run that read them; `embedUrl` and `url` are permanent.
- A regular video's page does not show its own view count: `viewsCount` comes from the owner's or the search's video list (clips also carry it on their page).
- With keyword or engagement filters on, a wall is read only while the posts kept pay for the pages read; the status message says when reading stopped early.

# Actor input Schema

## `targets` (type: `array`):

One per line: a community or profile link or handle (https://vk.com/vk, vk.com/durov, @tproger, club22822305, public1, id1, -22822305), a post link (https://vk.com/wall-22822305_1734948), a video or clip link (https://vkvideo.ru/video-22822305_456243492, https://vk.com/clip-22822305_456243513) or a VK Video channel (https://vkvideo.ru/@vk). Post and video links always return that post or video.

## `mode` (type: `string`):

Posts: the wall, newest first. Profiles: one profile row each (name, followers / members, description, city, website, contacts...). Videos: the owner's uploaded videos and clips.

## `videoSearchQueries` (type: `array`):

Search VK Video like vkvideo.ru does, one term per line (Cyrillic finds the most, e.g. "футбол"). Each term returns up to "Max videos per search" video rows.

## `maxPostsPerTarget` (type: `integer`):

Posts read from each wall, newest first (the pinned post counts). 0 = the whole wall.

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

Stop after this many posts / videos (profiles in Profiles mode) across all targets. Comments do not count here (see Max comments per post). 0 = no limit.

## `maxVideosPerTarget` (type: `integer`):

Videos mode and VK Video channel links: videos read from each owner, newest first. 0 = all of them.

## `maxVideosPerSearch` (type: `integer`):

Videos returned for each VK Video search term. 0 = as many as VK returns.

## `publishedAfter` (type: `string`):

Only posts / videos published on or after this date: 2026-01-31, an ISO time, or a relative window such as "7 days", "24 hours", "3 months". The wall is read newest first and reading stops at the first older post.

## `publishedBefore` (type: `string`):

Only posts / videos published before this date (same formats). On a wall, the first post of the window is found by a binary search over the wall, so newer posts are not read.

## `keywordsAny` (type: `array`):

Keep a post only if its text (and hashtags, and a repost's text) contains at least one of these words or phrases. Case-insensitive; ё = е. For videos: title and description.

## `keywordsAll` (type: `array`):

Keep a post only if its text contains every one of these words or phrases.

## `excludeKeywords` (type: `array`):

Drop a post whose text contains any of these words or phrases.

## `includePinnedPosts` (type: `boolean`):

Keep the post a wall shows first when it is older than the next one (VK's pinned post).

## `includeReposts` (type: `boolean`):

Keep posts that share another post (the original is in the repost field).

## `onlyReposts` (type: `boolean`):

Keep only posts that share another post.

## `includeAds` (type: `boolean`):

Keep posts VK marks as advertising (isAd).

## `onlyWithMedia` (type: `boolean`):

Keep only posts that carry an attachment other than a link preview.

## `minLikes` (type: `integer`):

Keep posts (and videos with details) with at least this many likes.

## `minComments` (type: `integer`):

Keep posts with at least this many comments.

## `minReposts` (type: `integer`):

Keep posts shared at least this many times.

## `minViews` (type: `integer`):

Keep posts / videos viewed at least this many times.

## `minDurationSeconds` (type: `integer`):

Videos: keep those at least this long.

## `maxDurationSeconds` (type: `integer`):

Videos: keep those at most this long (e.g. 60 for clips only).

## `maxPostsToScan` (type: `integer`):

With keyword / engagement filters on, stop reading a wall after this many posts. Reading also stops early when the filters keep too few posts for another page to pay for itself.

## `wallFilter` (type: `string`):

All: every post on the wall. Owner: only posts by the community / profile itself.

## `includeComments` (type: `boolean`):

Add each post's comments as their own rows (type "comment"): author, text, date, likes, photos, the thread it answers. Charged per comment row.

## `maxCommentsPerPost` (type: `integer`):

Comment rows per post, threads included. 0 = all of them.

## `commentsSort` (type: `string`):

Which comments come first when a post has more than the cap.

## `includeCommentReplies` (type: `boolean`):

Also return the replies VK shows inside comment threads (parentCommentId / threadId tell where they belong).

## `includeProfile` (type: `boolean`):

Add one profile row (type "profile") per community or profile: name, followers / members, description, status, city, country, website, contacts, address, verified, cover and photo. Always on in Profiles mode. Charged per profile row.

## `includeVideoDetails` (type: `boolean`):

Read each video's page: likes, comments count, description, embed link and the media links (MP4 by quality, HLS; they work for a few hours from the run's IP). Included in the video price.

## `includeTopComments` (type: `boolean`):

Each post row carries up to 3 of the comments VK shows under it (topComments), at no extra charge and with no extra request.

## `monitorMode` (type: `boolean`):

Each run returns only posts / videos / comments / profiles not delivered by an earlier run with the same targets and Monitor name. A wall is read until the first page of already-delivered posts, so a quiet poll reads one page and charges nothing.

## `monitorStoreName` (type: `string`):

Name of the memory this monitor uses (letters, digits, dashes). Use different names for monitors that should not share memory.

## `resetMonitor` (type: `boolean`):

Forget what earlier runs delivered (the next run delivers everything again).

## `compact` (type: `boolean`):

Only the main fields of each row, empty fields left out.

## `includeRaw` (type: `boolean`):

Posts: add VK's own post object (raw) next to the normalised fields.

## `notifyWebhookUrl` (type: `string`):

POST a short JSON summary (and up to 25 rows) to this URL when the run delivered rows - Slack / Discord / Zapier / Make webhooks work.

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

Requests to VK in flight at once.

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

Not needed: VK answers the run's own IP. Requests that VK refuses move to Apify datacenter, then residential proxy automatically. Set a proxy here to use your own.

## Actor input object example

```json
{
  "targets": [
    "https://vk.com/vk",
    "durov"
  ],
  "mode": "posts",
  "maxPostsPerTarget": 10,
  "maxItems": 1000,
  "maxVideosPerTarget": 20,
  "maxVideosPerSearch": 20,
  "includePinnedPosts": true,
  "includeReposts": true,
  "onlyReposts": false,
  "includeAds": true,
  "onlyWithMedia": false,
  "maxPostsToScan": 2000,
  "wallFilter": "all",
  "includeComments": false,
  "maxCommentsPerPost": 20,
  "commentsSort": "newest",
  "includeCommentReplies": true,
  "includeProfile": false,
  "includeVideoDetails": true,
  "includeTopComments": true,
  "monitorMode": false,
  "monitorStoreName": "vk-monitor",
  "resetMonitor": false,
  "compact": false,
  "includeRaw": false,
  "maxConcurrency": 8,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One item per VK post, comment, profile / community or video (the type field says which).

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

Per-source counts (total on VK, read, delivered), filters, add-ons and egress statistics (written for Console runs, large runs and runs with a problem).

# 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 = {
    "targets": [
        "https://vk.com/vk",
        "durov"
    ],
    "maxPostsPerTarget": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/vk-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 = {
    "targets": [
        "https://vk.com/vk",
        "durov",
    ],
    "maxPostsPerTarget": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/vk-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 '{
  "targets": [
    "https://vk.com/vk",
    "durov"
  ],
  "maxPostsPerTarget": 10
}' |
apify call topapi/vk-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,topapi/vk-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/K3L9lvUMfYP9uHM0S/builds/bcBMHcjuMzgeQfjxT/openapi.json
