Apify actor · whoareyouanas/vk-posts-scraper
VK Posts Scraper
Collect VK wall posts from supported profiles or communities. Use public HTML for basic text and media, or a VK access token for API-backed engagement, author, and comment data.
Documentation checked 2026-10-29 · deployed build 1.0.2 · run through your Apify account
01 / Overview
Match the actor to the job.
Two extraction modes
Choose public HTML access or supply your own VK token for richer API data.
Target and date controls
Limit targets, post counts, and publication windows for a focused sample.
Media and repost context
Keep source URLs, attachment information, available engagement, and repost relationships.
02 / Input
Start with a clear, bounded input.
vkTargets is required. The bounded example uses HTML mode; add your own accessToken when your workflow needs API-backed counters or comments. A token must have appropriate permissions for the wall.
{
"vkTargets": [
"https://vk.com/vkvideo"
],
"maxItems": 10,
"postsPerTarget": 10,
"includeComments": false
}Replace example targets and credential placeholders before running. These are documentation examples, not a promise of currently available source results.
| Field | Type / required | Default | Purpose |
|---|---|---|---|
| vkTargets | arrayRequired | Not specified | VK walls to scrape. Accepts a public handle (durov), a profile or community URL (https://vk.com/kinopoisk), a signed owner ID (-40316705), or a direct post link (https://vk.com/wall1_45678). |
| accessToken | string | Your credential | VK API access token with the wall scope. Strongly recommended: with a token the Actor uses the official VK API and returns every field (attachment URLs, view counts, exact timestamps, repost chains, comments). Without one it falls back to limited public HTML scraping. |
| maxItems | integer | 50 | Hard cap on the number of posts stored across all targets. Raise it for a full crawl, and raise the Actor's run timeout with it - the run stops early rather than overrunning its timeout. Minimum: 1 |
| postsPerTarget | integer | Not specified | Optional per-target cap. Leave empty to let each target use the shared budget. Minimum: 1 |
| includeComments | boolean | false | Fetch comment threads (including replies) for every post. Requires an access token and makes the run noticeably slower. |
All other input controls (8)
| Field | Type / required | Default | Purpose |
|---|---|---|---|
| publishedAfter | string | Not specified | Only keep posts published at or after this date. YYYY-MM-DD or a full ISO-8601 timestamp. Pagination stops once older posts are reached. |
| publishedBefore | string | Not specified | Only keep posts published at or before this date. A bare YYYY-MM-DD includes the whole day. |
| postFilter | string | "all" | Which posts to read from the wall. API mode only. Options: all, owner, others |
| maxComments | integer | 100 | Upper bound on comments fetched per post when "Include comments" is on. Minimum: 1 |
| keepUndatedPosts | boolean | false | Without an access token VK sometimes hides a post's date. By default such posts are dropped when a date filter is set, because they cannot be checked against it. Turn this on to keep them (their postedAt will be null and they may fall outside your date range). |
| htmlTimezone | string | "Europe/Moscow" | Only used without an access token. VK prints post times in the viewer timezone, so the browser is pinned to this zone and the printed times are interpreted in it. Change it only if you want timestamps resolved as another region would see them. |
| includeRawPost | boolean | false | Attach the unmodified VK API object as rawPost on every item. Useful for fields this Actor does not map yet. |
| proxyConfiguration | object | {"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"]} | VK blocks most datacenter IP ranges. Residential proxies are used by default. |
03 / Output
Know what each returned row represents.
- HTML mode can return text, dates, and media while individual engagement counters remain null.
- Token-backed API mode exposes more author, engagement, and comment detail when available. Missing values must not be replaced with guessed counts.
{
"postId": "-220754053_278663",
"ownerId": -220754053,
"text": "Попали под чары Лены Журавлёвой и даже не сопротивляемся…",
"postedAt": "2026-08-13T12:03:00.000Z",
"sourceUrl": "https://vk.com/wall-220754053_278663",
"stats": {
"likes": 1240,
"comments": 87,
"reposts": 33,
"views": 98000,
"engagement": 1360
},
"mediaTypes": [
"photo"
],
"mediaCount": 6,
"thumbnailUrls": [],
"thumbnailCount": 0,
"attachments": [
{
"type": "photo",
"id": "-220754053_457265754",
"url": "https://vk.com/photo-220754053_457265754"
}
],
"isRepost": false,
"repostChain": [],
"target": "https://vk.com/vkvideo",
"targetType": "url",
"scrapedAt": "2026-08-15T19:06:24.168Z"
}Example values illustrate the published contract. Available fields and populated values depend on the source, mode, and result status.
Fields in the documented output view
postedAt
Published
text
Text
stats
stats
mediaTypes
Media
mediaCount
Files
thumbnailCount
Thumbnails
isRepost
Repost
sourceUrl
Post URL
Output views select columns. They do not necessarily filter record types or exhaust the full JSON payload. Use structured JSON when you need nested arrays or objects.
Dataset links and run artifacts (1)
- Results
- Available through the actor's Output tab for your run.
04 / Pricing
Understand the billable unit.
These are the active public event prices checked on 2026-10-29, in USD. They describe each event, not a universal flat price for a run. Confirm your current Apify plan and run budget before starting.
| Billable event | Rate (USD) | When it applies |
|---|---|---|
Actor Start apify-actor-start | $0.00005 / event | Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). Start units depend on allocated memory: one event per GB, with at least one event. |
result apify-default-dataset-item | $0.004 / event | Single result in the default dataset. $4.00 per 1,000 of this event. Other events and separate services are additional. |
- Review the current dataset-result and startup events below.
- Use maxItems and date bounds to control scope; token-backed collection and public HTML can have different runtime behavior.
A result limit and a spending cap are different controls. Account charges, applicable taxes, and separately billed providers or proxies must be considered where relevant. A cap setting is not a minimum invoice charge.
05 / API & automation
Use the same input from your workflow.
Test a small run in Apify Console, inspect its records and charges, then save a task or call the actor from your own application. Keep your Apify token in an environment variable. Source-specific credentials, if required, are separate from the Apify API token.
# Save the input example as input.json and set APIFY_TOKEN.
# This request starts an asynchronous, potentially billable run.
curl --request POST \
'https://api.apify.com/v2/acts/whoareyouanas~vk-posts-scraper/runs' \
--header "Authorization: Bearer $APIFY_TOKEN" \
--header 'Content-Type: application/json' \
--data @input.jsonThe response identifies the run. Wait for it to finish, inspect its status, and use its default dataset and key-value store to retrieve results. A successful run can still contain partial or failed records; check the output contract above before continuing downstream.
Coverage & interpretation
Check the result before relying on it.
- Public HTML markup does not consistently expose all counters, authors, or comments.
- Large targets on short run timeouts can return partial walls. Token access does not guarantee every source field.
Questions
Before you build an integration.
What do I need to provide?
vkTargets is required. The bounded example uses HTML mode; add your own accessToken when your workflow needs API-backed counters or comments. A token must have appropriate permissions for the wall.
What should I check in the output?
- HTML mode can return text, dates, and media while individual engagement counters remain null.
- Token-backed API mode exposes more author, engagement, and comment detail when available. Missing values must not be replaced with guessed counts.
How do I budget the run?
- Review the current dataset-result and startup events below.
- Use maxItems and date bounds to control scope; token-backed collection and public HTML can have different runtime behavior.
Keep exploring