# TikTok Scraper — Videos, Creators, Hashtags, Comments & Trends (`b2b_leads/tiktok-real-time-data`) Actor

TikTok scraper & real-time data API for videos, creators, hashtags, sounds, comments & search suggestions. Keyword video search, influencer profiles, engagement stats, related videos & webhooks. Structured JSON for marketing, influencer research, trend analysis, brand monitoring & LLM pipelines.

- **URL**: https://apify.com/b2b\_leads/tiktok-real-time-data.md
- **Developed by:** [Chidubem Aneke](https://apify.com/b2b_leads) (community)
- **Categories:** Social media, Videos, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## TikTok Real-Time Data

**Collect live TikTok videos, creators, hashtags, sounds, suggestions, and comments** as clean, structured JSON — streamed to your Apify dataset in real time.

Built for marketers, agencies, researchers, data teams, and AI pipelines that need **reliable TikTok intelligence** without building and maintaining a collection stack from scratch.

---

### Why this Actor

| | TikTok Real-Time Data | Typical DIY scrapers |
|---|----------------------|----------------------|
| **Setup** | Checkbox UI — click Start with prefilled keywords | Weeks of brittle scripts |
| **Output** | Structured JSON, one row per item | Messy HTML / mixed payloads |
| **Scale** | Long runs stream to the dataset (low RAM risk) | Often buffers everything in memory |
| **Delivery** | Dataset + optional real-time webhook | Manual export only |
| **AI-ready** | LLM / MCP friendly records | Ad-hoc parsing required |
| **Coverage** | Videos, creators, trends, suggestions, comments, URL paste | Usually one surface only |

---

### What you get

Every record includes `featureType` and `scrapedAt` so you can filter, join, and pipe into any workflow.

#### Videos (`featureType: "video"`)

| Field | Description |
|-------|-------------|
| `videoSource` | How the video was found: `keyword`, `url`, `related`, `user`, `hashtag`, `scrape` |
| `videoId`, `url`, `description`, `author`, `authorId` | Identity |
| `playCount`, `diggCount`, `commentCount`, `shareCount`, `collectCount` | Engagement |
| `createTime`, `durationSec`, `musicTitle`, `musicAuthor`, `hashtags[]` | Media context |
| `coverUrl`, `downloadUrl` | Assets when available |
| `searchQuery`, `position` | Traceability |
| `engagementFetched` | Full engagement details were applied |
| `accountFollowerCount`, `accountVerified`, `accountSignature`, … | Optional creator fields on the same row |

#### Creators (`featureType: "account"`)

| Field | Description |
|-------|-------------|
| `uniqueId`, `userId`, `nickname`, `url` | Identity |
| `signature`, `bioLink`, `avatarUrl`, `verified` | Bio & trust |
| `followerCount`, `followingCount`, `heartCount`, `videoCount` | Reach |
| `friendCount`, `privateAccount`, `isCommerce`, `language`, `createTime` | Extra signals |
| `discoveryQuery` | Keyword that discovered this creator (keyword mode) |

#### Hashtags & sounds

| `featureType` | Key fields |
|---------------|------------|
| `hashtag` | `name`, `views`, `videoCount`, `description`, `coverUrl`, `url` |
| `sound` | `musicId`, `title`, `author`, `videoCount`, `coverUrl`, `url` |

#### Suggestions (`featureType: "suggestion"`)

| Field | Description |
|-------|-------------|
| `content` | Suggested phrase / demand language |
| `query` | Seed keyword |
| `isHashtag`, `position` | Classification & rank |

#### Comments (`featureType: "comment"`)

| Field | Description |
|-------|-------------|
| `commentId`, `text`, `author`, `authorId` | Identity |
| `diggCount`, `replyCount` | Engagement |
| `videoId`, `url`, `createTime`, `position` | Parent video & order |

Set `includeRaw: true` only if you need extended source fragments (larger output, advanced users).

---

### Features

#### Keyword videos — on by default
Search by topic. **Prefill:** `cooking`, `gym tips` — click **Start** immediately. Each section has its own **engagement**, **author details**, and **filters**.

#### Videos by URL
Open specific TikTok video links or IDs, with optional enrichment toggles for this path.

#### Related videos
Seed video URLs → related recommendations, with path-level enrichment toggles.

#### Creator video grids
Recent posts from usernames (for full profiles, use **Search or discover creators**), with enrichment + min plays / date filters.

#### Search or discover creators
Two modes:
- **By username / URL** — deep profiles for known handles
- **Search / discover by keyword** — find creators matching a topic, then load full stats

Optional: also fetch each creator’s recent videos.

#### Hashtags & Sounds
- **Discover** — trending hashtags and sounds for your market
- **Specific hashtags** — meta for named tags, with optional videos under each tag

#### Search Suggestions
Autocomplete / related phrases TikTok associates with your keywords — ideal for demand research and content planning.

#### Comments
Three ways to pick videos: **search by keyword**, paste **URLs**, or reuse **run-collected videos**. Set videos per keyword, comments per video, and optional **min comment likes**.

#### Scrape by URL
Paste any TikTok video, profile, or hashtag URL — the Actor detects the type and returns the right record shape.

#### Webhooks
Every record is **always** saved to the run dataset. Optionally POST each record to your **webhook URL** (CRM, Slack, Zapier, Make, custom API) as it is collected.

---

### Use cases

- **Content & trend research** — keyword videos with plays, likes, and music signals
- **Creator discovery & outreach** — find profiles by topic; export followers, bio, and bio link
- **Brand monitoring** — track hashtags, sounds, and mentions over time
- **Competitive intelligence** — related videos and creator grids around competitors
- **Influencer shortlists** — filter by engagement and account size
- **Comment listening** — sample audience language under high-performing videos
- **AI & LLM pipelines** — structured JSON for RAG, scoring, summaries, and draft content
- **CRM / warehouse feeds** — stream via dataset API or real-time webhook

---

### LLM & MCP integration

Output is **JSON Lines–friendly structured data** — ideal for ChatGPT, Claude, Gemini, LangChain, LlamaIndex, and custom agents.

#### Recommended workflow
1. Run the Actor with the features you need (prefilled Videos works out of the box).
2. Fetch dataset items via [Apify API](https://docs.apify.com/api/v2) or export JSON/CSV.
3. Pass records to your LLM with a system prompt, or index into a vector store.

#### Example: video record for an LLM prompt

```json
{
  "featureType": "video",
  "videoSource": "keyword",
  "videoId": "7635410154141338893",
  "url": "https://www.tiktok.com/@creator/video/7635410154141338893",
  "description": "Easy weeknight dinner tips #cooking",
  "author": "creator",
  "playCount": 11900000,
  "diggCount": 850000,
  "commentCount": 1384,
  "searchQuery": "cooking",
  "scrapedAt": "2026-07-16T12:00:00.000Z"
}
````

#### Apify MCP (Model Context Protocol)

Use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) so AI assistants can:

- **Run** this Actor with natural-language instructions
- **Read** dataset results directly in the chat
- **Chain** with other Actors (e.g. collect → score → CRM)

Typical MCP tool flow:

```
User: "Find 30 cooking videos with high play counts and summarize hooks"
→ MCP runs Actor with enableVideoKeyword, videoKeywords=["cooking"], videoFetchEngagement=true
→ MCP reads dataset items
→ LLM summarizes descriptions, music, and engagement
```

#### API quick start

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "enableVideoKeyword": true,
    "videoKeywords": ["cooking", "gym tips"],
    "videoMaxResults": 20,
    "videoKeywordFetchEngagement": true
  }'
```

Dataset items: `GET https://api.apify.com/v2/datasets/{datasetId}/items?format=json`

***

### Input reference

Enable only what you need. Features are independent. Defaults are prefilled so **Start works immediately**.

| Input | Type | Default | Description |
|-------|------|---------|-------------|
| **Keyword videos** | | | |
| `enableVideoKeyword` | boolean | `true` | Search videos by topic |
| `videoKeywords` | string\[] | `["cooking","gym tips"]` | Search keywords |
| `videoMaxResults` | integer | `20` | Max videos per keyword |
| `videoKeywordFetchEngagement` | boolean | `true` | Full stats for keyword videos |
| `videoKeywordFetchAccountDetails` | boolean | `false` | Author fields on keyword rows |
| `videoKeywordMinPlays` / `videoKeywordPublishedWithin` | | | Filters for this path |
| **Videos by URL** | | | |
| `enableVideoUrl` | boolean | `false` | Open specific video links |
| `videoUrls` / `videoIds` | string\[] | — | Video URLs or IDs |
| `videoUrlFetchEngagement` / `videoUrlFetchAccountDetails` | boolean | | Enrichment for URL path |
| **Related videos** | | | |
| `enableVideoRelated` | boolean | `false` | Related / recommended clips |
| `relatedVideoUrls` | string\[] | — | Seed video URLs |
| `relatedMaxResults` | integer | `16` | Related per seed |
| `videoRelatedFetchEngagement` / `videoRelatedFetchAccountDetails` | boolean | | Enrichment for related path |
| **Creator video grids** | | | |
| `enableVideoUser` | boolean | `false` | Recent posts from usernames |
| `videoUsernames` | string\[] | — | Usernames without @ |
| `videoUserMaxResults` | integer | `20` | Videos per creator |
| `videoUserFetchEngagement` / filters | | | Enrichment + min plays / date |
| **Search or discover creators** | | | |
| `enableAccounts` | boolean | `false` | Look up or discover creator profiles |
| `accountMode` | enum | `url` | `url` or `keyword` |
| `accountUsernames` / `accountUrls` | string\[] | — | Specific profiles |
| `accountKeywords` | string\[] | — | Search / discover keywords |
| `accountsPerKeyword` | integer | `15` | Max creators per keyword |
| `accountFetchRecentVideos` | boolean | `false` | Also fetch recent posts |
| `accountRecentVideosMax` | integer | `12` | Videos per creator |
| **Hashtags & Sounds** | | | |
| `enableTrends` | boolean | `false` | Trends section |
| `trendsMode` | enum | `discover` | `discover`, `hashtag`, `all` |
| `hashtags` | string\[] | — | Specific tags (without `#`) |
| `hashtagFetchVideos` | boolean | `true` | Videos under each hashtag |
| `hashtagMaxVideos` | integer | `20` | Videos per hashtag |
| `discoverMaxHashtags` / `discoverMaxSounds` | integer | `40` / `20` | Discover caps |
| `discoverHydrateDetails` | boolean | `true` | Full hashtag stats on discover |
| **Suggestions** | | | |
| `enableSuggestions` | boolean | `false` | Search suggestions |
| `suggestionKeywords` | string\[] | — | Defaults to video keywords if empty |
| `suggestionsMaxResults` | integer | `15` | Per keyword |
| **Comments** | | | |
| `enableComments` | boolean | `false` | Comment rows |
| `commentKeywords` | string\[] | — | Find videos by keyword, then load comments |
| `commentSearchMaxVideos` | integer | `5` | Videos per comment keyword |
| `commentsMaxResults` | integer | `30` | Comments per video |
| `commentMinDiggs` | integer | `0` | Min likes on a comment (0 = off) |
| `commentVideoUrls` / `commentVideoIds` | string\[] | — | Explicit video targets |
| `commentsFromSearchResults` | boolean | `false` | Also use videos from this run |
| `commentsFromSearchMaxVideos` | integer | `10` | Cap for run-collected videos |
| **Scrape by URL** | | | |
| `enableScrapeByUrl` | boolean | `false` | Auto-detect URL type |
| `scrapeUrls` | string\[] | — | Video / profile / tag URLs |
| **Output & delivery** | | | |
| `webhookUrl` | string | — | Optional real-time POST per record |
| `webhookFormat` | enum | `json` | `json` or `slack` |
| `includeRaw` | boolean | `false` | Extended payloads |

Full schema: `.actor/input_schema.json` or the **Input** tab on Apify Console.

***

### Output reference

Each dataset row is one record. Filter by `featureType`:

| `featureType` | Description |
|---------------|-------------|
| `video` | Unified video row (`videoSource` explains origin) |
| `account` | Creator profile |
| `hashtag` | Hashtag / trend tag |
| `sound` | Trending or discover sound |
| `suggestion` | Search suggestion phrase |
| `comment` | Single comment |

**Dataset views** in Apify Console: Overview, Videos, Creators, Hashtags, Sounds, Comments.

Export: **JSON**, **CSV**, **Excel**, **RSS**, or **API**.

#### Streaming & memory

Records are **pushed to the dataset as they are collected**. The Actor does not hold the full run result set in RAM, so long runs stay stable. Control volume with the limits inside each feature section (videos per keyword, comments per video, etc.).

#### Webhook delivery

1. Set `webhookUrl` to your endpoint (HTTPS recommended).
2. Choose `webhookFormat`: **JSON** (full record) or **Slack** (short message).
3. Each successful dataset write is also POSTed to your URL (best-effort — webhook failures never drop dataset data).

***

### Quick start examples

**Keyword videos (default-style)**

```json
{
  "enableVideoKeyword": true,
  "videoKeywords": ["cooking", "gym tips"],
  "videoMaxResults": 20,
  "videoKeywordFetchEngagement": true
}
```

**Search or discover creators by keyword**

```json
{
  "enableVideoKeyword": false,
  "enableAccounts": true,
  "accountMode": "keyword",
  "accountKeywords": ["gordon ramsay"],
  "accountsPerKeyword": 10,
  "accountFetchRecentVideos": true,
  "accountRecentVideosMax": 5
}
```

**Trending hashtags & sounds**

```json
{
  "enableVideoKeyword": false,
  "enableTrends": true,
  "trendsMode": "discover",
  "discoverMaxHashtags": 30,
  "discoverMaxSounds": 15
}
```

**Keyword videos + comments from this run + webhook**

```json
{
  "enableVideoKeyword": true,
  "videoKeywords": ["skincare"],
  "videoMaxResults": 10,
  "enableComments": true,
  "commentsFromSearchResults": true,
  "commentsFromSearchMaxVideos": 5,
  "commentsMaxResults": 20,
  "webhookUrl": "https://hooks.example.com/tiktok",
  "webhookFormat": "json"
}
```

***

### Performance

- Connection routing is handled automatically by the Actor.
- Default memory: **1024 MB**.
- Results **stream to the dataset** continuously; pair with webhooks for live pipelines.

***

### Limitations & compliance

- Some surfaces (for example public comments) depend on what TikTok exposes without a user login; yield can vary by region and content type.
- Unofficial tool — not affiliated with TikTok. Use responsibly and comply with applicable laws and TikTok’s Terms of Service.

***

### Contact & custom work

Need something beyond this Actor? I build **custom scrapers**, **data pipelines**, and **full-stack web applications** of any kind for startups and enterprises.

- **Email:** <dubem115@gmail.com>
- **GitHub:** [github.com/DrunkCodes](https://github.com/DrunkCodes)

Reach out for:

- Custom TikTok, Instagram, LinkedIn, Google Maps, or any site collection
- Lead-gen and enrichment systems
- Dashboards, internal tools, and production web apps
- AI agents and MCP-powered workflows wired to your data

***

### License

ISC

***

*TikTok Real-Time Data · by [DrunkCodes](https://github.com/DrunkCodes)*

# Actor input Schema

## `enableVideoKeyword` (type: `boolean`):

Find videos by topic/keyword. On by default with sample keywords so you can click Start immediately.

## `videoKeywords` (type: `array`):

Topics to search (e.g. cooking, gym tips, skincare).

## `videoMaxResults` (type: `integer`):

Maximum videos to collect per keyword (1–100).

## `videoKeywordFetchEngagement` (type: `boolean`):

On by default for keyword videos. Adds plays, likes, comments, shares, music, duration, and cover.

## `videoKeywordFetchAccountDetails` (type: `boolean`):

Optional. Adds author followers, bio, and verified status on each keyword video row.

## `videoKeywordMinPlays` (type: `integer`):

Keep only keyword videos at or above this play count (0 = no filter).

## `videoKeywordPublishedWithin` (type: `string`):

Only keep keyword videos published in this time window.

## `enableVideoUrl` (type: `boolean`):

Open specific TikTok video links or IDs and save one row per video.

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

Full TikTok video links (https://www.tiktok.com/@user/video/ID).

## `videoIds` (type: `array`):

Numeric video IDs (optional alternative to URLs).

## `videoUrlFetchEngagement` (type: `boolean`):

On by default. Ensures full stats are present on each URL video row.

## `videoUrlFetchAccountDetails` (type: `boolean`):

Optional. Adds author followers, bio, and verified status on each URL video row.

## `enableVideoRelated` (type: `boolean`):

Load related / recommended videos for seed video URLs.

## `relatedVideoUrls` (type: `array`):

Source videos for related recommendations. Falls back to Videos by URL list if empty.

## `relatedMaxResults` (type: `integer`):

Maximum related videos per seed video.

## `videoRelatedFetchEngagement` (type: `boolean`):

On by default for related videos.

## `videoRelatedFetchAccountDetails` (type: `boolean`):

Optional. Adds author profile fields on each related video row.

## `enableVideoUser` (type: `boolean`):

Pull recent videos from specific creator profiles (without loading full creator rows).

## `videoUsernames` (type: `array`):

Usernames without @ (e.g. charlidamelio).

## `videoUserMaxResults` (type: `integer`):

Maximum recent videos per creator.

## `videoUserFetchEngagement` (type: `boolean`):

On by default for creator grid videos.

## `videoUserFetchAccountDetails` (type: `boolean`):

Optional. Adds author profile fields on each grid video row.

## `videoUserMinPlays` (type: `integer`):

Keep only grid videos at or above this play count (0 = no filter).

## `videoUserPublishedWithin` (type: `string`):

Only keep grid videos published in this time window.

## `enableAccounts` (type: `boolean`):

Look up known creator profiles by username/URL, or discover creators by keyword. Each profile is one dataset row (followers, hearts, bio, verified, bio link).

## `accountMode` (type: `string`):

By username/URL, or discover by keyword then load each profile.

## `accountUsernames` (type: `array`):

TikTok usernames without @ (e.g. charlidamelio). Used when looking up specific profiles.

## `accountUrls` (type: `array`):

Profile links such as https://www.tiktok.com/@username

## `accountKeywords` (type: `array`):

Discover creators matching these topics, then load full profiles.

## `accountsPerKeyword` (type: `integer`):

Maximum creators to keep from each keyword search (1–50).

## `accountFetchRecentVideos` (type: `boolean`):

After each profile, also collect recent posts (separate video rows).

## `accountRecentVideosMax` (type: `integer`):

Maximum recent videos per creator when the option above is on.

## `enableTrends` (type: `boolean`):

Collect trending hashtags and sounds, and/or specific hashtags with optional videos.

## `trendsMode` (type: `string`):

Discover trending content, specific hashtags, or both.

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

Hashtag names without # (e.g. cooking, gymtok). Used in hashtag mode.

## `hashtagFetchVideos` (type: `boolean`):

Also collect videos under each hashtag. Off = hashtag info only.

## `hashtagMaxVideos` (type: `integer`):

Maximum videos per hashtag when video fetch is on.

## `discoverMaxHashtags` (type: `integer`):

Maximum trending hashtags to save in discover mode.

## `discoverMaxSounds` (type: `integer`):

Maximum trending sounds to save in discover mode.

## `discoverHydrateDetails` (type: `boolean`):

Add fuller hashtag stats (views, video count, description, cover) on discover results. On by default.

## `enableSuggestions` (type: `boolean`):

Collect related search phrases and demand language for your keywords.

## `suggestionKeywords` (type: `array`):

Keywords to expand. Defaults to video keywords when empty.

## `suggestionsMaxResults` (type: `integer`):

Maximum suggestion phrases per keyword.

## `enableComments` (type: `boolean`):

Collect comments via keyword video search, specific video URLs, and/or videos found earlier in this run. One comment = one dataset row.

## `commentKeywords` (type: `array`):

Search TikTok for videos matching these topics, then load comments on the top results. Leave empty to use only URLs or run-collected videos.

## `commentSearchMaxVideos` (type: `integer`):

How many videos to take from each comment keyword search (1–50).

## `commentsMaxResults` (type: `integer`):

Maximum comments to save per video.

## `commentMinDiggs` (type: `integer`):

Keep only comments with at least this many likes (0 = no filter).

## `commentVideoUrls` (type: `array`):

Optional. Full TikTok video URLs to load comments for (in addition to keyword search).

## `commentVideoIds` (type: `array`):

Optional. Numeric video IDs (alternative to URLs).

## `commentsFromSearchResults` (type: `boolean`):

After keyword / URL / hashtag video collection in this run, also load comments for those videos (up to the cap below).

## `commentsFromSearchMaxVideos` (type: `integer`):

How many videos collected earlier in this run get comments (1–50).

## `enableScrapeByUrl` (type: `boolean`):

Paste any TikTok video, profile, or hashtag URL — the Actor detects the type automatically.

## `scrapeUrls` (type: `array`):

TikTok video, @profile, or /tag/ hashtag URLs.

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

Optional. Every record is always saved to the run’s dataset as it is collected — this webhook is an additional real-time push (CRM, Slack, Zapier, Make, custom API).

## `webhookFormat` (type: `string`):

json = full record object; slack = short Slack-friendly message.

## `includeRaw` (type: `boolean`):

Attach extended source fragments on each record. Larger output — for advanced users only.

## Actor input object example

```json
{
  "enableVideoKeyword": true,
  "videoKeywords": [
    "cooking",
    "gym tips"
  ],
  "videoMaxResults": 20,
  "videoKeywordFetchEngagement": true,
  "videoKeywordFetchAccountDetails": false,
  "videoKeywordMinPlays": 0,
  "videoKeywordPublishedWithin": "any",
  "enableVideoUrl": false,
  "videoUrls": [],
  "videoIds": [],
  "videoUrlFetchEngagement": true,
  "videoUrlFetchAccountDetails": false,
  "enableVideoRelated": false,
  "relatedVideoUrls": [],
  "relatedMaxResults": 16,
  "videoRelatedFetchEngagement": true,
  "videoRelatedFetchAccountDetails": false,
  "enableVideoUser": false,
  "videoUsernames": [],
  "videoUserMaxResults": 20,
  "videoUserFetchEngagement": true,
  "videoUserFetchAccountDetails": false,
  "videoUserMinPlays": 0,
  "videoUserPublishedWithin": "any",
  "enableAccounts": false,
  "accountMode": "url",
  "accountUsernames": [
    "tiktok"
  ],
  "accountUrls": [],
  "accountKeywords": [
    "cooking"
  ],
  "accountsPerKeyword": 15,
  "accountFetchRecentVideos": false,
  "accountRecentVideosMax": 12,
  "enableTrends": false,
  "trendsMode": "discover",
  "hashtags": [
    "cooking",
    "fyp"
  ],
  "hashtagFetchVideos": true,
  "hashtagMaxVideos": 20,
  "discoverMaxHashtags": 40,
  "discoverMaxSounds": 20,
  "discoverHydrateDetails": true,
  "enableSuggestions": false,
  "suggestionKeywords": [
    "gym tips"
  ],
  "suggestionsMaxResults": 15,
  "enableComments": false,
  "commentKeywords": [
    "cooking"
  ],
  "commentSearchMaxVideos": 5,
  "commentsMaxResults": 30,
  "commentMinDiggs": 0,
  "commentVideoUrls": [],
  "commentVideoIds": [],
  "commentsFromSearchResults": false,
  "commentsFromSearchMaxVideos": 10,
  "enableScrapeByUrl": false,
  "scrapeUrls": [],
  "webhookUrl": "",
  "webhookFormat": "json",
  "includeRaw": false
}
```

# Actor output Schema

## `overview` (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 = {
    "enableVideoKeyword": true,
    "videoKeywords": [
        "cooking",
        "gym tips"
    ],
    "videoMaxResults": 20,
    "videoKeywordFetchEngagement": true,
    "videoKeywordFetchAccountDetails": false,
    "videoKeywordMinPlays": 0,
    "videoKeywordPublishedWithin": "any",
    "enableVideoUrl": false,
    "videoUrls": [],
    "videoIds": [],
    "videoUrlFetchEngagement": true,
    "videoUrlFetchAccountDetails": false,
    "enableVideoRelated": false,
    "relatedVideoUrls": [],
    "relatedMaxResults": 16,
    "videoRelatedFetchEngagement": true,
    "videoRelatedFetchAccountDetails": false,
    "enableVideoUser": false,
    "videoUsernames": [],
    "videoUserMaxResults": 20,
    "videoUserFetchEngagement": true,
    "videoUserFetchAccountDetails": false,
    "videoUserMinPlays": 0,
    "videoUserPublishedWithin": "any",
    "enableAccounts": false,
    "accountMode": "url",
    "accountUsernames": [
        "tiktok"
    ],
    "accountUrls": [],
    "accountKeywords": [
        "cooking"
    ],
    "accountsPerKeyword": 15,
    "accountFetchRecentVideos": false,
    "accountRecentVideosMax": 12,
    "enableTrends": false,
    "trendsMode": "discover",
    "hashtags": [
        "cooking",
        "fyp"
    ],
    "hashtagFetchVideos": true,
    "hashtagMaxVideos": 20,
    "discoverMaxHashtags": 40,
    "discoverMaxSounds": 20,
    "discoverHydrateDetails": true,
    "enableSuggestions": false,
    "suggestionKeywords": [
        "gym tips"
    ],
    "suggestionsMaxResults": 15,
    "enableComments": false,
    "commentKeywords": [
        "cooking"
    ],
    "commentSearchMaxVideos": 5,
    "commentsMaxResults": 30,
    "commentMinDiggs": 0,
    "commentVideoUrls": [],
    "commentVideoIds": [],
    "commentsFromSearchResults": false,
    "commentsFromSearchMaxVideos": 10,
    "enableScrapeByUrl": false,
    "scrapeUrls": [],
    "webhookFormat": "json",
    "includeRaw": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_leads/tiktok-real-time-data").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 = {
    "enableVideoKeyword": True,
    "videoKeywords": [
        "cooking",
        "gym tips",
    ],
    "videoMaxResults": 20,
    "videoKeywordFetchEngagement": True,
    "videoKeywordFetchAccountDetails": False,
    "videoKeywordMinPlays": 0,
    "videoKeywordPublishedWithin": "any",
    "enableVideoUrl": False,
    "videoUrls": [],
    "videoIds": [],
    "videoUrlFetchEngagement": True,
    "videoUrlFetchAccountDetails": False,
    "enableVideoRelated": False,
    "relatedVideoUrls": [],
    "relatedMaxResults": 16,
    "videoRelatedFetchEngagement": True,
    "videoRelatedFetchAccountDetails": False,
    "enableVideoUser": False,
    "videoUsernames": [],
    "videoUserMaxResults": 20,
    "videoUserFetchEngagement": True,
    "videoUserFetchAccountDetails": False,
    "videoUserMinPlays": 0,
    "videoUserPublishedWithin": "any",
    "enableAccounts": False,
    "accountMode": "url",
    "accountUsernames": ["tiktok"],
    "accountUrls": [],
    "accountKeywords": ["cooking"],
    "accountsPerKeyword": 15,
    "accountFetchRecentVideos": False,
    "accountRecentVideosMax": 12,
    "enableTrends": False,
    "trendsMode": "discover",
    "hashtags": [
        "cooking",
        "fyp",
    ],
    "hashtagFetchVideos": True,
    "hashtagMaxVideos": 20,
    "discoverMaxHashtags": 40,
    "discoverMaxSounds": 20,
    "discoverHydrateDetails": True,
    "enableSuggestions": False,
    "suggestionKeywords": ["gym tips"],
    "suggestionsMaxResults": 15,
    "enableComments": False,
    "commentKeywords": ["cooking"],
    "commentSearchMaxVideos": 5,
    "commentsMaxResults": 30,
    "commentMinDiggs": 0,
    "commentVideoUrls": [],
    "commentVideoIds": [],
    "commentsFromSearchResults": False,
    "commentsFromSearchMaxVideos": 10,
    "enableScrapeByUrl": False,
    "scrapeUrls": [],
    "webhookFormat": "json",
    "includeRaw": False,
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_leads/tiktok-real-time-data").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "enableVideoKeyword": true,
  "videoKeywords": [
    "cooking",
    "gym tips"
  ],
  "videoMaxResults": 20,
  "videoKeywordFetchEngagement": true,
  "videoKeywordFetchAccountDetails": false,
  "videoKeywordMinPlays": 0,
  "videoKeywordPublishedWithin": "any",
  "enableVideoUrl": false,
  "videoUrls": [],
  "videoIds": [],
  "videoUrlFetchEngagement": true,
  "videoUrlFetchAccountDetails": false,
  "enableVideoRelated": false,
  "relatedVideoUrls": [],
  "relatedMaxResults": 16,
  "videoRelatedFetchEngagement": true,
  "videoRelatedFetchAccountDetails": false,
  "enableVideoUser": false,
  "videoUsernames": [],
  "videoUserMaxResults": 20,
  "videoUserFetchEngagement": true,
  "videoUserFetchAccountDetails": false,
  "videoUserMinPlays": 0,
  "videoUserPublishedWithin": "any",
  "enableAccounts": false,
  "accountMode": "url",
  "accountUsernames": [
    "tiktok"
  ],
  "accountUrls": [],
  "accountKeywords": [
    "cooking"
  ],
  "accountsPerKeyword": 15,
  "accountFetchRecentVideos": false,
  "accountRecentVideosMax": 12,
  "enableTrends": false,
  "trendsMode": "discover",
  "hashtags": [
    "cooking",
    "fyp"
  ],
  "hashtagFetchVideos": true,
  "hashtagMaxVideos": 20,
  "discoverMaxHashtags": 40,
  "discoverMaxSounds": 20,
  "discoverHydrateDetails": true,
  "enableSuggestions": false,
  "suggestionKeywords": [
    "gym tips"
  ],
  "suggestionsMaxResults": 15,
  "enableComments": false,
  "commentKeywords": [
    "cooking"
  ],
  "commentSearchMaxVideos": 5,
  "commentsMaxResults": 30,
  "commentMinDiggs": 0,
  "commentVideoUrls": [],
  "commentVideoIds": [],
  "commentsFromSearchResults": false,
  "commentsFromSearchMaxVideos": 10,
  "enableScrapeByUrl": false,
  "scrapeUrls": [],
  "webhookFormat": "json",
  "includeRaw": false
}' |
apify call b2b_leads/tiktok-real-time-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=b2b_leads/tiktok-real-time-data",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Scraper — Videos, Creators, Hashtags, Comments & Trends",
        "description": "TikTok scraper & real-time data API for videos, creators, hashtags, sounds, comments & search suggestions. Keyword video search, influencer profiles, engagement stats, related videos & webhooks. Structured JSON for marketing, influencer research, trend analysis, brand monitoring & LLM pipelines.",
        "version": "0.0",
        "x-build-id": "9toO2MVUEJwHJs4Xy"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/b2b_leads~tiktok-real-time-data/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-b2b_leads-tiktok-real-time-data",
                "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/b2b_leads~tiktok-real-time-data/runs": {
            "post": {
                "operationId": "runs-sync-b2b_leads-tiktok-real-time-data",
                "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/b2b_leads~tiktok-real-time-data/run-sync": {
            "post": {
                "operationId": "run-sync-b2b_leads-tiktok-real-time-data",
                "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": {
                    "enableVideoKeyword": {
                        "title": "Keyword videos",
                        "type": "boolean",
                        "description": "Find videos by topic/keyword. On by default with sample keywords so you can click Start immediately.",
                        "default": true
                    },
                    "videoKeywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Topics to search (e.g. cooking, gym tips, skincare).",
                        "default": [
                            "cooking",
                            "gym tips"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "videoMaxResults": {
                        "title": "Videos per keyword",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum videos to collect per keyword (1–100).",
                        "default": 20
                    },
                    "videoKeywordFetchEngagement": {
                        "title": "Full engagement details",
                        "type": "boolean",
                        "description": "On by default for keyword videos. Adds plays, likes, comments, shares, music, duration, and cover.",
                        "default": true
                    },
                    "videoKeywordFetchAccountDetails": {
                        "title": "Author account details",
                        "type": "boolean",
                        "description": "Optional. Adds author followers, bio, and verified status on each keyword video row.",
                        "default": false
                    },
                    "videoKeywordMinPlays": {
                        "title": "Min play count",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Keep only keyword videos at or above this play count (0 = no filter).",
                        "default": 0
                    },
                    "videoKeywordPublishedWithin": {
                        "title": "Published within",
                        "enum": [
                            "any",
                            "7d",
                            "30d",
                            "90d"
                        ],
                        "type": "string",
                        "description": "Only keep keyword videos published in this time window.",
                        "default": "any"
                    },
                    "enableVideoUrl": {
                        "title": "Videos by URL",
                        "type": "boolean",
                        "description": "Open specific TikTok video links or IDs and save one row per video.",
                        "default": false
                    },
                    "videoUrls": {
                        "title": "Video URLs",
                        "type": "array",
                        "description": "Full TikTok video links (https://www.tiktok.com/@user/video/ID).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "videoIds": {
                        "title": "Video IDs",
                        "type": "array",
                        "description": "Numeric video IDs (optional alternative to URLs).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "videoUrlFetchEngagement": {
                        "title": "Full engagement details",
                        "type": "boolean",
                        "description": "On by default. Ensures full stats are present on each URL video row.",
                        "default": true
                    },
                    "videoUrlFetchAccountDetails": {
                        "title": "Author account details",
                        "type": "boolean",
                        "description": "Optional. Adds author followers, bio, and verified status on each URL video row.",
                        "default": false
                    },
                    "enableVideoRelated": {
                        "title": "Related videos",
                        "type": "boolean",
                        "description": "Load related / recommended videos for seed video URLs.",
                        "default": false
                    },
                    "relatedVideoUrls": {
                        "title": "Seed video URLs",
                        "type": "array",
                        "description": "Source videos for related recommendations. Falls back to Videos by URL list if empty.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "relatedMaxResults": {
                        "title": "Related videos per seed",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum related videos per seed video.",
                        "default": 16
                    },
                    "videoRelatedFetchEngagement": {
                        "title": "Full engagement details",
                        "type": "boolean",
                        "description": "On by default for related videos.",
                        "default": true
                    },
                    "videoRelatedFetchAccountDetails": {
                        "title": "Author account details",
                        "type": "boolean",
                        "description": "Optional. Adds author profile fields on each related video row.",
                        "default": false
                    },
                    "enableVideoUser": {
                        "title": "Creator video grids",
                        "type": "boolean",
                        "description": "Pull recent videos from specific creator profiles (without loading full creator rows).",
                        "default": false
                    },
                    "videoUsernames": {
                        "title": "Creator usernames",
                        "type": "array",
                        "description": "Usernames without @ (e.g. charlidamelio).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "videoUserMaxResults": {
                        "title": "Videos per creator",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum recent videos per creator.",
                        "default": 20
                    },
                    "videoUserFetchEngagement": {
                        "title": "Full engagement details",
                        "type": "boolean",
                        "description": "On by default for creator grid videos.",
                        "default": true
                    },
                    "videoUserFetchAccountDetails": {
                        "title": "Author account details",
                        "type": "boolean",
                        "description": "Optional. Adds author profile fields on each grid video row.",
                        "default": false
                    },
                    "videoUserMinPlays": {
                        "title": "Min play count",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Keep only grid videos at or above this play count (0 = no filter).",
                        "default": 0
                    },
                    "videoUserPublishedWithin": {
                        "title": "Published within",
                        "enum": [
                            "any",
                            "7d",
                            "30d",
                            "90d"
                        ],
                        "type": "string",
                        "description": "Only keep grid videos published in this time window.",
                        "default": "any"
                    },
                    "enableAccounts": {
                        "title": "Search or discover creators",
                        "type": "boolean",
                        "description": "Look up known creator profiles by username/URL, or discover creators by keyword. Each profile is one dataset row (followers, hearts, bio, verified, bio link).",
                        "default": false
                    },
                    "accountMode": {
                        "title": "How to find creators",
                        "enum": [
                            "url",
                            "keyword"
                        ],
                        "type": "string",
                        "description": "By username/URL, or discover by keyword then load each profile.",
                        "default": "url"
                    },
                    "accountUsernames": {
                        "title": "Usernames",
                        "type": "array",
                        "description": "TikTok usernames without @ (e.g. charlidamelio). Used when looking up specific profiles.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "accountUrls": {
                        "title": "Profile URLs",
                        "type": "array",
                        "description": "Profile links such as https://www.tiktok.com/@username",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "accountKeywords": {
                        "title": "Search / discover keywords",
                        "type": "array",
                        "description": "Discover creators matching these topics, then load full profiles.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "accountsPerKeyword": {
                        "title": "Creators per keyword",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum creators to keep from each keyword search (1–50).",
                        "default": 15
                    },
                    "accountFetchRecentVideos": {
                        "title": "Also fetch recent videos",
                        "type": "boolean",
                        "description": "After each profile, also collect recent posts (separate video rows).",
                        "default": false
                    },
                    "accountRecentVideosMax": {
                        "title": "Recent videos per creator",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum recent videos per creator when the option above is on.",
                        "default": 12
                    },
                    "enableTrends": {
                        "title": "Hashtags & Sounds",
                        "type": "boolean",
                        "description": "Collect trending hashtags and sounds, and/or specific hashtags with optional videos.",
                        "default": false
                    },
                    "trendsMode": {
                        "title": "Trends mode",
                        "enum": [
                            "discover",
                            "hashtag",
                            "all"
                        ],
                        "type": "string",
                        "description": "Discover trending content, specific hashtags, or both.",
                        "default": "discover"
                    },
                    "hashtags": {
                        "title": "Hashtags",
                        "type": "array",
                        "description": "Hashtag names without # (e.g. cooking, gymtok). Used in hashtag mode.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "hashtagFetchVideos": {
                        "title": "Fetch videos for hashtags",
                        "type": "boolean",
                        "description": "Also collect videos under each hashtag. Off = hashtag info only.",
                        "default": true
                    },
                    "hashtagMaxVideos": {
                        "title": "Videos per hashtag",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum videos per hashtag when video fetch is on.",
                        "default": 20
                    },
                    "discoverMaxHashtags": {
                        "title": "Max discover hashtags",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum trending hashtags to save in discover mode.",
                        "default": 40
                    },
                    "discoverMaxSounds": {
                        "title": "Max discover sounds",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum trending sounds to save in discover mode.",
                        "default": 20
                    },
                    "discoverHydrateDetails": {
                        "title": "Enrich discover hashtag details",
                        "type": "boolean",
                        "description": "Add fuller hashtag stats (views, video count, description, cover) on discover results. On by default.",
                        "default": true
                    },
                    "enableSuggestions": {
                        "title": "Search Suggestions",
                        "type": "boolean",
                        "description": "Collect related search phrases and demand language for your keywords.",
                        "default": false
                    },
                    "suggestionKeywords": {
                        "title": "Suggestion keywords",
                        "type": "array",
                        "description": "Keywords to expand. Defaults to video keywords when empty.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "suggestionsMaxResults": {
                        "title": "Max suggestions per keyword",
                        "minimum": 1,
                        "maximum": 30,
                        "type": "integer",
                        "description": "Maximum suggestion phrases per keyword.",
                        "default": 15
                    },
                    "enableComments": {
                        "title": "Comments",
                        "type": "boolean",
                        "description": "Collect comments via keyword video search, specific video URLs, and/or videos found earlier in this run. One comment = one dataset row.",
                        "default": false
                    },
                    "commentKeywords": {
                        "title": "Find videos by keyword",
                        "type": "array",
                        "description": "Search TikTok for videos matching these topics, then load comments on the top results. Leave empty to use only URLs or run-collected videos.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "commentSearchMaxVideos": {
                        "title": "Videos per keyword (for comments)",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "How many videos to take from each comment keyword search (1–50).",
                        "default": 5
                    },
                    "commentsMaxResults": {
                        "title": "Max comments per video",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum comments to save per video.",
                        "default": 30
                    },
                    "commentMinDiggs": {
                        "title": "Min comment likes",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Keep only comments with at least this many likes (0 = no filter).",
                        "default": 0
                    },
                    "commentVideoUrls": {
                        "title": "Video URLs for comments",
                        "type": "array",
                        "description": "Optional. Full TikTok video URLs to load comments for (in addition to keyword search).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "commentVideoIds": {
                        "title": "Video IDs for comments",
                        "type": "array",
                        "description": "Optional. Numeric video IDs (alternative to URLs).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "commentsFromSearchResults": {
                        "title": "Also comment on run-collected videos",
                        "type": "boolean",
                        "description": "After keyword / URL / hashtag video collection in this run, also load comments for those videos (up to the cap below).",
                        "default": false
                    },
                    "commentsFromSearchMaxVideos": {
                        "title": "Max run videos for comments",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "How many videos collected earlier in this run get comments (1–50).",
                        "default": 10
                    },
                    "enableScrapeByUrl": {
                        "title": "Scrape By URL",
                        "type": "boolean",
                        "description": "Paste any TikTok video, profile, or hashtag URL — the Actor detects the type automatically.",
                        "default": false
                    },
                    "scrapeUrls": {
                        "title": "URLs to scrape",
                        "type": "array",
                        "description": "TikTok video, @profile, or /tag/ hashtag URLs.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "webhookUrl": {
                        "title": "Webhook URL",
                        "type": "string",
                        "description": "Optional. Every record is always saved to the run’s dataset as it is collected — this webhook is an additional real-time push (CRM, Slack, Zapier, Make, custom API).",
                        "default": ""
                    },
                    "webhookFormat": {
                        "title": "Webhook format",
                        "enum": [
                            "json",
                            "slack"
                        ],
                        "type": "string",
                        "description": "json = full record object; slack = short Slack-friendly message.",
                        "default": "json"
                    },
                    "includeRaw": {
                        "title": "Include raw data",
                        "type": "boolean",
                        "description": "Attach extended source fragments on each record. Larger output — for advanced users only.",
                        "default": 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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
