# VK Comments Scraper – Post Discussions & Replies (`scrapingmonkey/vk-post-comments-scraper`) Actor

Collect public VK post comments with authors, dates, likes, available reply relationships, and parent-post context. Control comment pages and export one row per comment.

- **URL**: https://apify.com/scrapingmonkey/vk-post-comments-scraper.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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.
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?

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

Collect comments from public VK posts, including reply relationships when they are visible in the returned pages. **VK Post Comments Scraper** saves each collected comment with its text, author, date, likes, and parent-post context.

Use it to research audience feedback, organize public discussions, or compare responses to a selected content sample. Control the number of comment pages requested for each post and export the results as individual rows.

| At a glance | Details |
|---|---|
| 📥 Input | Full VK post URLs |
| 📤 Output | One row per collected comment, including parent-post details |
| 💬 Replies | Replies exposed in the requested pages, with available parent and reply-to fields |
| 📄 Pagination | Configurable comment-page budget; VK controls the number returned |
| 🔐 Login required | No VK credentials or cookies |

### What the VK comments scraper collects 💬

Available comment data includes:

- Composite comment ID, numeric comment ID, parent post ID, and comment URL
- Comment text, publication timestamp, UTC date, and visible date text
- Author ID, name, profile link, and avatar
- Public like count
- Parent-comment reference and reply-to author when exposed
- An indicator for comments written by the post's author
- Available comment attachments
- The parent post's text, author, counts, attachments, and supplied repost context

Visible replies are saved as comment rows. Deleted-comment placeholders are skipped. The Actor does not separately open every hidden thread or promise the complete reply tree.

### How to scrape VK post comments 🚀

1. Add the full URLs of the public posts you want to inspect.
2. Set `pagesPerPost` to the comment-page budget for each post.
3. Run the Actor and review collected comments and any failed results.
4. Export the dataset or group comments by `post_id` in your analysis.

```json
{
  "inputList": [
    "https://vk.ru/wall-22822305_1721576"
  ],
  "pagesPerPost": 2
}
```

Duplicate comment IDs are removed within each post's pagination. Accepted URL variants pointing to the same post share the same collection target.

### VK comment fields and output 📦

| Field group | Included data |
|---|---|
| Comment identity | IDs, permalink, input, status, text, dates, and timestamp |
| Author and reactions | Author identity, avatar, and public like count |
| Reply context | Parent-comment ID, reply-to author, and post-author indicator |
| Comment media | Available attachment links, titles, and previews |
| Parent post | Post identity, text, author, dates, counts, media, and supplied repost details |

Complete illustrative output item with all 54 fields. The comment, post, and values below are fictional examples, not a live result:

```json
{
  "input": "https://vk.ru/wall-12345678_250",
  "status": "success",
  "url": "https://vk.ru/wall-12345678_250?reply=251",
  "id": "-12345678_251",
  "comment_id": 251,
  "post_id": "-12345678_250",
  "text": "Thanks for sharing the workshop schedule!",
  "date": "2026-09-08T11:10:00Z",
  "timestamp": 1788865800,
  "date_text": "8 сен 2026 в 14:10",
  "author.id": 123456789,
  "author.name": "Alex Morgan",
  "author.url": "https://vk.ru/sample.creator",
  "author.avatar_url": "https://example.com/avatar-400.jpg",
  "likes_count": 3,
  "parent_comment_id": "",
  "reply_to.author_id": 0,
  "reply_to.author_name": "",
  "is_from_post_author": false,
  "attachments.path": [],
  "attachments.value": [],
  "post.url": "https://vk.ru/wall-12345678_250",
  "post.id": "-12345678_250",
  "post.owner_id": -12345678,
  "post.text": "Our next photography workshop takes place this Saturday. See the schedule on our website.",
  "post.date": "2026-09-08T11:00:00Z",
  "post.author.id": -12345678,
  "post.author.name": "Example Photography Workshop",
  "post.author.url": "https://vk.ru/sample.workshop",
  "post.author.avatar_url": "https://example.com/community-400.jpg",
  "post.likes_count": 84,
  "post.comments_count": 12,
  "post.reposts_count": 7,
  "post.views_count": 2400,
  "post.attachments.path": [
    "/0/type",
    "/0/id",
    "/0/owner_id",
    "/0/album_id",
    "/0/text",
    "/0/timestamp",
    "/0/url",
    "/0/width",
    "/0/height",
    "/0/thumbnails/0/url",
    "/0/thumbnails/0/width",
    "/0/thumbnails/0/height",
    "/0/thumbnails/0/type"
  ],
  "post.attachments.value": [
    "photo",
    987654321,
    -12345678,
    -7,
    "Workshop studio",
    1788865200,
    "https://example.com/workshop-photo.jpg",
    1280,
    853,
    "https://example.com/workshop-photo.jpg",
    1280,
    853,
    "x"
  ],
  "post.post_id": 250,
  "post.author_id": -12345678,
  "post.timestamp": 1788865200,
  "post.date_text": "8 сен 2026 в 14:00",
  "post.reposted_posts.path": [],
  "post.reposted_posts.value": [],
  "post.post_type": "post",
  "post.signer_id": 0,
  "post.is_pinned": false,
  "post.is_ad": false,
  "post.is_favorite": false,
  "post.can_like": false,
  "post.can_comment": false,
  "post.can_repost": false,
  "post.copyright.path": [
    "/name",
    "/link"
  ],
  "post.copyright.value": [
    "Example Photography Workshop",
    "https://example.com/workshops"
  ],
  "post.geo.path": [],
  "post.geo.value": []
}
```

