{
  "openapi": "3.0.1",
  "info": {
    "title": "VK Scraper - VKontakte Posts, Comments, Profiles & Videos",
    "description": "Scrape VK (VKontakte) without login: wall posts of any community or profile with likes, views, reposts and attachments, comments with threads, profile and community data, videos and clips, VK video search. Date windows, keyword filters, monitor mode. $1.30 per 1,000 posts.",
    "version": "0.1",
    "x-build-id": "bcBMHcjuMzgeQfjxT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~vk-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-vk-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/topapi~vk-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-vk-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/topapi~vk-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-vk-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "targets": {
            "title": "VK communities, profiles, posts or videos",
            "type": "array",
            "description": "One per line: a community or profile link or handle (https://vk.com/vk, vk.com/durov, @tproger, club22822305, public1, id1, -22822305), a post link (https://vk.com/wall-22822305_1734948), a video or clip link (https://vkvideo.ru/video-22822305_456243492, https://vk.com/clip-22822305_456243513) or a VK Video channel (https://vkvideo.ru/@vk). Post and video links always return that post or video.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to collect from each community / profile",
            "enum": [
              "posts",
              "profiles",
              "videos"
            ],
            "type": "string",
            "description": "Posts: the wall, newest first. Profiles: one profile row each (name, followers / members, description, city, website, contacts...). Videos: the owner's uploaded videos and clips.",
            "default": "posts"
          },
          "videoSearchQueries": {
            "title": "VK Video search terms",
            "type": "array",
            "description": "Search VK Video like vkvideo.ru does, one term per line (Cyrillic finds the most, e.g. \"футбол\"). Each term returns up to \"Max videos per search\" video rows.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerTarget": {
            "title": "Max posts per community / profile",
            "minimum": 0,
            "type": "integer",
            "description": "Posts read from each wall, newest first (the pinned post counts). 0 = the whole wall.",
            "default": 20
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many posts / videos (profiles in Profiles mode) across all targets. Comments do not count here (see Max comments per post). 0 = no limit.",
            "default": 1000
          },
          "maxVideosPerTarget": {
            "title": "Max videos per community / profile / channel",
            "minimum": 0,
            "type": "integer",
            "description": "Videos mode and VK Video channel links: videos read from each owner, newest first. 0 = all of them.",
            "default": 20
          },
          "maxVideosPerSearch": {
            "title": "Max videos per search",
            "minimum": 0,
            "type": "integer",
            "description": "Videos returned for each VK Video search term. 0 = as many as VK returns.",
            "default": 20
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only posts / videos published on or after this date: 2026-01-31, an ISO time, or a relative window such as \"7 days\", \"24 hours\", \"3 months\". The wall is read newest first and reading stops at the first older post."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Only posts / videos published before this date (same formats). On a wall, the first post of the window is found by a binary search over the wall, so newer posts are not read."
          },
          "keywordsAny": {
            "title": "Text contains any of",
            "type": "array",
            "description": "Keep a post only if its text (and hashtags, and a repost's text) contains at least one of these words or phrases. Case-insensitive; ё = е. For videos: title and description.",
            "items": {
              "type": "string"
            }
          },
          "keywordsAll": {
            "title": "Text contains all of",
            "type": "array",
            "description": "Keep a post only if its text contains every one of these words or phrases.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude posts containing",
            "type": "array",
            "description": "Drop a post whose text contains any of these words or phrases.",
            "items": {
              "type": "string"
            }
          },
          "includePinnedPosts": {
            "title": "Include the pinned post",
            "type": "boolean",
            "description": "Keep the post a wall shows first when it is older than the next one (VK's pinned post).",
            "default": true
          },
          "includeReposts": {
            "title": "Include reposts",
            "type": "boolean",
            "description": "Keep posts that share another post (the original is in the repost field).",
            "default": true
          },
          "onlyReposts": {
            "title": "Only reposts",
            "type": "boolean",
            "description": "Keep only posts that share another post.",
            "default": false
          },
          "includeAds": {
            "title": "Include posts marked as ads",
            "type": "boolean",
            "description": "Keep posts VK marks as advertising (isAd).",
            "default": true
          },
          "onlyWithMedia": {
            "title": "Only posts with photos / videos / files",
            "type": "boolean",
            "description": "Keep only posts that carry an attachment other than a link preview.",
            "default": false
          },
          "minLikes": {
            "title": "Min likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts (and videos with details) with at least this many likes."
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts with at least this many comments."
          },
          "minReposts": {
            "title": "Min reposts",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts shared at least this many times."
          },
          "minViews": {
            "title": "Min views",
            "minimum": 0,
            "type": "integer",
            "description": "Keep posts / videos viewed at least this many times."
          },
          "minDurationSeconds": {
            "title": "Min video length (s)",
            "minimum": 0,
            "type": "integer",
            "description": "Videos: keep those at least this long."
          },
          "maxDurationSeconds": {
            "title": "Max video length (s)",
            "minimum": 0,
            "type": "integer",
            "description": "Videos: keep those at most this long (e.g. 60 for clips only)."
          },
          "maxPostsToScan": {
            "title": "Max posts to scan per wall (with filters)",
            "minimum": 10,
            "type": "integer",
            "description": "With keyword / engagement filters on, stop reading a wall after this many posts. Reading also stops early when the filters keep too few posts for another page to pay for itself.",
            "default": 2000
          },
          "wallFilter": {
            "title": "Wall posts by",
            "enum": [
              "all",
              "own"
            ],
            "type": "string",
            "description": "All: every post on the wall. Owner: only posts by the community / profile itself.",
            "default": "all"
          },
          "includeComments": {
            "title": "Comments",
            "type": "boolean",
            "description": "Add each post's comments as their own rows (type \"comment\"): author, text, date, likes, photos, the thread it answers. Charged per comment row.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Comment rows per post, threads included. 0 = all of them.",
            "default": 20
          },
          "commentsSort": {
            "title": "Comments order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Which comments come first when a post has more than the cap.",
            "default": "newest"
          },
          "includeCommentReplies": {
            "title": "Include replies in threads",
            "type": "boolean",
            "description": "Also return the replies VK shows inside comment threads (parentCommentId / threadId tell where they belong).",
            "default": true
          },
          "includeProfile": {
            "title": "Profile / community details",
            "type": "boolean",
            "description": "Add one profile row (type \"profile\") per community or profile: name, followers / members, description, status, city, country, website, contacts, address, verified, cover and photo. Always on in Profiles mode. Charged per profile row.",
            "default": false
          },
          "includeVideoDetails": {
            "title": "Video details",
            "type": "boolean",
            "description": "Read each video's page: likes, comments count, description, embed link and the media links (MP4 by quality, HLS; they work for a few hours from the run's IP). Included in the video price.",
            "default": true
          },
          "includeTopComments": {
            "title": "Top comments preview on posts (free)",
            "type": "boolean",
            "description": "Each post row carries up to 3 of the comments VK shows under it (topComments), at no extra charge and with no extra request.",
            "default": true
          },
          "monitorMode": {
            "title": "Only new since the last run",
            "type": "boolean",
            "description": "Each run returns only posts / videos / comments / profiles not delivered by an earlier run with the same targets and Monitor name. A wall is read until the first page of already-delivered posts, so a quiet poll reads one page and charges nothing.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the memory this monitor uses (letters, digits, dashes). Use different names for monitors that should not share memory.",
            "default": "vk-monitor"
          },
          "resetMonitor": {
            "title": "Reset the monitor memory",
            "type": "boolean",
            "description": "Forget what earlier runs delivered (the next run delivers everything again).",
            "default": false
          },
          "compact": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "Only the main fields of each row, empty fields left out.",
            "default": false
          },
          "includeRaw": {
            "title": "Include VK's raw object",
            "type": "boolean",
            "description": "Posts: add VK's own post object (raw) next to the normalised fields.",
            "default": false
          },
          "notifyWebhookUrl": {
            "title": "Notify webhook URL",
            "type": "string",
            "description": "POST a short JSON summary (and up to 25 rows) to this URL when the run delivered rows - Slack / Discord / Zapier / Make webhooks work."
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Requests to VK in flight at once.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: VK answers the run's own IP. Requests that VK refuses move to Apify datacenter, then residential proxy automatically. Set a proxy here to use your own.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}