TikTok Comments Scraper
Pricing
from $0.40 / 1,000 comments
TikTok Comments Scraper
Scrape TikTok comments and replies from any video, search or hashtag. Exports text, likes, reply counts, timestamps and commenter profiles to JSON, CSV or Excel.
TikTok Comments Scraper
Pricing
from $0.40 / 1,000 comments
Scrape TikTok comments and replies from any video, search or hashtag. Exports text, likes, reply counts, timestamps and commenter profiles to JSON, CSV or Excel.
You can access the TikTok Comments Scraper programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in API & Integrations in Apify Console.
{ "openapi": "3.0.1", "info": { "version": "0.1", "x-build-id": "1a2Tr1Sf5g6EBka9g" }, "servers": [ { "url": "https://api.apify.com/v2" } ], "paths": { "/acts/corvuslab~tiktok-comments-scraper/run-sync-get-dataset-items": { "post": { "operationId": "run-sync-get-dataset-items-corvuslab-tiktok-comments-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/corvuslab~tiktok-comments-scraper/runs": { "post": { "operationId": "runs-sync-corvuslab-tiktok-comments-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/corvuslab~tiktok-comments-scraper/run-sync": { "post": { "operationId": "run-sync-corvuslab-tiktok-comments-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", "required": [ "proxyConfiguration" ], "properties": { "videoUrls": { "title": "🎬 Video URLs", "type": "array", "description": "TikTok videos to read comments from. Accepts full URLs (https://www.tiktok.com/@user/video/7231338487075638570), share links from the app's Share button (https://vm.tiktok.com/ZGxxxxxxx/), photo-post URLs, and bare video IDs. This is the most direct and cheapest input.", "items": { "type": "string" } }, "startUrls": { "title": "🔗 Start URLs (bulk)", "type": "array", "description": "Same as Video URLs, but can also load a list from a remote file — point it at a CSV or text file of TikTok links in Google Sheets, S3 or any public URL instead of pasting them one by one.", "items": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string", "title": "URL of a web page", "format": "uri" } } } }, "searchQueries": { "title": "🔍 Search queries", "type": "array", "description": "Keywords to search for videos, whose comments are then collected. Slower than naming videos directly, because search and comments are served from different TikTok regions and the run has to establish a second connection.", "items": { "type": "string" } }, "hashtags": { "title": "#️⃣ Hashtags", "type": "array", "description": "Hashtag names to find videos from, e.g. \"fyp\" or \"#cooking\". Served as a keyword search rather than the hashtag feed itself, so results are close to — but not identical to — what you see on the tag page.", "items": { "type": "string" } }, "videosPerSource": { "title": "🎞️ Videos per query or hashtag", "minimum": 1, "maximum": 200, "type": "integer", "description": "How many videos to take from each search query or hashtag before reading their comments. Ignored for video URLs, which are used exactly as given.", "default": 10 }, "maxCommentsPerVideo": { "title": "💬 Max comments per video", "minimum": 1, "maximum": 1000, "type": "integer", "description": "Cap on distinct top-level comments collected from each video. Replies are counted separately, under Max replies per comment.", "default": 100 }, "includeReplies": { "title": "↩️ Include replies", "type": "boolean", "description": "Also collect the replies under each comment. Each reply arrives as its own record, linked to its parent by parentCommentId.", "default": false }, "maxRepliesPerComment": { "title": "↩️ Max replies per comment", "minimum": 0, "maximum": 200, "type": "integer", "description": "Cap on replies fetched per comment when replies are enabled.", "default": 10 }, "maxResults": { "title": "🔢 Max results", "minimum": 0, "type": "integer", "description": "Maximum number of comment records to return in total, across every video. Set 0 for as many as possible — a single run tops out at 20,000 records either way.", "default": 100 }, "dateRange": { "title": "📅 Only comments posted within", "enum": [ "ALL_TIME", "YESTERDAY", "THIS_WEEK", "THIS_MONTH", "LAST_THREE_MONTHS", "LAST_SIX_MONTHS" ], "type": "string", "description": "Drop comments older than this. Comments with no readable timestamp are always kept.", "default": "ALL_TIME" }, "sortType": { "title": "↕️ Sort results by", "enum": [ "RELEVANCE", "MOST_LIKED", "DATE_POSTED" ], "type": "string", "description": "Order the run's output. \"Most liked\" and \"Newest\" hold the harvested comments in memory and sort them before saving, so results arrive at the end of the run rather than streaming in as they are found.", "default": "RELEVANCE" }, "incrementalMode": { "title": "♻️ Incremental mode", "type": "boolean", "description": "Track state between runs and emit only comments that are new or changed since last time, each tagged with a changeType. A comment counts as changed when its text, its likes or its reply count move.", "default": false }, "stateKey": { "title": "🗝️ State key", "type": "string", "description": "Stable name for the tracked set. Leave empty to derive one automatically from this run's inputs." }, "emitUnchanged": { "title": "🔁 Include unchanged records", "type": "boolean", "description": "Also emit records that have not changed since the previous run.", "default": false }, "telegramToken": { "title": "💬 Telegram bot token", "type": "string", "description": "Bot token from @BotFather." }, "telegramChatId": { "title": "🆔 Telegram chat ID", "type": "string", "description": "Chat or channel ID, e.g. \"-100123456789\" or \"@yourchannel\"." }, "slackWebhookUrl": { "title": "💼 Slack webhook URL", "type": "string", "description": "Slack incoming-webhook URL." }, "discordWebhookUrl": { "title": "🎮 Discord webhook URL", "type": "string", "description": "Discord incoming-webhook URL." }, "webhookUrl": { "title": "🪝 Webhook URL", "type": "string", "description": "Any HTTPS endpoint. Receives a JSON POST with the matched records — works with n8n, Make, and Zapier." }, "webhookHeaders": { "title": "🧾 Webhook headers", "type": "object", "description": "Extra headers for the webhook request, e.g. {\"Authorization\": \"Bearer xyz\"}." }, "notificationLimit": { "title": "🔢 Records per notification", "minimum": 1, "maximum": 20, "type": "integer", "description": "How many records to include in each notification message.", "default": 5 }, "compact": { "title": "📦 Compact records", "type": "boolean", "description": "Emit only the core fields — the comment, who wrote it, its likes and reply count, which video it came from, and its thread links. Ideal for AI agents and MCP clients.", "default": false }, "excludeEmptyFields": { "title": "🧹 Drop empty fields", "type": "boolean", "description": "Remove null, empty-string, and empty-array fields from each record.", "default": false }, "customMapFunction": { "title": "🧮 Custom map function", "type": "string", "description": "JavaScript function applied to every comment before it is saved, e.g. (object) => { return {...object} }. Use it to reshape or trim output, not to filter." }, "maxRequestRetries": { "title": "🔄 Max request retries", "minimum": 0, "maximum": 10, "type": "integer", "description": "How many times to retry a failed request before giving up on it.", "default": 3 }, "proxyConfiguration": { "title": "🌐 Proxy configuration", "type": "object", "description": "Required. TikTok serves comments only to European visitors, so the run needs a European exit. The settings below are already correct — a run without one finds no comments at all. Change the country if you like (GB, FR and NL all work); leave the group as it is.", "default": { "useApifyProxy": true, "apifyProxyGroups": [ "RESIDENTIAL" ], "apifyProxyCountry": "DE" } } } }, "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 } } }, "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 } } } } } } } } }}OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for TikTok Comments Scraper from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients: