# TikTok Comments Scraper (`corvuslab/tiktok-comments-scraper`) Actor

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.

- **URL**: https://apify.com/corvuslab/tiktok-comments-scraper.md
- **Developed by:** [Corvuslab](https://apify.com/corvuslab) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 comments

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

### What does TikTok Comments Scraper do?

It reads the comment section of TikTok videos and turns it into structured data you can actually work with.

Point it at videos and it collects their comments. Point it at a **search query** or a **hashtag** and it finds matching videos first, then collects the comments on those. Video links can be full URLs, the short share links the TikTok app's Share button produces, or a list loaded straight from a spreadsheet — you do not have to clean your URLs before you start.

Every comment comes back as one flat record: the comment text, the commenter's handle and display name, their avatar and verification badge, the like count, the reply count, the exact time it was posted, and a direct link back to the comment on TikTok. Replies are collected as records of their own, carrying both the top-level comment they sit under and, when someone answers another reply, the exact reply they were talking to — so threads rebuild in their real shape rather than as one flat list.

Runs are small and quick — a few hundred comments arrive in well under a minute.

### Related TikTok scrapers

- **[TikTok Profile Scraper](https://apify.com/corvuslab/tiktok-profile-scraper)** — the natural next step after this actor. A comment tells you *what* someone said and gives you their `uniqueId`, but not who they are: TikTok does not serve follower counts, bios or contact details on the comment endpoint. Feed those handles into the profile scraper and you get follower and following counts, the bio, bio links and any email or phone found in it. Both actors use the same field conventions, so `uniqueId` joins one dataset straight onto the other — comments tell you what an audience *says*, profiles tell you who it *is*. Pair it with `purchaseIntent` and a product video's comment section becomes a qualified lead list with contact details attached.

### What data can you extract from TikTok comments?

Each record is one comment or one reply:

| Field | Description |
|---|---|
| `id` | The comment's own ID |
| `text` | The comment itself |
| `imageUrl` | Image or sticker attached to the comment, when there is one |
| `language` | Detected language of the comment |
| `diggCount` | Likes on the comment |
| `replyCount` | How many replies it has |
| `createTime` / `createTimeISO` | When it was posted, as a timestamp and as ISO 8601 |
| `isReply` | Whether this record is a reply |
| `parentCommentId` | The top-level comment this record belongs to |
| `replyToReplyId` | The specific reply being answered, when a reply answers another reply |
| `url` | Deep link straight to the comment |
| `uniqueId` | Commenter's @handle |
| `nickname` | Commenter's display name |
| `userId` / `secUid` | Commenter's internal identifiers |
| `avatarThumb` | Commenter's profile picture URL |
| `verified` | Whether the commenter has a verification badge |
| `userUrl` | Link to the commenter's profile |
| `likedByAuthor` | The video's creator liked this comment |
| `pinnedByAuthor` | The video's creator pinned this comment |
| `isCreator` | The video's creator wrote this comment themselves |
| `purchaseIntent` | TikTok's own signal that the comment shows buying intent — asking the price, where to buy, or whether it ships |
| `ageGroup` | TikTok's predicted age bracket for the commenter (1–5). Null for most commenters, since TikTok only predicts one sometimes |
| `videoId` / `videoUrl` | The video the comment belongs to |
| `videoCommentCount` | Total comments on that video, so you can see what share you captured |

Three of these are worth calling out. `likedByAuthor`, `pinnedByAuthor` and `isCreator` tell you which comments the creator engaged with and which ones they wrote — usually a far better signal of what mattered in a thread than raw like counts, and the thing brand-partnership and community teams look for first.

`purchaseIntent` is TikTok's own read on whether a comment is someone asking to buy — price, availability, shipping. It is the fastest way to pull the commercially interesting comments out of a thread of thousands: filter on it and a product video's comment section becomes a lead list. Measured on live runs: it fires on **31% of comments** under TikTok Shop and haul videos, and on **0%** under a non-commercial announcement video — so it discriminates rather than firing everywhere.

### Key features

- **Two ways in** — name the videos, or find them by keyword or hashtag.
- **Messy URLs welcome.** Full links, app share links (`vm.tiktok.com/…`), photo posts and bare video IDs all work, and bulk lists can be loaded from a file rather than pasted.
- **Replies are full records**, not a nested blob — same fields as any comment, linked by `parentCommentId` and `replyToReplyId`.
- **No duplicate comments.** TikTok's paging overlaps and returns the same comment on consecutive pages; this de-duplicates as it reads, so a request for 200 comments returns 200 *distinct* ones.
- **Failed URLs are reported, not swallowed.** Anything that could not be read comes back as an `error` row in the same dataset, with the input and a reason.
- **Buying-intent flag on every comment** — TikTok’s own signal for "where do I get this / how much", so a product video’s comments can be filtered straight down to the people asking to buy.
- **Incremental monitoring** — run it on a schedule and get only the comments that appeared or changed since last time.
- **Alerts** to Telegram, Slack, Discord or any webhook when new comments land.
- **Filter and sort** by post date or by likes, and cap comments per video so one viral clip cannot eat the whole run.
- **Custom map function** to reshape records before they are saved.

### How to scrape TikTok comments

1. Paste one or more TikTok video links into **Video URLs**. A link looks like `https://www.tiktok.com/@username/video/7231338487075638570`, or `https://vm.tiktok.com/ZGxxxxxxx/` if you copied it from the app.
2. Leave **Proxy configuration** exactly as it comes — it is already set correctly, and the FAQ below explains why it matters.
3. Set **Max comments per video** if you want a tighter cap than the default.
4. Turn on **Include replies** for full threads rather than top-level comments only.
5. Click **Start**.

To collect by topic instead, leave Video URLs empty and put your keywords into **Search queries** or tag names into **Hashtags**, then use **Videos per query or hashtag** to control how many videos each one contributes. This path takes longer, because finding videos and reading comments happen in different TikTok regions and the run has to open a second connection for the search step.

### Input

The only required setting is the proxy, and it is prefilled. Everything else has a sensible default.

```json
{
    "videoUrls": ["https://www.tiktok.com/@tiktok/video/7231338487075638570"],
    "includeReplies": true,
    "maxRepliesPerComment": 10,
    "maxCommentsPerVideo": 100,
    "maxResults": 500,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "DE"
    }
}
```

Collecting by keyword instead, newest comments first:

```json
{
    "searchQueries": ["air fryer recipes"],
    "hashtags": ["airfryer"],
    "videosPerSource": 10,
    "maxCommentsPerVideo": 50,
    "maxResults": 500,
    "dateRange": "THIS_MONTH",
    "sortType": "DATE_POSTED",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "DE"
    }
}
```

The remaining options:

| Option | What it does |
|---|---|
| `maxResults` | Total records for the run. `0` means as many as possible, up to 20,000. |
| `dateRange` | Drop comments older than a window — last 24 hours through last 6 months. |
| `sortType` | Return comments in TikTok's order, most-liked first, or newest first. |
| `startUrls` | Bulk input, including a CSV or text file of links held in Google Sheets or S3. |
| `compact` | Emit only the core fields — ideal for AI agents and MCP clients. |
| `excludeEmptyFields` | Strip null and empty fields from every record. |
| `stateKey` | Name the tracked set yourself when using incremental mode. |
| `maxRequestRetries` | How hard to retry a request before giving up on it. |

### Output

One record per comment. A top-level comment:

```json
{
    "id": "7231519685253677830",
    "dataType": "comment",
    "videoId": "7231338487075638570",
    "videoUrl": "https://www.tiktok.com/@tiktok/video/7231338487075638570",
    "videoCommentCount": 4137,
    "parentCommentId": null,
    "replyToReplyId": null,
    "isReply": false,
    "text": "thank you so much",
    "language": "en",
    "diggCount": 11,
    "replyCount": 2,
    "createTime": 1683719395,
    "createTimeISO": "2023-05-10T11:49:55+00:00",
    "likedByAuthor": true,
    "pinnedByAuthor": false,
    "isCreator": false,
    "purchaseIntent": false,
    "ageGroup": null,
    "uniqueId": "someone",
    "nickname": "Some One",
    "userId": "6817000000000000000",
    "secUid": "MS4wLjABAAAA",
    "avatarThumb": "https://p16-sign.tiktokcdn-us.com/...",
    "verified": false,
    "userUrl": "https://www.tiktok.com/@someone",
    "url": "https://www.tiktok.com/@tiktok/video/7231338487075638570?comment_id=7231519685253677830",
    "source": "tiktok.com",
    "scrapedAt": "2026-09-15T12:24:45+00:00"
}
```

Replies have the same shape, with `isReply` set to `true` and `parentCommentId` pointing at their parent.

Anything that could not be read appears in the same dataset as an error row, so a run over hundreds of links tells you exactly which ones came back empty:

```json
{
    "dataType": "error",
    "input": "https://www.tiktok.com/@someone/video/7000000000000000000",
    "errorCode": "NO_COMMENTS",
    "error": "No comments returned — the video may be private, deleted, geo-restricted, or have comments disabled.",
    "videoId": "7000000000000000000",
    "scrapedAt": "2026-09-15T12:24:45+00:00"
}
```

Filter them out with `dataType == "comment"`, or open the **Failed inputs** view in the dataset tab.

### What are the limits of this TikTok comments scraper?

Worth knowing before you plan a job around it:

- **Up to 1,000 top-level comments per video**, plus their replies. Very large threads are paginated automatically up to that ceiling, so on a video with 40,000 comments you get the first 1,000 — use `videoCommentCount` to see what share that was.
- **20,000 records per run.** Split larger jobs across runs or schedule them.
- **There is no way to list an account's own videos.** TikTok stopped publishing that list, so "give me every comment on this creator's back catalogue" is not something any tool can do reliably right now without a video list. Give it the video links, or find them by keyword.
- **Hashtags are served as a keyword search**, not the tag feed itself, so results are close to but not identical to the tag page.
- **Sorting and date filters apply to what the run harvested**, not to all of TikTok — they trim and order your results rather than querying TikTok's index.
- **TikTok sometimes stops serving a long thread part-way.** When that happens the run says so in the log and reports the thread as partial rather than pretending it reached the end — and in incremental mode it keeps what it already knew instead of reporting those comments as gone. Re-run to pick up the rest.
- **Private, deleted and geo-restricted videos return nothing.** They are logged and reported as error rows, and the run moves on.

### How can you monitor a TikTok comment section over time?

Turn on **Incremental mode**. The actor remembers what it saw last time and tags each record with a `changeType` — `NEW`, `UPDATED`, `UNCHANGED` or `EXPIRED`. A comment counts as changed when its text, its likes or its reply count move, so a thread that catches fire overnight shows up as updated rather than sitting silently in the dataset. `EXPIRED` means a comment you had seen before is no longer in the thread — deleted by its author or removed by moderation — which is the signal to watch if you are tracking what disappears from a campaign.

On a schedule this becomes a comment watcher: run it hourly or daily against the videos you care about and each run surfaces only what actually changed. That is far cheaper than re-scraping everything and diffing it yourself, and it is the natural way to follow a campaign hashtag or a product launch as reaction comes in.

Unchanged records are suppressed by default, which keeps scheduled runs lean. Give the run a **State key** if you want to name the tracked set yourself rather than have it derived from your inputs.

### What alerts and notifications are available?

Any run can push its findings straight to you:

- **Telegram** — set a bot token and chat ID
- **Slack** — set an incoming webhook URL
- **Discord** — set a webhook URL
- **Any HTTP endpoint** — set a webhook URL and optional headers

Each channel stays off until you fill in its fields, and a delivery failure never breaks the run. Paired with incremental mode, this gives you a live feed of new comments without anyone having to open a dataset.

### What can you do with TikTok comment data?

- **Audience research.** Read what people actually say under your videos or a competitor's, at a scale nobody can match by hand.
- **Sentiment and theme analysis.** Feed the text into your own model and find the recurring complaints, questions and requests.
- **Campaign measurement.** Track reaction to a launch or a hashtag as it unfolds, rather than reading a summary afterwards.
- **Lead generation.** Comment threads under buying-intent videos are full of people asking where to get something.
- **Community management.** Catch questions and complaints across a creator's back catalogue, not just the latest post.
- **Creator vetting.** Before a partnership, check whether the comments are real engagement or noise — and whether the creator replies.
- **Moderation and brand safety.** Spot spam, scam links and abuse under your own content.
- **Training data.** Build labelled datasets of informal, real-world text.

### How much does it cost to scrape TikTok comments?

The actor is billed per result, so you pay for the comments you get and nothing else. A reply is an ordinary comment record and is billed the same way. Error rows are free — you are never charged for a URL that returned nothing.

Compute is a small part of the bill, and traffic per comment is a few kilobytes. Use **Max comments per video** and **Max results** to put a hard ceiling on any run.

### How do you export TikTok comments or use the API?

Results land in an Apify dataset. From there you can:

- Download as **JSON, CSV, Excel, XML, JSONL or HTML**
- Pull them through the **Apify API** from any language
- Route them into **Make**, **Zapier**, **n8n**, **Airbyte**, **Google Sheets** or **Slack**
- Push into your own database or webhook as the run proceeds

To start a run and get its results back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~tiktok-comments-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "videoUrls": ["https://www.tiktok.com/@tiktok/video/7231338487075638570"],
        "maxCommentsPerVideo": 100,
        "proxyConfiguration": {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "DE"}
      }'
```

Official clients exist for Python and JavaScript, and every input field above maps directly to a JSON key. Schedule the actor hourly, daily or weekly and combine it with incremental mode for a pipeline that maintains itself.

### FAQ

**Why does this actor need a proxy?**
TikTok serves its comment endpoint only to European visitors. Requests from elsewhere come back empty — not as an error, just with nothing in them. The proxy settings are preset to a European exit, so you should not have to think about it. Change the country if you like; `DE`, `GB`, `FR` and `NL` all work.

**Will TikTok block me or my account?**
Nothing here touches your account — no login, no cookies, nothing tied to you. It reads what any logged-out visitor can see.

**Why did I get fewer comments than the video shows?**
Three usual reasons: you hit **Max comments per video**, the run hit **Max results**, or the creator has limited who can comment. Compare `videoCommentCount` against what you received, and check the log — it reports the count per video.

**How far back do comments go?**
As far as TikTok paginates, up to the 1,000-per-video ceiling. There is no way to jump to the oldest comments on a huge thread; you get them from the top down.

**Can I get comments from a video I do not own?**
Yes, provided the video is public. This reads publicly visible comments only.

**Can I collect every comment a creator has ever received?**
Only if you supply their video links. TikTok no longer publishes an account's video list, so there is no reliable way to go from a handle to its catalogue.

**Does it work on private or deleted videos?**
No — there are no comments to read. The run logs it, writes an error row, and carries on.

**Is scraping TikTok comments legal?**
This reads publicly visible comments — the same ones anyone sees without logging in. Public data collection is broadly lawful in most jurisdictions, but comments are written by people, so if you store or publish them, handle them in line with GDPR, CCPA and TikTok's own terms. If you are unsure how that applies to your case, take legal advice.

**Can I reshape the output?**
Yes. **Custom map function** applies a JavaScript function to every record before it is saved, so you can rename fields, drop the ones you do not need, or compute your own. **Compact records** is the one-click version.

***

**Keywords:** TikTok comments scraper · scrape TikTok comments · TikTok comment API · TikTok replies scraper · TikTok comment extractor · export TikTok comments CSV · TikTok comment data · TikTok sentiment analysis · TikTok audience research · TikTok comment monitoring · TikTok engagement data · scrape TikTok replies · TikTok thread scraper · TikTok commenter profiles · TikTok social listening · TikTok comment tracker · bulk TikTok comments · no-code TikTok scraper

# Changelog

This Actor's version history is a separate document: https://apify.com/corvuslab/tiktok-comments-scraper/changelog.md

# Actor input Schema

## `videoUrls` (type: `array`):

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.

## `startUrls` (type: `array`):

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.

## `searchQueries` (type: `array`):

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.

## `hashtags` (type: `array`):

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.

## `videosPerSource` (type: `integer`):

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.

## `maxCommentsPerVideo` (type: `integer`):

Cap on distinct top-level comments collected from each video. Replies are counted separately, under Max replies per comment.

## `includeReplies` (type: `boolean`):

Also collect the replies under each comment. Each reply arrives as its own record, linked to its parent by parentCommentId.

## `maxRepliesPerComment` (type: `integer`):

Cap on replies fetched per comment when replies are enabled.

## `maxResults` (type: `integer`):

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.

## `dateRange` (type: `string`):

Drop comments older than this. Comments with no readable timestamp are always kept.

## `sortType` (type: `string`):

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.

## `incrementalMode` (type: `boolean`):

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.

## `stateKey` (type: `string`):

Stable name for the tracked set. Leave empty to derive one automatically from this run's inputs.

## `emitUnchanged` (type: `boolean`):

Also emit records that have not changed since the previous run.

## `telegramToken` (type: `string`):

Bot token from @BotFather.

## `telegramChatId` (type: `string`):

Chat or channel ID, e.g. "-100123456789" or "@yourchannel".

## `slackWebhookUrl` (type: `string`):

Slack incoming-webhook URL.

## `discordWebhookUrl` (type: `string`):

Discord incoming-webhook URL.

## `webhookUrl` (type: `string`):

Any HTTPS endpoint. Receives a JSON POST with the matched records — works with n8n, Make, and Zapier.

## `webhookHeaders` (type: `object`):

Extra headers for the webhook request, e.g. {"Authorization": "Bearer xyz"}.

## `notificationLimit` (type: `integer`):

How many records to include in each notification message.

## `compact` (type: `boolean`):

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.

## `excludeEmptyFields` (type: `boolean`):

Remove null, empty-string, and empty-array fields from each record.

## `customMapFunction` (type: `string`):

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` (type: `integer`):

How many times to retry a failed request before giving up on it.

## `proxyConfiguration` (type: `object`):

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.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@tiktok/video/7231338487075638570"
  ],
  "videosPerSource": 10,
  "maxCommentsPerVideo": 100,
  "includeReplies": false,
  "maxRepliesPerComment": 10,
  "maxResults": 100,
  "dateRange": "ALL_TIME",
  "sortType": "RELEVANCE",
  "incrementalMode": false,
  "emitUnchanged": false,
  "notificationLimit": 5,
  "compact": false,
  "excludeEmptyFields": false,
  "customMapFunction": "(object) => { return {...object} }",
  "maxRequestRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DE"
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `allItems` (type: `string`):

No description

## `errors` (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 = {
    "videoUrls": [
        "https://www.tiktok.com/@tiktok/video/7231338487075638570"
    ],
    "customMapFunction": (object) => { return {...object} }
};

// Run the Actor and wait for it to finish
const run = await client.actor("corvuslab/tiktok-comments-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 = {
    "videoUrls": ["https://www.tiktok.com/@tiktok/video/7231338487075638570"],
    "customMapFunction": "(object) => { return {...object} }",
}

# Run the Actor and wait for it to finish
run = client.actor("corvuslab/tiktok-comments-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 '{
  "videoUrls": [
    "https://www.tiktok.com/@tiktok/video/7231338487075638570"
  ],
  "customMapFunction": "(object) => { return {...object} }"
}' |
apify call corvuslab/tiktok-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,corvuslab/tiktok-comments-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/k9Xm4y2wM0tGDUsQ3/builds/1a2Tr1Sf5g6EBka9g/openapi.json