Each comment occupies one row in one table. JSON uses the same literal field names, including `author.name` and `post.text`. Parent-post details repeat on each comment so the row keeps its context.

Attachments and variable parent-post sections use matching path/value lists. For example, `post.attachments.path` identifies each attachment field and `post.attachments.value` holds the corresponding value at the same position. These details remain in the comment row.

An ordinary top-level comment can have empty parent and reply-to fields. Successful rows can use empty strings, empty lists, `0`, or `false` for omitted information. Failed results retain `input`, set `status` to `failed`, and use `null` for the comment and post-data fields.

### Input requirements and comment coverage ⚙️

| Parameter | Type | Default | Rules |
|---|---|---|---|
| `inputList` | array of strings | Required | At least one full VK post URL |
| `pagesPerPost` | integer | `1` | Minimum 1; no fixed upper limit |

VK.ru and VK.com links are accepted, including subdomains. Supported forms include direct `/wallOWNER_ID_POST_ID` links and URLs containing a `w` or `wall` post reference. A comment link with a supported post reference selects that post's comments, not only the linked comment.

Page offsets advance by 40, but this is not a promise of 40 saved comments per page. VK controls the response size and visible reply coverage. A single response can contain the entire available discussion. Requests stop when the reported total has been collected, the next page adds no new comments, or no continuation is available, even if the page budget is higher.

If a page has no comments and none have been saved yet, the Actor records a failed row for the post. Pages with no new comments after successful collection add no failure. A page can include fewer comments than the public count suggests.

### VK comment data use cases 🎯

#### Audience-feedback research

Collect public responses to selected announcements or campaigns and retain the post text alongside each comment.

#### Discussion organization

Use available parent and reply-to fields to distinguish replies from top-level comments without assuming all hidden threads were collected.

#### Engagement analysis

Compare visible comment text, like counts, and author context across a defined set of public posts.

#### Repeated comment collection

Schedule runs and compare composite comment IDs in your database to identify newly observed responses.

### Pricing and billable comment rows 💰

Check the Actor's **Pricing** tab for the current charging model and rate.

Under dataset-item pricing, each saved comment or failed row can count as a result. A post with no comments collected can produce a failed row. Duplicate comment IDs within the post's pagination are removed, and retries do not independently add rows.

Parent-post fields and attachments stay in the comment row. `pagesPerPost` limits requested pages, not an exact number of billable comments.

### VK comments API and integrations 🔌

Use the Actor ID from the API tab for `$ACTOR_ID` and your Apify token for `$APIFY_TOKEN`:

```bash
curl -X POST "https://api.apify.com/v2/acts/$ACTOR_ID/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"inputList":["https://vk.ru/wall-22822305_1721576"],"pagesPerPost":2}'
```

Run the Actor through REST, Apify client libraries, schedules, or webhooks. Send the default dataset to Google Sheets, Make, Zapier, a discussion-research database, or your own reporting workflow.

### Reliability and discussion limits ⚠️

The Actor processes up to five requests concurrently and retries temporary request failures. Invalid links, unavailable posts, and pages that remain blocked produce failed rows while other targets continue.

A later-page failure leaves any comments already saved in the dataset and adds a failed row for that post. Pagination and reply coverage depend on VK's public page controls, and visible totals can include comments the run does not receive.

Likes or dates can be missing. Recognized visible date text may be converted to a timestamp when no numeric time is supplied; the original text is also retained. Deleted, restricted, or hidden comments are not guaranteed to appear.

### Frequently asked questions ❓

#### Will two pages always return 80 comments?

No. Offsets advance by 40, but the number of returned comments and visible replies varies. Duplicate IDs and source limits can reduce the total.

#### Does it collect replies?

It saves replies exposed in the requested comment pages, including available parent and reply-to fields. It does not separately paginate every hidden reply thread.

#### Can I submit a link to a particular comment?

Yes, when the link contains a supported parent-post reference. The Actor collects comments from that post rather than only the selected comment.

#### Why did a post with no comments produce a failed row?

If no comments have been collected, an empty page is recorded as a failed result so the submitted post remains visible. Later pages with no new comments add no failure after successful collection.

#### Does it keep the original post's text?

Yes. Parent-post text, author, dates, counts, and available media context are included on each comment row.

### Support, responsible use, and related actors 🛟

For a reproducible issue, share the run ID, a public post URL, the page budget, and the expected behavior through the Actor's support channel.

Use public discussion data in accordance with applicable privacy, copyright, contractual, and platform requirements.

# Actor input Schema

## `inputList` (type: `array`):

Enter a full VK post URL per item. Direct /wall links, feed or profile links containing w=wall..., and comment links pointing to that post are accepted.

## `pagesPerPost` (type: `integer`):

Choose how many comment page requests to make for each post. VK controls how many comments appear in each response, and collection stops automatically when no more pages are available.

## Actor input object example

```json
{
  "inputList": [
    "https://vk.ru/wall-22822305_1721576"
  ],
  "pagesPerPost": 1
}
```

# Actor output Schema

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

One success Dataset row per unique VK comment, plus failed rows for inputs or pages that could not be processed.

# 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 = {
    "inputList": [
        "https://vk.ru/wall-22822305_1721576"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/vk-post-comments-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 = { "inputList": ["https://vk.ru/wall-22822305_1721576"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/vk-post-comments-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 '{
  "inputList": [
    "https://vk.ru/wall-22822305_1721576"
  ]
}' |
apify call scrapingmonkey/vk-post-comments-scraper --silent --output-dataset

```

## MCP server setup

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