# VK Scraper - Posts, Comments, Communities (`teodor_banea/vk-scraper`) Actor

Scrape public VK (VKontakte) data: wall posts with likes, views and attachments, comments with replies, profile and community details, and community search. No login, no proxy setup.

- **URL**: https://apify.com/teodor_banea/vk-scraper.md
- **Developed by:** [Banea Teodor](https://apify.com/teodor_banea) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 93.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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

## VK Scraper — Posts, Comments, Profiles & Communities

### What does VK Scraper do?

VK Scraper exports public data from VK (VKontakte, vk.com / vk.ru) — no login, no VK account, no API key and no proxy setup. Pick one mode per run:

| Mode | You enter | You get |
|---|---|---|
| **Wall posts** | profiles and communities (handles, page URLs, ids) and/or post links | one row per post: text, date, likes, comments, reposts, views, reactions by type, photos, videos, links, pinned / repost / ad flags, the original of a repost |
| **Comments of posts** | post links (or profiles / communities → the comments of their latest posts) | one row per comment and reply: text, date, likes, thread structure, author id and link (names of people only when you ask) |
| **Profile and community details** | profiles and communities | one row per page: name, handle, followers / members, verified, closed, deactivated, community type, activity, description, website, status, photo; for communities also the page phone, cover, published contact e-mails, phones and roles, and addresses with coordinates, phone and opening hours |
| **Community search** | words in any language | communities matching each search in VK's own order, with the same details |

Every row is flat, has the same keys for its type (missing values are `null`, never left out), uses ISO 8601 UTC dates, integer counters and absolute URLs.

### Why use this Actor?

- **Four data types in one Actor** — posts, comments with whole reply threads, page details and community search.
- **Fast and cheap** — 100 posts per request; 1,000 posts take well under a minute.
- **Date windows that scale** — "Posted after" stops reading at the right post; "Posted before" jumps straight to an old part of a wall instead of reading 80,000 newer posts.
- **Complete comment threads** — threads longer than VK's preview are paged to the end; counts are checked against what VK reports.
- **Privacy-minded defaults** — commenter names are off unless you turn them on; profiles never include birthday, gender, city or career.

### How much does it cost?

The Actor is priced per result: **$1.50 per 1,000 rows** plus **$0.005 per run start**. Platform usage is included.

| Example run | Rows | Price |
|---|---|---|
| 20 newest posts of one profile (the prefilled input) | 20 | $0.035 |
| 1,000 posts of a news community | 1,000 | $1.505 |
| All 1,012 comments of a busy post | 1,012 | $1.52 |
| 500 community search results | 500 | $0.755 |

Profiles, communities or posts that do not exist or are hidden produce no rows and cost nothing beyond the start fee.

### Input

| Field | Description | Example |
|---|---|---|
| `mode` | `posts`, `comments`, `details` or `communitySearch`. | `"posts"` |
| `targets` | Profiles and communities: handle, page URL (vk.com or vk.ru), `id123`, `club123` / `public123`, numeric id (communities as `-123`). Wall posts mode also takes post links. | `["durov", "https://vk.com/vk", "club1"]` |
| `postedAfter` / `postedBefore` | Date window (UTC) — a date or a period such as `"7 days"`. | `"2026-11-01"`, `"7 days"` |
| `keyword` | Search inside each listed wall (VK's wall search). Not a search of all of VK. | `"Telegram"` |
| `includePinned`, `includeReposts` | Keep pinned posts and reposts (both on by default). | `true` |
| `maxPostsPerTarget` | Posts per wall, newest first (0 = all). In Comments mode: how many latest posts per wall get their comments read. | `100` |
| `postUrls` | Post links for Comments mode. | `["https://vk.com/wall-22822305_1739770"]` |
| `includeReplies` | Replies under each comment (on by default). | `true` |
| `includeCommenterNames` | Names of people who commented (off by default). | `false` |
| `maxCommentsPerPost` | Comments + replies per post (0 = all). | `500` |
| `searchQueries` | Words for Community search. | `["music", "футбол"]` |
| `includeCommunityDetails` | Description, website, status, published contacts and addresses for each community found (on by default). | `true` |
| `maxResultsPerQuery` | Communities per search (0 = as many as VK lists). | `100` |
| `maxResults` | Rows per run (0 = unlimited, capped at 10,000). | `100` |

### Output

One dataset per run; the row type follows the mode. Example rows (fictitious):

```json
{
    "postId": "-100000001_4521",
    "postUrl": "https://vk.com/wall-100000001_4521",
    "ownerId": -100000001,
    "ownerType": "community",
    "ownerHandle": "example_club",
    "ownerName": "Example Football Club",
    "authorId": -100000001,
    "authorType": "community",
    "authorName": "Example Football Club",
    "signerId": null,
    "publishedAt": "2026-11-18T09:30:00Z",
    "editedAt": null,
    "text": "Season tickets are on sale from today!",
    "isPinned": false,
    "isRepost": false,
    "isAd": false,
    "likesCount": 1520,
    "commentsCount": 87,
    "repostsCount": 34,
    "viewsCount": 48210,
    "reactionsText": "Like:1400, Love:80, Haha:40",
    "attachmentTypes": ["photo", "link"],
    "photoUrls": ["https://sun9-1.userapi.com/example.jpg"],
    "videoUrls": [],
    "linkUrls": ["https://example.com/tickets"],
    "repostOfPostId": null,
    "repostOfPostUrl": null,
    "repostOfOwnerId": null,
    "repostOfText": null,
    "repostOfPublishedAt": null,
    "sourceInput": "example_club",
    "scrapedAt": "2026-11-18T10:00:00.000Z"
}
```

```json
{
    "commentId": "-100000001_4530",
    "commentUrl": "https://vk.com/wall-100000001_4521?reply=4530&thread=4527",
    "postId": "-100000001_4521",
    "postUrl": "https://vk.com/wall-100000001_4521",
    "parentCommentId": "-100000001_4527",
    "replyToCommentId": "-100000001_4527",
    "depth": 1,
    "threadRepliesCount": null,
    "authorId": 100000002,
    "authorType": "user",
    "authorUrl": "https://vk.com/id100000002",
    "authorName": null,
    "publishedAt": "2026-11-18T09:41:12Z",
    "text": "@id100000003, see you at the stadium!",
    "likesCount": 3,
    "attachmentTypes": [],
    "photoUrls": [],
    "sourceInput": "https://vk.com/wall-100000001_4521",
    "scrapedAt": "2026-11-18T10:00:00.000Z"
}
```

```json
{
    "pageId": -100000001,
    "pageType": "community",
    "handle": "example_club",
    "url": "https://vk.com/example_club",
    "name": "Example Football Club",
    "isVerified": false,
    "isClosed": false,
    "deactivated": null,
    "followersCount": 25400,
    "communityType": "page",
    "activity": "Sport",
    "description": "News and photos of the example football club.",
    "site": "example.com",
    "phone": "8 (800) 000-00-00",
    "status": "Season tickets on sale",
    "photoUrl": "https://sun9-2.userapi.com/example.jpg",
    "coverUrl": "https://sun9-3.userapi.com/example-cover.jpg",
    "contactsCount": 2,
    "contactRoles": ["Press office", "Tickets"],
    "contactEmails": ["press@example.com"],
    "contactPhones": ["+7 900 000-00-00"],
    "addressesCount": 2,
    "addressText": "Example street 1",
    "addressCity": "Moscow",
    "addressCountry": "Russia",
    "latitude": 55.75216,
    "longitude": 37.591304,
    "addressPhone": "+7 (495) 000-00-00",
    "workingHours": "Mon-Fri 10:00-22:00; Sat-Sun 11:00-20:00",
    "allAddresses": ["Example Stadium, Example street 1, Moscow", "Example Club Shop, Second street 5, Tver"],
    "searchQuery": "football",
    "searchPosition": 3,
    "sourceInput": "football",
    "scrapedAt": "2026-11-18T10:00:00.000Z"
}
```

All fields are described in the dataset schema; the Output tab has table views for posts, comments and pages. Inputs that could not be read (hidden walls, private profiles, unknown handles, deleted posts) are listed in the run's key-value store under **ERRORS** with the reason.

### Tips and tricks

- **What is complete.** A wall is read newest first down to its first post (or your date window); comments are read to the last reply of the last thread. Keyword search inside a wall returns the wall owner's own posts that VK's wall search finds. On community walls VK's own wall search is used; on personal profiles the newest 2,000 posts are checked (text, reposted text and attachment titles, case-insensitive) and a note under ERRORS says so when the wall is longer. Community search returns VK's ranked list (several hundred communities for a common word), not every community that mentions the word. VK sometimes refuses further pages of a search for a while; the Actor then keeps the communities already found, notes it under ERRORS and finishes normally — run the search again later for more.
- **There is no search of all VK posts** without logging in. To follow a topic, list the communities that write about it (find them with Community search) and use **Keyword** in Wall posts mode.
- **Hidden content.** Walls that VK hides from logged-out visitors, private profiles and closed communities cannot be read; they are listed under ERRORS. The Actor never logs in.
- **Post links** (`https://vk.com/wall-1_2`, also the `?w=wall-1_2` form) are returned whatever the date window, pinned or repost settings.
- **IDs.** Profiles have positive ids, communities negative ones (`ownerId`, `pageId`) — the same convention VK uses in post links.
- **Comments turned off.** Posts whose comments are turned off are listed under ERRORS ("Comments are turned off for this post"); a run made only of such posts ends normally with no rows.
- **Views** are not shown by VK for many older posts — `viewsCount` is `null` then. `commentsCount` is 0 also when comments are turned off.
- **Contacts and addresses.** Community rows carry the contact channels the community publishes (`contactEmails`, `contactPhones`, `contactRoles`) and its main address with coordinates, phone and opening hours; communities with several addresses also list them all in `allAddresses` (up to 100). Community rows also carry the page phone (`phone`) and the cover image (`coverUrl`); city and country names are in Russian, like the street text. Profile rows have these keys empty. Communities with addresses cost one extra request each.
- **Reactions.** `likesCount` is the total of all reactions; `reactionsText` splits it by type in VK's order.

### Scheduling

Schedule the Actor (for example daily) with **Posted after** set to a period slightly longer than the schedule interval (e.g. `"2 days"` for a daily run). Rows carry stable ids (`postId`, `commentId`, `pageId`), so downstream tools can de-duplicate the small overlap. The Actor keeps nothing between runs — no named storage is created in your account.

### Personal data

VK profiles and comments belong mostly to private people. By default the Actor returns commenters only as a numeric id and a profile link (no names; people mentioned in comment text appear as `@id…`); turn on **Include commenter names** only when you need them. Profile rows contain only the name, handle, link, verification mark, follower count, closed / deactivated state, website, status line and photo — never birthday, gender, city, country, career or online status. Post texts are returned as written and can themselves contain personal data. Community contacts are reduced to contact roles, e-mails and phones only — never the contact person (no name, id or profile link of whoever is listed as a contact). Contact roles are kept only when they describe a job role (e.g. "Press office", "Advertising", "Booking", "Concert director"); free-text notes, names and dates are dropped. Make sure you have a legitimate purpose when you process personal data.

### Integrations

Export the dataset as JSON, CSV, Excel or XML, or connect it to Google Sheets, Zapier, Make, Slack, Airbyte or your own code through the Apify API and webhooks. Each run has table views for posts, comments and profiles / communities.

# Changelog

This Actor's version history is a separate document: https://apify.com/teodor_banea/vk-scraper/changelog.md

# Actor input Schema

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

Choose what the run collects. Posts: wall posts of profiles and communities (or the posts you link). Comments: comments and replies of posts. Details: one row per profile or community. Community search: communities matching your words.

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

Enter VK profiles or communities, one per line: a handle (durov), a page URL (https://vk.com/vk, vk.ru works too), club123 / public123 / id123, or a numeric id (communities as -123). In Wall posts mode you can also paste post links (https://vk.com/wall-22822305_1). In Comments mode, profiles and communities give the comments of their latest posts. Up to 1,000 per run.

## `postedAfter` (type: `string`):

Keep only posts published on or after this date (UTC), or within a recent period such as "7 days". Walls are read newest first, so this also makes the run faster. Useful for scheduled runs.

## `postedBefore` (type: `string`):

Keep only posts published before this date (UTC). For an old date the Actor jumps straight to that part of the wall.

## `keyword` (type: `string`):

Return only the posts of each profile or community above that contain this word or phrase (VK's own wall search). This is a search inside the walls you list, not a search of all of VK. Keyword searches are slower (a few seconds per 100 posts).

## `includePinned` (type: `boolean`):

Include the post pinned at the top of a wall (it can be older than the rest).

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

Include posts that share another post (the original's id, link, text and date are in the repostOf… fields).

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

Limit the posts taken from each wall (newest first). In Comments mode: how many of the latest posts of each wall have their comments read. Set to 0 for all.

## `postUrls` (type: `array`):

Enter the post links whose comments you want (https://vk.com/wall-22822305_1739770 or https://vk.com/vk?w=wall-22822305_1739770). Up to 2,000 per run.

## `includeReplies` (type: `boolean`):

Also return the replies under each comment (whole threads, with parentCommentId).

## `includeCommenterNames` (type: `boolean`):

Fill authorName for comments written by people (and keep their names in @mentions). Off by default for privacy: authorId and authorUrl are always given. Community authors always keep their name.

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

Limit the comments (top-level plus replies) taken from each post. Set to 0 for all.

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

Enter words to find communities (groups, public pages and events), one search per line, in any language (e.g. music, футбол). Results come in VK's own order.

## `includeCommunityDetails` (type: `boolean`):

Add description, website, status, published contact e-mails / phones / roles and addresses (coordinates, phone, opening hours) to each community found. Costs one extra request per 20 communities, plus one per community that shows addresses.

## `maxResultsPerQuery` (type: `integer`):

Limit the communities taken from each search query. Set to 0 for as many as VK lists.

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

Limit the total rows of the run. 0 = unlimited (capped at 10,000 to prevent a surprise bill).

## Actor input object example

```json
{
  "mode": "posts",
  "targets": [
    "durov",
    "https://vk.com/vk",
    "club1",
    "https://vk.com/wall-22822305_1739770"
  ],
  "keyword": "Telegram",
  "includePinned": true,
  "includeReposts": true,
  "maxPostsPerTarget": 100,
  "postUrls": [
    "https://vk.com/wall-22822305_1739770"
  ],
  "includeReplies": true,
  "includeCommenterNames": false,
  "maxCommentsPerPost": 500,
  "searchQueries": [
    "music",
    "футбол"
  ],
  "includeCommunityDetails": true,
  "maxResultsPerQuery": 100,
  "maxResults": 20
}
```

# Actor output Schema

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

Every row of the run as JSON.

## `posts` (type: `string`):

Wall post rows.

## `comments` (type: `string`):

Comment rows.

## `pages` (type: `string`):

Profile and community rows.

## `resultsCsv` (type: `string`):

The same rows as a CSV download.

## `errors` (type: `string`):

Inputs that could not be read and why. Only present when something went wrong.

# 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": [
        "durov"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("teodor_banea/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": ["durov"],
    "maxResults": 20,
}

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

```

## MCP server setup

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