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

TikTok Comments Scraper — Extract TikTok comments with usernames, comment text, likes, timestamps, and related video data. Useful for audience research, sentiment analysis, content insights, competitor analysis, and social media monitoring.

- **URL**: https://apify.com/socialdataapi/tiktok-comments-scraper.md
- **Developed by:** [Social Data API](https://apify.com/socialdataapi) (community)
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### TikTok Comments Scraper — Comment Text, Replies, Likes and Commenters

TikTok Comments Scraper pulls the comments from public TikTok videos, found by video link or by creator username. Each comment comes back with its text, like count, commenter username and user ID, post time, mentions, reply count and **every reply you ask for, not just the first few**. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a social listening pipeline. No TikTok account or cookies needed. Start with one video, then collect comments across a creator's latest uploads.

***

### What data can I extract with TikTok Comments Scraper?

Using this TikTok Comments API, you will be able to extract the following TikTok comment data:

| 💬 Comment text | 👍 Like count | 👤 Commenter username | 🕒 Posted at (Unix time and UTC date) |
|---|---|---|---|
| 🆔 Comment ID | 🔢 Commenter user ID | 🖼️ Commenter avatar | 🏷️ @mentions in the text |
| 🧵 Replies (up to your reply limit) with the same details | 🔁 Reply count reported by TikTok | ↩️ Parent comment ID (on replies) | ❤️ Liked by the video's author (if TikTok sends it) |
| 📌 Pinned by the video's author | 🎨 Image or sticker-only comment flag | 🔗 Video URL | 📝 What you submitted (video URL or username) |

***

### How to use TikTok Comments Scraper

Social, research and AI teams use it to scrape TikTok comments: paste videos or creators and get every comment, with its replies attached, from one run.

**Copy to your AI assistant:**

```text
TikTok Comments Scraper is an Apify Actor that returns the comments of public TikTok videos as structured JSON: comment text, like count, commenter username and user ID, post time, @mentions, the reply count TikTok reports, whether the video's author liked or pinned the comment, and the replies themselves. Use it whenever someone needs TikTok comments without cookies, a login, or a browser of their own - sentiment analysis of a campaign's videos, finding the most-liked complaints under a product video, or giving an AI agent real viewer quotes as context. Inputs: postURLs (array of strings, TikTok video URLs: tiktok.com/@user/video/ID or vm.tiktok.com / vt.tiktok.com short links; when filled in, profiles is ignored), commentsPerPost (integer, top-level comments per video, minimum 1, default 10), maxRepliesPerComment (integer, replies per comment, minimum 0, default 3; 0 skips replies), profiles (array of strings, TikTok usernames with or without @, used only when postURLs is empty), resultsPerPage (integer, videos taken from each profile section, minimum 1, default 10, lowered to 1000 at runtime if higher), profileScrapeSections (array, "videos" | "reposts", default ["videos"]), profileSorting (string, "latest" | "popular" | "oldest", default "latest"), oldestPostDateUnified (string, only videos uploaded on or after this date, YYYY-MM-DD or relative like "5 days"), newestPostDate (string, only videos uploaded on or before this date, same formats), excludePinnedPosts (boolean, skip videos TikTok marks as pinned, default false), proxyConfiguration (object, Apify Proxy settings used only after TikTok blocks a comment or reply request). Each dataset row is one top-level comment with its replies nested in a "replies" array; replies are never separate rows. Each pushed comment row is charged as one row_result event; replies inside a row are not charged separately, and duplicate comment IDs are dropped before they are pushed. There are no error or summary rows: a video that yields nothing adds no rows and a warning in the run log.
```

#### TikTok Comments Scraper MCP Server: use these Actors from ChatGPT, Claude or Cursor

Point your AI assistant at the Apify MCP server and it can read TikTok comments on its own: it finds this Actor with the server's search-actors tool, adds it with add-actor and runs it with call-actor, then reads the comments and replies from the result. No glue code, no scraping logic in your prompts.

```bash
claude mcp add --transport http apify "https://mcp.apify.com"
```

#### Step by step

1. [Create a free Apify account](https://console.apify.com/sign-up).
2. Open TikTok Comments Scraper in the Apify Store.
3. Enter the TikTok video URL, or the creator's username (with or without @).
4. Click **Start** (or send your API request).
5. Download or stream your results in JSON, CSV or Excel.

#### How to scale TikTok Comments Scraper to bulk

Both the video URL list and the username list take many entries, so one run can collect bulk TikTok comments from a whole campaign; paste a prepared list with **Bulk edit**. Inside a run, up to 10 videos are worked on at the same time, up to 10 reply threads are fetched in parallel, and up to 3 profiles are searched for videos at once. For recurring jobs, attach an Apify schedule or loop over batches of URLs through the Apify API. Billing has one event: each pushed top-level comment row is one row_result event, with its replies included.

***

### ✨ Features

TikTok Comments Scraper fetches clean, structured comments from TikTok ⚡. It's ideal for sentiment analysis, social listening, community moderation and TikTok comment analysis for product research. It works as a TikTok comment extractor and a TikTok replies scraper in one run.

It extracts, per comment:

- **Comment text** – what the viewer wrote, with a flag for image or sticker comments that have no text
- **Like count** – how many likes the comment has
- **Replies** – the replies under the comment, up to the number you set, with the same details
- **Reply count** – how many replies TikTok reports for the comment
- **Commenter** – username, numeric user ID and avatar image
- **Post time** – Unix time and an ISO 8601 date in UTC
- **Author signals** – whether the video's author liked or pinned the comment
- **Mentions** – every @username in the text

⚡ Blocked requests are recognised, retried and switched to a proxy instead of being reported as "0 comments".

***

### Use cases 💡

- **Brand manager** — sort a campaign's comments by like count to surface the loudest complaints.
- **Social media analyst** — run it as a TikTok engagement scraper comparing reply counts across competitors.
- **Trust-and-safety team** — feed comment and reply text into a moderation classifier every day.
- **Market researcher** — group product-review comments by mentions to find the most-asked features.
- **AI engineer** — index comment text with username and date as metadata in a RAG store.

Building an AI agent? [Connect TikTok Comments Scraper over MCP](#mcp-integration-for-ai-agents) and let it call the actor on its own.

***

### Why choose this actor?

- **50 comments and 247 replies in under 5 seconds.** A recorded run on one video with 50 comments and up to 10 replies per comment returned 50 comment rows carrying 247 nested replies in 4.4 to 4.8 seconds; a run on 3 creators (2 videos each, 5 comments per video) returned 30 comments in 10.5 to 11.7 seconds.
- **The numbers behind each comment.** A recorded comment came back with 1,588,457 likes and a reported 21,086 replies, plus the commenter's username, user ID, avatar and post time.
- **18 fields and 11 inputs, one Actor.** Video URLs or usernames, videos or reposts, 3 sort orders, 2 date filters, a pinned-video filter, and separate limits for comments and replies.

***

### ⬇️ Input

Give the Actor TikTok video URLs or TikTok usernames; no field is required, but one of the two lists must have at least one entry. If both are filled in, the video URLs are used and the usernames are ignored.

Accepted video URL formats:

- `https://www.tiktok.com/@username/video/1234567890123456789` (tracking parameters are fine)
- `https://vm.tiktok.com/...` and `https://vt.tiktok.com/...` short links

| Parameter | Required | Type | Description | Example value |
|---|---|---|---|---|
| `postURLs` | No | array of strings | TikTok video URLs to take comments from. When filled in, usernames are ignored. | `["https://www.tiktok.com/@mrbeast/video/7578547467189374239"]` |
| `commentsPerPost` | No | integer | Top-level comments to collect per video. Minimum 1, default 10. | `50` |
| `maxRepliesPerComment` | No | integer | Replies to collect for each comment that has replies. Minimum 0, default 3. 0 skips replies entirely. | `10` |
| `profiles` | No | array of strings | TikTok usernames, with or without @. Used only when the video URL list is empty. | `["mrbeast", "@zachking"]` |
| `resultsPerPage` | No | integer | Videos to take from each profile section. Minimum 1, default 10; values above 1,000 are lowered to 1,000. Profile runs currently return about the 10 most recent videos per creator, plus any pinned ones. | `10` |
| `profileScrapeSections` | No | array | Profile sections to use: `videos`, `reposts`. Default `["videos"]`. Each section returns only its own videos; reposts take longer to collect. | `["videos"]` |
| `profileSorting` | No | string | `latest`, `popular` or `oldest`. Default `latest`. Popular and oldest sort the creator's recent videos found in the run (popular by play count), not the whole history. | `"popular"` |
| `oldestPostDateUnified` | No | string | Only videos uploaded on or after this date. `YYYY-MM-DD` or relative (`5 days`, `2 weeks`). Filters videos, not comments. Upload times for profile videos are accurate to about half a minute. | `"30 days"` |
| `newestPostDate` | No | string | Only videos uploaded on or before this date. Same formats; same half-minute accuracy. | `"2026-09-29"` |
| `excludePinnedPosts` | No | boolean | Skip videos pinned on the profile (videos and reposts). Default `false`. | `true` |
| `proxyConfiguration` | No | object | Apify Proxy settings for the datacenter stage, used only after TikTok blocks a comment or reply request. Custom proxy URLs are not used; finding a profile's videos does not use a proxy. | `{"useApifyProxy": true}` |

#### Example input

```json
{
  "postURLs": [],
  "commentsPerPost": 30,
  "maxRepliesPerComment": 5,
  "profiles": ["mrbeast", "@khaby.lame"],
  "resultsPerPage": 10,
  "profileScrapeSections": ["videos"],
  "profileSorting": "latest",
  "oldestPostDateUnified": "30 days",
  "newestPostDate": "2026-09-29",
  "excludePinnedPosts": true,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

***

### ⬆️ Output

Every comment is one typed, normalized JSON item with the same 18 fields on every run, and its replies sit inside it with the same fields (replies carry no reply count or pinned flag, so those are null there). To export TikTok comments, download JSON (default), CSV or Excel from the Output tab; for TikTok comments to CSV, pick CSV in the export dialog.

#### Example output

```json
{
  "videoWebUrl": "https://www.tiktok.com/@mrbeast/video/7578547467189374239",
  "submittedVideoUrl": "https://www.tiktok.com/@mrbeast/video/7578547467189374239?is_from_webapp=1",
  "input": "https://www.tiktok.com/@mrbeast/video/7578547467189374239?is_from_webapp=1",
  "cid": "7578612944021390113",
  "createTime": 1764861052,
  "createTimeISO": "2025-12-04T15:10:52.000Z",
  "text": "the ending caught me off guard @karljacobs",
  "diggCount": 1843,
  "likedByAuthor": false,
  "pinnedByAuthor": false,
  "repliesToId": null,
  "replyCommentTotal": 12,
  "uid": "6812345678901234567",
  "uniqueId": "jess.plays",
  "avatarThumbnail": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/5f1c2e9a~tplv-tiktokx-cropcenter:100:100.jpeg",
  "mentions": ["karljacobs"],
  "isMediaOnlyComment": false,
  "replies": [
    {
      "videoWebUrl": "https://www.tiktok.com/@mrbeast/video/7578547467189374239",
      "submittedVideoUrl": "https://www.tiktok.com/@mrbeast/video/7578547467189374239?is_from_webapp=1",
      "input": "https://www.tiktok.com/@mrbeast/video/7578547467189374239?is_from_webapp=1",
      "cid": "7578630187745207054",
      "createTime": 1764865410,
      "createTimeISO": "2025-12-04T16:23:30.000Z",
      "text": "same, did not see that coming",
      "diggCount": 96,
      "likedByAuthor": false,
      "pinnedByAuthor": null,
      "repliesToId": "7578612944021390113",
      "replyCommentTotal": null,
      "uid": "7034456789012345678",
      "uniqueId": "marco_films",
      "avatarThumbnail": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/9b3d7a10~tplv-tiktokx-cropcenter:100:100.jpeg",
      "mentions": [],
      "isMediaOnlyComment": false
    },
    {
      "videoWebUrl": "https://www.tiktok.com/@mrbeast/video/7578547467189374239",
      "submittedVideoUrl": "https://www.tiktok.com/@mrbeast/video/7578547467189374239?is_from_webapp=1",
      "input": "https://www.tiktok.com/@mrbeast/video/7578547467189374239?is_from_webapp=1",
      "cid": "7578641102938475521",
      "createTime": 1764869988,
      "createTimeISO": "2025-12-04T17:39:48.000Z",
      "text": "",
      "diggCount": 14,
      "likedByAuthor": false,
      "pinnedByAuthor": null,
      "repliesToId": "7578612944021390113",
      "replyCommentTotal": null,
      "uid": "7210987654321098765",
      "uniqueId": "dani.k22",
      "avatarThumbnail": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/2c4e6a8b~tplv-tiktokx-cropcenter:100:100.jpeg",
      "mentions": [],
      "isMediaOnlyComment": true
    }
  ]
}
```

***

### How does it work?

You don't need a TikTok account. For each video, the Actor reads the public comments and replies that any logged-out visitor can see, page by page, and returns only that public data.

Requests start without a proxy. When TikTok blocks one, the Actor retries, switches to a datacenter proxy and then to residential proxies (3 attempts), and stays on that tier for the rest of the run. Blocked requests are never reported as "no comments". For usernames, the Actor finds the creator's recent videos first; profile runs currently return about the 10 most recent videos plus any pinned ones, and some profile lookups, including reposts, use a browser that ships with the Actor. It does not solve CAPTCHAs. Every row follows one fixed schema, not the page layout.

***

### How do you integrate TikTok Comments Scraper into your stack?

It works with what you already use: the Apify REST API from any language, the Apify MCP server for AI agents, and no-code tools.

#### MCP integration for AI agents

```bash
claude mcp add --transport http apify "https://mcp.apify.com"
```

This connects your agent to the Apify MCP server, which registers this Actor as a tool your agent can call directly: the agent finds it with the server's search-actors tool, adds it with add-actor and runs it with call-actor. Sign in with your Apify account when asked. The command is for Claude Code; Cursor and Windsurf connect to the same URL in their MCP settings.

#### No-code tools (n8n, Make, LangChain)

**n8n:** add the Apify node, choose **Run an Actor** and pick this Actor with your input. Its dataset items flow straight into the next node, such as Google Sheets or Slack.

**Make:** add the Apify app's **Run an Actor** module with this Actor and your input, then **Get Dataset Items** to pass the comments on. Map the comment text and like count into any later module.

**LangChain:** install `langchain-apify` and load a finished run's dataset with `ApifyDatasetLoader`. Map the comment text to the document content and the username and post time to metadata.

***

### Is it legal to scrape TikTok data?

Scraping publicly available TikTok data is generally legal. TikTok Comments Scraper returns only publicly available data: the comments any visitor sees on a public video without logging in. Comment text, usernames, user IDs and avatars are still personal data under the GDPR once they relate to an identifiable person, so while scraping public data is generally permissible, storing and using it must comply with local data-protection law. This is not legal advice. Consult legal counsel if your use case involves bulk storage of personal data.

***

### Frequently asked questions

#### What fields does TikTok Comments Scraper return?

The top five are the comment text, like count, commenter username, post time and the nested replies. See [the data fields section](#what-data-can-i-extract-with-tiktok-comments-scraper) for all 18.

#### Does TikTok Comments Scraper require a TikTok account or login?

No. Only public comment data is extracted, and the input has no login, cookie or API-key field. No credentials needed.

#### How fast does TikTok Comments Scraper run?

A recorded run collected 50 comments with 247 replies from one video in 4.4 to 4.8 seconds, and a run on 3 creators returned 30 comments in 10.5 to 11.7 seconds. Data is fetched live on every run, not cached.

#### What happens if a comment is private or doesn't exist?

Nothing is invented and no error rows are added. A video URL whose video ID can't be read, or a video with no reachable comments, adds no rows and logs a warning; if no videos are found for the usernames, the run logs "No video URLs to process" and ends. A run that pushes nothing logs an explicit error line, so check for an empty dataset in your code.

#### Can I scrape multiple TikTok comments at once?

Yes. Put many video URLs or many usernames in one run; up to 10 videos are processed at the same time, and you set the comment and reply count per video.

#### Does TikTok Comments Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — this Actor is available as an MCP tool through the Apify MCP server. Register the server in Claude Code with the command below (Cursor and Windsurf use the same URL), and the agent can search for this Actor, add it and call it.

```bash
claude mcp add --transport http apify "https://mcp.apify.com"
```

Any agent that can call an HTTP endpoint can also use the Apify REST API directly.

#### Does TikTok Comments Scraper return data in a format LLMs can use directly?

Yes. Every row is typed, normalized JSON with consistent field names, and replies stay nested under their comment. No HTML parsing, no selectors: pass it straight to an LLM, index it into a vector store, or feed it to an agent tool with no transformation step.

#### What happens when TikTok changes its layout or updates its anti-bot system?

Rows are built from TikTok's data rather than the page layout, so a layout change alone does not change the output fields. When TikTok blocks a request, the Actor recognises it, retries and switches to a proxy instead of returning an empty result; a block that persists is logged and the run keeps the rows it already has.

#### Can I use TikTok Comments Scraper without managing proxies or browser infrastructure?

Yes. Proxy escalation (no proxy, then datacenter, then residential with 3 attempts) runs on the Actor's side, and the browser needed for some profile lookups ships inside the Actor. You send one request and get structured JSON back; it does not solve CAPTCHAs.

#### Which TikTok comment fields work best for AI training data and RAG indexing?

For RAG: the comment text and reply text, with the username, post date and video URL as metadata. For training data: the like count, reply count, the author-liked and author-pinned flags and the image-only flag. All fields are typed primitives (strings, integers, booleans), with null only where TikTok sends nothing; no normalization needed.

***

### Your feedback

Found a bug or missing a field? Let us know. Include the input you used and the run's log so the problem can be reproduced.

# Actor input Schema

## `postURLs` (type: `array`):

The video URLs to extract comments from. Supported: tiktok.com/@user/video/ID links and vm.tiktok.com / vt.tiktok.com short links. Add them one by one or paste a list in Bulk edit. Tracking parameters such as ?is_from_webapp=1 are fine; they are stripped from videoWebUrl.

## `commentsPerPost` (type: `integer`):

How many top-level comments to collect per video (each comment row carries its replies). Free plan users get up to 20 comments per input (one video URL, or one profile across all of its videos) per run and 200 comments per month in total; paid plans have no limit.

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

How many replies to collect from each comment that has any. Values above 20 are honoured. Set to 0 to skip replies entirely and run faster.

## `profiles` (type: `array`):

One or more TikTok usernames, with or without the leading @. Use Bulk edit to paste a prepared list.

## `resultsPerPage` (type: `integer`):

How many videos to take from each profile. Values above 1000 are lowered to 1000 at runtime and this is logged. Profile runs currently return about the 10 most recent videos per creator, plus any pinned ones.

## `profileScrapeSections` (type: `array`):

Which profile sections to collect videos from. Each section returns only its own videos. Reposts take noticeably longer to collect.

## `profileSorting` (type: `string`):

Latest keeps the profile's order. Popular and Oldest sort the creator's recent videos found in the run (Popular by play count), so they approximate rather than search a creator's whole history.

## `oldestPostDateUnified` (type: `string`):

Optional. Only videos uploaded on or after this date are used. Absolute (YYYY-MM-DD) or relative (for example: 5 days, 2 weeks). Filters videos, not comments. Upload times for profile videos are accurate to about half a minute.

## `newestPostDate` (type: `string`):

Optional. Only videos uploaded on or before this date are used. Absolute (YYYY-MM-DD) or relative (for example: 5 days, 2 weeks). Filters videos, not comments. Upload times for profile videos are accurate to about half a minute.

## `excludePinnedPosts` (type: `boolean`):

Skip videos pinned on the profile, in both the videos and the reposts sections.

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

Used only for comment and reply requests. The run starts with no proxy. If TikTok blocks a request, the run switches to a datacenter proxy (this Apify Proxy setting when Apify Proxy is enabled here, otherwise the Apify default proxy), then to residential proxies with 3 retries, and stays on that tier for the rest of the run. Custom proxy URLs are not used. Finding a profile's videos does not use a proxy.

## Actor input object example

```json
{
  "postURLs": [
    "https://www.tiktok.com/@mrbeast/video/7578547467189374239"
  ],
  "commentsPerPost": 10,
  "maxRepliesPerComment": 3,
  "profiles": [
    "mrbeast"
  ],
  "resultsPerPage": 10,
  "profileScrapeSections": [
    "videos"
  ],
  "profileSorting": "latest",
  "excludePinnedPosts": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped items in the Actor's default dataset.

## `outputFile` (type: `string`):

A single JSON record holding every comment pushed during the run, written to the key-value store under the key 'output.json'.

# 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 = {
    "postURLs": [
        "https://www.tiktok.com/@mrbeast/video/7578547467189374239"
    ],
    "profiles": [
        "mrbeast"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialdataapi/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 = {
    "postURLs": ["https://www.tiktok.com/@mrbeast/video/7578547467189374239"],
    "profiles": ["mrbeast"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("socialdataapi/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 '{
  "postURLs": [
    "https://www.tiktok.com/@mrbeast/video/7578547467189374239"
  ],
  "profiles": [
    "mrbeast"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call socialdataapi/tiktok-comments-scraper --silent --output-dataset

```

## MCP server setup

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