# VK Posts Scraper | VKontakte Groups & Comments | Official API (`solidrows/vk-posts-scraper`) Actor

Парсер ВК (ВКонтакте): scrape public VK posts from groups, communities, profiles and post links, search posts by keyword, add comments with replies. Likes, reposts and views. Official VK API, no login. Filters before you pay, only-new monitoring. Never a silent empty run.

- **URL**: https://apify.com/solidrows/vk-posts-scraper.md
- **Developed by:** [SolidRows](https://apify.com/solidrows) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 6 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.75 / 1,000 post scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Posts Scraper --- Communities, Profiles, Comments & Search (Па�-се�- ВК)

Scrape public **VKontakte (VK)** posts, comments and community info without a login, a browser or cookies. Па�-се�- ВК: посты сообществ и п�-офилей, коммента�-ии с ответами, поиск по ключевым словам, счётчики лайков, �-епостов, коммента�-иев и п�-осмот�-ов. Export to JSON, CSV, Excel or via API.

### Why this scraper

- **Official VK API.** The data comes from the documented VK API, not from page parsing. No HTML to break, no captcha, no blocked IPs, no login.
- **Full counters, including views.** Likes, reposts, comments and views for every post.
- **Fast.** Up to 500 posts are fetched per API request batch. 200 posts take a few seconds.
- **Posts, comments and communities in one run.** Add comments with threaded replies and an optional community info row (members, description, verification, site, city).
- **Cheap to monitor.** Date range, min likes/views, keyword and ad filters are applied *before* saving, so you pay only for rows you keep. "Only new posts" mode returns just the fresh posts on every scheduled run.
- **Any VK address.** Links (vk.com, m.vk.com, vk.ru), short names, `club123`, `public123`, `id123`, numeric ids and direct post links.
- **Search VK by keyword or #hashtag** across all public posts, with a date range.
- **Honest errors.** A private, deleted or misspelled community becomes a free `error` row; the run fails only if *every* input is unreadable.

### Use cases

- Competitor and brand monitoring in Russian-language social media.
- Engagement analytics: which posts of a community get views, likes and reposts.
- Influencer and community research: members, verification, posting frequency.
- Public opinion research from post comments.
- Archiving a community wall, building datasets for NLP and LLM work.
- Alerts on new posts and mentions (schedule the Actor with "Only new posts").

### Input

| Field | Type | Description |
|---|---|---|
| `sources` | array | Communities, profiles or post links: `https://vk.com/rbc`, `vk.com/club1`, `public123`, `id1`, short name `rbc`, `-25232578` (community id), post link `vk.com/wall-25232578_19140887`. |
| `searchQueries` | array | Keywords, phrases or `#hashtags` to search across public VK posts (max about 1 000 results per query, VK limit). |
| `maxPostsPerSource` | integer | Max saved posts per source or query. Default 100. |
| `dateFrom`, `dateTo` | string | `2026-11-01`, ISO date-time or relative (`7 days`, `1 month`). |
| `postsFilter` | enum | `all`, `owner` (posts by the community itself) or `others`. |
| `includePinned` | boolean | Keep the pinned post. Default true. |
| `skipAds` | boolean | Skip posts marked as advertising. |
| `minLikes`, `minViews` | integer | Keep only posts above the thresholds. |
| `includeWords`, `excludeWords` | array | Keep posts whose text contains any / none of these words. |
| `onlyNewPosts` | boolean | Monitoring mode: return only posts not delivered by earlier runs. |
| `includeComments` | boolean | Add comments as separate rows. |
| `maxCommentsPerPost` | integer | Comment limit per post, replies included. Default 50. |
| `includeReplies` | boolean | Include replies in comment threads. Default true. |
| `commentsSort` | enum | `asc` (oldest first) or `desc`. |
| `includeCommunityInfo` | boolean | Add one info row per community or profile. |
| `maxPostsToScan` | integer | Safety limit for how deep a wall is read when filters are strict. Default 5000. |

```json
{
    "sources": ["https://vk.com/rbc"],
    "maxPostsPerSource": 20
}
```

Comments and community info:

```json
{
    "sources": ["vk.com/rbc", "vk.com/lentach"],
    "maxPostsPerSource": 100,
    "dateFrom": "7 days",
    "minViews": 10000,
    "includeComments": true,
    "maxCommentsPerPost": 100,
    "includeCommunityInfo": true
}
```

### Output

Every row has a `type`: `post`, `comment`, `community` or `error`. Filter the dataset by `type` or use the Overview table view.

Post:

```json
{
    "type": "post",
    "id": 19140887,
    "ownerId": -25232578,
    "postUrl": "https://vk.com/wall-25232578_19140887",
    "date": "2026-11-11T12:30:00.000Z",
    "text": "Куда пойти в нояб�-е? Афиша ме�-оп�-иятий от РБК ...",
    "likes": 11,
    "reposts": 0,
    "comments": 8,
    "views": 49518,
    "isPinned": true,
    "isAd": false,
    "postType": "post",
    "hashtags": [],
    "images": ["https://sun9-38.userapi.com/..."],
    "attachments": [{ "type": "photo", "url": "https://sun9-38.userapi.com/...", "width": 1280, "height": 720 }],
    "copyHistory": [],
    "signerId": null,
    "source": { "id": -25232578, "name": "РБК", "screenName": "rbc", "url": "https://vk.com/rbc", "kind": "community" },
    "scrapedAt": "2026-11-16T12:00:00.000Z"
}
```

Comment: `id`, `postUrl`, `commentUrl`, `date`, `text`, `likes`, `authorId`, `authorName`, `authorUrl`, `replyToId`, `parentId` (top-level comment id for replies), `repliesCount`.

Community: `name`, `screenName`, `url`, `membersCount` (or `followersCount` for users), `description`, `status`, `verified`, `site`, `activity`, `city`, `country`, `isClosed`.

Attachments are normalized: photos (best-quality URL), videos (id, link, title, duration, views, preview), links, documents, audio titles, polls, albums, market items and articles. Reposts carry the original post in `copyHistory`.

### Use with AI agents (MCP)

AI agents (Claude, ChatGPT, Cursor, n8n AI Agent and others) can call this Actor as a tool through the Apify MCP server:

```text
https://mcp.apify.com?tools=solidrows/vk-posts-scraper
```

The tool returns public VK posts, comments and community stats. All input fields are optional except the ones in the examples, and every field has a safe default, so a minimal input is enough:

- Latest posts of a community: `{"sources": ["vk.com/rbc"], "maxPostsPerSource": 20}`
- Posts mentioning a keyword in the last week: `{"searchQueries": ["apify"], "dateFrom": "7 days", "maxPostsPerSource": 50}`
- A post with its comments: `{"sources": ["vk.com/wall-25232578_19140887"], "includeComments": true}`

Rows come back as flat JSON with a `type` field. Rows with an `error` field are free and explain what went wrong, so the agent can correct the input and retry.

### Pricing

Pay per event, only for rows saved to the dataset. Filtered-out posts and error rows are free.

| Event | Price per 1,000 |
|---|---|
| `post` --- one saved post | $2.50 |
| `comment` --- one saved comment or reply | $1.50 |
| `community` --- one community info row | $2.00 |
| Run start | $0.00005 per run |

Example: 10,000 posts from 20 communities cost about $25; adding 50,000 comments adds $75.

### Limits (honest)

- **Only public data.** Private or closed communities and profiles, hidden walls and closed comments are not available. They are reported as free `error` rows.
- **VK API limits.** Search returns at most about 1 000 posts per keyword. Rate limits apply to the whole service; if VK throttles the shared key the run slows down, and in the rare case the limit is exhausted the run stops gracefully and keeps what was saved.
- **Likes on comments** are not always returned by VK for the service key; the field can be empty.
- **Comment author names** are the public names VK returns. Phone numbers and e-mails are never collected.
- Views are shown by VK for most community posts; for some profile posts the value is empty.
- A plain positive number is treated as a user id; use `club123`, `public123` or a negative number for communities.

### Feedback and support

- **Did it save you time?** A [rating on the Store page](https://apify.com/solidrows/vk-posts-scraper/reviews) helps other users find this Actor. It takes 10 seconds.
- **Something wrong or missing?** [Open an issue](https://apify.com/solidrows/vk-posts-scraper/issues) with the input you used. We answer within 48 hours and fix broken runs first.
- **Never a silent empty run.** If the site blocks us and nothing is scraped, the run fails with a clear message and no results are charged.

### FAQ

**Do I need a VK account or token?** No. The Actor uses its own access to the public VK API.

**Can I scrape a profile wall?** Yes, if the profile is public (`vk.com/id1`, `vk.com/durov`).

**How do I get only new posts every day?** Turn on `onlyNewPosts` and schedule the Actor. Each source remembers the posts already delivered.

**Why did a post count as filtered out?** Posts that fail the date, likes, views, ads or keyword filters are not saved and not billed.

**Can I use it through the API or from Python/JS?** Yes, as any Apify Actor, including Make, Zapier, n8n and Google Sheets integrations.

# Actor input Schema

## `sources` (type: `array`):

One per line. Accepts links (vk.com/rbc, vk.com/club1, vk.com/public123, vk.com/id1, m.vk.com, vk.ru), short names (rbc), club123 / public123 / id123, a negative number for a community (-25232578) or a positive number for a user, and direct post links (vk.com/wall-25232578_19140887 or ?w=wall...).

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

Find public posts across all of VK by keyword, phrase or #hashtag, newest first. VK returns at most about 1 000 results per query. Combine with the date range to cut the noise.

## `maxPostsPerSource` (type: `integer`):

Stop after this many saved posts for each community, profile or search query. Posts rejected by the filters below do not count.

## `dateFrom` (type: `string`):

Only posts published on or after this moment. Use 2026-11-01, a full ISO date-time, or a relative value such as 7 days, 2 weeks, 1 month.

## `dateTo` (type: `string`):

Only posts published on or before this date (2026-11-15 includes the whole day). Relative values work too.

## `postsFilter` (type: `string`):

For community walls: keep posts published by the community itself, or only the ones other users posted on its wall.

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

VK always returns the pinned post first, even when it is old. Turn off to skip it.

## `skipAds` (type: `boolean`):

Skip posts that VK marks as advertising.

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

Keep only posts with at least this many likes. 0 = no limit.

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

Keep only posts with at least this many views. 0 = no limit.

## `includeWords` (type: `array`):

Keep only posts whose text contains at least one of these words or phrases (case-insensitive). Empty = no filter.

## `excludeWords` (type: `array`):

Drop posts whose text contains any of these words or phrases (case-insensitive).

## `onlyNewPosts` (type: `boolean`):

Remember the posts already delivered and return only new ones on the next run. Schedule the Actor and every run returns just the fresh posts. The memory is kept per community or search query in the key-value store vk-posts-scraper-state.

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

Also save comments of every saved post. Names are the public names VK returns for the author.

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

Upper limit of comments (including replies) saved for each post.

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

Also save replies inside comment threads. Each reply has parentId set to the top-level comment.

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

Order of the top-level comments.

## `includeCommunityInfo` (type: `boolean`):

Save one extra row per community or profile with members/followers, description, verification, site, activity, city and country. Billed as a separate event.

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

Safety limit for how deep the Actor reads a wall while looking for posts that pass the filters. Raise it for very long walls with strict filters.

## Actor input object example

```json
{
  "sources": [
    "https://vk.com/rbc"
  ],
  "searchQueries": [],
  "maxPostsPerSource": 20,
  "postsFilter": "all",
  "includePinned": true,
  "skipAds": false,
  "minLikes": 0,
  "minViews": 0,
  "onlyNewPosts": false,
  "includeComments": false,
  "maxCommentsPerPost": 50,
  "includeReplies": true,
  "commentsSort": "asc",
  "includeCommunityInfo": false,
  "maxPostsToScan": 5000
}
```

# Actor output Schema

## `results` (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 = {
    "sources": [
        "https://vk.com/rbc"
    ],
    "searchQueries": [],
    "maxPostsPerSource": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidrows/vk-posts-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 = {
    "sources": ["https://vk.com/rbc"],
    "searchQueries": [],
    "maxPostsPerSource": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("solidrows/vk-posts-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 '{
  "sources": [
    "https://vk.com/rbc"
  ],
  "searchQueries": [],
  "maxPostsPerSource": 20
}' |
apify call solidrows/vk-posts-scraper --silent --output-dataset

```

## MCP server setup

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