Apify example task · whoareyouanas/vk-posts-scraper
Extract media links from public VK posts
Sample posts from the public Kinopoisk wall and open the media dataset view. Add your VK access token to retrieve richer attachment fields through the official API.
- Actor
- VK Posts Scraper - VKontakte Wall Posts & Comments
- Result limit
- 6 (maxItems)
- Estimated cost
- Up to $0.024
- Run options
- Actor defaults
Example updated 2026-11-20 · actor build 1.0.4 · runs in your own Apify account
01 / About the actor
VK Posts Scraper - VKontakte Wall Posts & Comments
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.
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
The exact input this example runs.
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.
{
"maxItems": 6,
"postsPerTarget": 5,
"includeRawPost": false,
"vkTargets": [
"kinopoisk"
],
"includeComments": false
}| Field | Value in this example | What it controls |
|---|---|---|
| maxItemsChange this | 6 | 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. |
| postsPerTargetChange this | 5 | Optional per-target cap. Leave empty to let each target use the shared budget. |
| includeRawPost | false | Attach the unmodified VK API object as rawPost on every item. Useful for fields this Actor does not map yet. |
| vkTargetsChange this | kinopoisk | 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). |
| includeCommentsChange this | false | Fetch comment threads (including replies) for every post. Requires an access token and makes the run noticeably slower. |
Other inputs you can add (7)
| 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. |
| proxyConfiguration | object | {"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"]} | VK blocks most datacenter IP ranges. Residential proxies are used by default. |
03 / Make it yours
Change these fields for your own research.
01 · maxItems
Maximum posts (total)
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.
Example: 6
02 · postsPerTarget
Maximum posts per target
Optional per-target cap. Leave empty to let each target use the shared budget.
Example: 5
03 · vkTargets
VK targets
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).
Example: kinopoisk
04 · includeComments
Include comments
Fetch comment threads (including replies) for every post. Requires an access token and makes the run noticeably slower.
Example: false
Run it in three steps
- Open the example on Apify and select Try for free to copy it into your Apify account.
- Replace the sample values above with your own target and keep the limit small.
- Start the run, then export the dataset as JSON, CSV or Excel.
04 / Output
What the results table shows.
- 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.
Columns in the “Media” view
postId
Post ID
postedAt
Published
sourceUrl
Post URL
attachments
attachments
A view selects columns for the table. The full JSON export keeps every field, including nested arrays and objects.
05 / Cost
What this example costs to run.
At most about $0.024: up to 6 results at $0.004 each (result) plus $0.00005 per GB of memory for the start event. Fewer results cost less. The live Pricing tab on Apify is authoritative.
Actor Start
$0.00005 per event · per GB of memory
result
$0.004 per event
Prices checked 2026-11-22. Set a run spending limit in Apify when you widen the input.
06 / API
Run the same input from your code.
This call starts a billable run of VK Posts Scraper - VKontakte Wall Posts & Comments with this example's input and returns the dataset items when it finishes. Synchronous calls wait up to five minutes; for longer runs, POST to /runs instead and read the run's default dataset when it succeeds. Keep the token in an environment variable.
curl --request POST \
'https://api.apify.com/v2/acts/whoareyouanas~vk-posts-scraper/run-sync-get-dataset-items?format=json' \
--header "Authorization: Bearer $APIFY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"maxItems":6,"postsPerTarget":5,"includeRawPost":false,"vkTargets":["kinopoisk"],"includeComments":false}'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
About this example.
What does the "Extract media links from public VK posts" example collect?
Sample posts from the public Kinopoisk wall and open the media dataset view. Add your VK access token to retrieve richer attachment fields through the official API. It runs VK Posts Scraper - VKontakte Wall Posts & Comments, published by whoareyouanas on Apify.
Which input does this example use?
Maximum posts (total) (maxItems) set to 6; Maximum posts per target (postsPerTarget) set to 5; VK targets (vkTargets) set to kinopoisk; Include comments (includeComments) set to false. The full JSON input is shown on this page.
How much does it cost to run this example?
At most about $0.024: up to 6 results at $0.004 each (result) plus $0.00005 per GB of memory for the start event. Fewer results cost less. The live Pricing tab on Apify is authoritative.
How do I change it for my own research?
Open the example on Apify and select Try for free to copy it into your account, then edit Maximum posts (total), Maximum posts per target, VK targets, Include comments. Keep the result limit small for the first run and check the output before scaling up.
Can I run it from the API or on a schedule?
Yes. Send the same JSON input to the VK Posts Scraper - VKontakte Wall Posts & Comments run endpoint with your Apify API token, or save the copied task in your Apify account and add a schedule. Results land in the run's default dataset as JSON, CSV or Excel.
More examples
Related tasks you can copy.
Export recent posts from public VK communities
Collect up to five posts from the public Kinopoisk VK community. Review available text, timestamps, engagement counts and attachments. Add your own VK access token for richer API results.
View exampleCompare posts from two public VK walls
Collect a small sample from the public Kinopoisk and Durov walls. Compare timestamps, text and available engagement figures across both targets.
View exampleArchive owner posts from Kinopoisk on VK
Filter the public Kinopoisk wall to community-owner posts. Inspect the available text, dates and attachments in a small archive sample.
View exampleFacebook Post Scraper by ID
Look up a batch of Facebook posts by numeric ID
Supply three documented numeric IDs and compare the returned post text, timestamps and source URLs. Use the input ID to match the output back to your list.
View exampleReddit Export
Export recent r/Python posts for community research
Collect a small sample of recent public r/Python posts, including available text, timestamps and source links. Replace the target subreddit and date window for your own research. Inspect coverage and errors; upstream archive availability can vary.
View exampleReddit Scraper
Discover Reddit communities about homelabs
Search by homelab and collect the matching subreddit records. Review available community names, descriptions and member counts.
View exampleGuides