# VK Scraper - VKontakte Social Data Extractor (`jungle_synthesizer/vk-scraper`) Actor

Extract VK (VKontakte) social data via the official API: user profiles, wall posts, group members, group posts, and user search. Structured JSON output with engagement metrics, demographics, and community data. Built for OSINT and social media research.

- **URL**: https://apify.com/jungle_synthesizer/vk-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Social media, Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 record 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 Scraper - VKontakte Social Data Extractor

Extract social data from **VK (VKontakte)**, Russia's largest social network, through VK's own
official API. Five modes cover the data researchers and analysts need most: user profiles, wall
posts, group members, group posts, and user search.

### Features

- **User Profiles** — demographics, location, occupation, follower/friend counts, verification status
- **User Posts (Wall)** — post text, publication date, likes/comments/reposts/views, attachments
- **Group Members** — member profiles for any public VK group or page
- **Group Posts** — a community's wall content with the same engagement metrics as user posts
- **User Search** — find VK users by query, with optional city/country filters
- Structured, consistent output across all five modes — one dataset schema, every field present (null where a mode doesn't produce it)

### Before You Start: VK API Access Token

This actor calls VK's official API directly, so it needs **your own VK API access token**:

1. Go to [dev.vk.com](https://dev.vk.com/) and sign in with your VK account.
2. Create an app (Settings → My apps → Create app).
3. Generate an access token for that app with the permissions you need (reading profiles, walls, and groups generally only needs the default scope).
4. Paste the token into the **VK API Access Token** field when you run this actor.

Your token is only ever used to call VK's API on your behalf for the run you start — it is never stored or reused by us.

Without a token the run still finishes, but it returns no records and the log tells you the token is missing.

### Input

#### Extract user profiles

```json
{
  "mode": "profiles",
  "userIds": ["1", "durov"],
  "vkAccessToken": "YOUR_VK_ACCESS_TOKEN",
  "maxItems": 100
}
```

#### Extract a user's wall posts

```json
{
  "mode": "posts",
  "userIds": ["durov"],
  "vkAccessToken": "YOUR_VK_ACCESS_TOKEN",
  "maxItems": 50
}
```

#### Extract a group's members

```json
{
  "mode": "group_members",
  "groupIds": ["apiclub"],
  "vkAccessToken": "YOUR_VK_ACCESS_TOKEN",
  "maxItems": 200
}
```

#### Extract a group's wall posts

```json
{
  "mode": "group_posts",
  "groupIds": ["apiclub"],
  "vkAccessToken": "YOUR_VK_ACCESS_TOKEN",
  "maxItems": 50
}
```

#### Search for users

```json
{
  "mode": "search",
  "searchQuery": "software engineer",
  "searchCity": "Moscow",
  "vkAccessToken": "YOUR_VK_ACCESS_TOKEN",
  "maxItems": 100
}
```

User IDs and group IDs both accept either the numeric VK id or the screen name (e.g. `1` or `durov`).

### Output Fields

Every record uses the same flat shape; fields that don't apply to the active mode are `null`.

```json
{
  "user_id": 1,
  "first_name": "Pavel",
  "last_name": "Durov",
  "screen_name": "durov",
  "profile_url": "https://vk.com/durov",
  "photo_url": "https://sun1-xx.userapi.com/...",
  "city": "Dubai",
  "country": "United Arab Emirates",
  "sex": "male",
  "birth_date": "10.9",
  "occupation": null,
  "university": null,
  "followers_count": 1300000,
  "friends_count": 0,
  "is_verified": true,
  "last_seen": "2026-03-15T14:30:00.000Z",
  "post_id": null,
  "post_text": null,
  "post_date": null,
  "likes_count": null,
  "comments_count": null,
  "reposts_count": null,
  "views_count": null,
  "attachments": null,
  "group_id": null,
  "group_name": null,
  "group_url": null,
  "group_type": null,
  "members_count": null,
  "group_description": null
}
```

Field reference:

| Field                                                              | Description                              |
|--------------------------------------------------------------------|------------------------------------------|
| `user_id`                                                          | VK user ID                               |
| `first_name` / `last_name`                                         | User's name                              |
| `screen_name`                                                      | VK username                              |
| `profile_url`                                                      | VK profile URL                           |
| `photo_url`                                                        | Profile photo URL                        |
| `city` / `country`                                                 | User's location                          |
| `sex`                                                              | `male` / `female`                        |
| `birth_date`                                                       | Birth date as reported by VK             |
| `occupation`                                                       | Job title or university                  |
| `university`                                                       | University name                          |
| `followers_count` / `friends_count`                                | Social graph size                        |
| `is_verified`                                                      | Verified-account flag                    |
| `last_seen`                                                        | Last activity timestamp                  |
| `post_id` / `post_text` / `post_date`                              | Wall post identity and content           |
| `likes_count` / `comments_count` / `reposts_count` / `views_count` | Post engagement metrics                  |
| `attachments`                                                      | Post attachments (photos, videos, links) |
| `group_id` / `group_name` / `group_url` / `group_type`             | Group identity                           |
| `members_count` / `group_description`                              | Group size and description               |

### FAQ

#### Do I need my own VK account?

Yes. VK's API requires every caller to authenticate with their own access token — see
[Before You Start](#before-you-start-vk-api-access-token) above.

#### What's the difference between Group Members and Group Posts?

Group Members returns the profiles of people who belong to a group. Group Posts returns the
group's own wall content (posts the group or page has published).

#### Can I use a numeric ID or a screen name?

Either. `userIds` and `groupIds` both accept numeric VK IDs or screen names, mixed freely in the
same list.

#### How does pricing work?

You're charged per record returned, regardless of mode.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

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

Choose what to extract from VK.

## `userIds` (type: `array`):

VK user IDs or screen names to scrape. Required for Profiles and User Posts modes.

## `groupIds` (type: `array`):

VK group IDs or screen names. Required for Group Members and Group Posts modes.

## `searchQuery` (type: `string`):

Free-text search query. Used in User Search mode.

## `searchCity` (type: `string`):

Filter User Search results by city name or VK city ID. Optional, used in User Search mode only.

## `searchCountry` (type: `string`):

Filter User Search results by VK country ID or name. Optional, used in User Search mode only.

## `vkAccessToken` (type: `string`):

Your VK API access token. Obtain one from https://dev.vk.com/. Every mode needs it to return data; without one the run finishes with zero records.

## `maxItems` (type: `integer`):

Maximum number of records to return across all queries.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "mode": "profiles",
  "userIds": [
    "1"
  ],
  "maxItems": 100
}
```

# 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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "mode": "profiles",
    "userIds": [
        "1"
    ],
    "searchQuery": "",
    "searchCity": "",
    "searchCountry": "",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "mode": "profiles",
    "userIds": ["1"],
    "searchQuery": "",
    "searchCity": "",
    "searchCountry": "",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/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 '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "mode": "profiles",
  "userIds": [
    "1"
  ],
  "searchQuery": "",
  "searchCity": "",
  "searchCountry": "",
  "maxItems": 100
}' |
apify call jungle_synthesizer/vk-scraper --silent --output-dataset

```

## MCP server setup

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