# TikTok Multi Scraper (`gentle_cloud/tiktok-data-extractor`) Actor

Extract TikTok profiles, videos, hashtags, trending content, and music data. Download watermark-free videos. One Actor replaces 13 separate scrapers. Fastest, cheapest, most complete TikTok data solution on Apify.

- **URL**: https://apify.com/gentle\_cloud/tiktok-data-extractor.md
- **Developed by:** [Monkey Coder](https://apify.com/gentle_cloud) (community)
- **Categories:** SEO tools, Videos, Developer tools
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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 Data Extractor — All-in-One Scraper

The most complete TikTok data extraction tool on Apify. One Actor replaces 13 separate scrapers. Extract profiles, videos, hashtags, trending content, music data, and download watermark-free videos — all from a single interface.

### 🚀 What It Does

| Mode | Description |
|------|-------------|
| **Video** | Extract metadata, stats, and author info from specific TikTok video URLs |
| **Profile** | Scrape all videos from one or more TikTok user profiles |
| **Hashtag** | Retrieve hashtag/challenge statistics (total video count, view count) |
| **Download** | Save watermark-free videos to cloud storage with direct download links |
| **Music** | Extract music/sound information including track name, artist, and play URL |
| **Trending** | ⚠️ Currently limited — requires residential proxies (coming soon) |

### ✨ Key Features

- **All-in-One**: 6 modes in a single Actor — no need for separate scrapers
- **Watermark-Free Downloads**: Save clean videos directly to Apify cloud storage
- **Rich Data**: Full video metadata, engagement stats, author info, music details, hashtags, and subtitles
- **Bulk Processing**: Handle hundreds of videos, profiles, or hashtags in one run
- **Competitor-Compatible Output**: Drop-in replacement for other TikTok scrapers with matching data schema

### 📋 How to Use

#### 1. Choose a Mode

Select your extraction mode from the dropdown:

- **Video** — Paste TikTok video URLs in the "TikTok Video URLs" field
- **Profile** — Enter usernames (e.g., `khaby.lame`) in the "User Profiles" field
- **Hashtag** — Enter hashtag names (e.g., `fyp`, `cats`) in the "Hashtags" field. Returns statistics (video count, view count) for each hashtag.
- **Download** — Same as Video mode, but also saves watermark-free video files
- **Music** — Same as Video mode, with extra music/sound metadata and oEmbed info
- **Trending** — ⚠️ Currently returns a notice that residential proxies are needed

#### 2. Configure Options

- **Max Results**: Limit videos per profile/hashtag (default: 10)
- **Request Timeout**: Increase if you're getting timeouts (default: 30s)

#### 3. Run and Export

Click "Start" and wait for results. Export as JSON, CSV, or Excel from the Dataset tab.

### 📊 Sample Output

```json
{
    "id": "7625675185487662344",
    "text": "Cat playing arcade! 🕹️😾 #kittens #viralvideo",
    "createTime": 1743500000,
    "createTimeISO": "2025-04-01T12:00:00+00:00",
    "duration": 30,
    "isAd": false,
    "authorMeta": {
        "id": "7123456789",
        "name": "meowtakeover",
        "nickName": "MeowTakeover",
        "profileUrl": "https://www.tiktok.com/@meowtakeover",
        "avatar": "https://p16-sign.tiktokcdn.com/...",
        "verified": false
    },
    "musicMeta": {
        "musicName": "original sound",
        "musicAuthor": "meowtakeover",
        "musicOriginal": true,
        "playUrl": "https://...",
        "musicId": "7591652617604975374"
    },
    "videoMeta": {
        "height": 1024,
        "width": 576,
        "duration": 30,
        "coverUrl": "https://p16-sign.tiktokcdn.com/...",
        "definition": "720p",
        "format": "mp4"
    },
    "diggCount": 15000,
    "shareCount": 500,
    "playCount": 250000,
    "collectCount": 3000,
    "commentCount": 800,
    "hashtags": [
        { "name": "kittens" },
        { "name": "viralvideo" }
    ],
    "webVideoUrl": "https://www.tiktok.com/@meowtakeover/video/7625675185487662344",
    "videoDownloadUrl": "",
    "watermarkedVideoUrl": "https://...",
    "subtitles": ["eng"],
    "mode": "video",
    "fetched_at": "2025-04-01T12:05:00+00:00"
}
````

### ⚡ Performance Tips

- **Memory**: 256 MB is sufficient for most runs. Use 512 MB+ for download mode with many videos.
- **Speed**: ~2-3 seconds per video extraction. Profile/hashtag listing is fast (~1 second).
- **Rate Limits**: Built-in 1-second delay between requests. Increase timeout if TikTok is slow.
- **Download Mode**: Video files are stored in Apify Key-Value Store with public download links. Links expire when the store is deleted.

### 🔧 Technical Notes

- Uses yt-dlp for reliable TikTok data extraction
- Video, profile, download, and music modes work from datacenter IPs
- Hashtag mode returns statistics via TikTok public API (may require residential proxies on some datacenter IPs)
- Video download URLs from yt-dlp expire after 2-4 hours; use download mode for persistent storage

### 📝 Limitations

- **Search**: TikTok keyword search is not supported (requires authentication). Use hashtag mode as an alternative.
- **Comments**: Comment extraction is not supported (TikTok API requires authentication).
- **Private profiles**: Only public profiles can be scraped.
- **Live streams**: Not supported.
- **Hashtag videos**: Hashtag mode returns statistics only (video count, view count). Extracting individual videos from hashtag pages requires residential proxies due to TikTok IP blocking.
- **Trending**: Trending mode is temporarily unavailable from datacenter IPs. TikTok blocks /explore and /foryou pages. Residential proxy support is planned.
- **Some videos**: Certain TikTok videos may block specific IP ranges. If extraction fails for a video, try again later or use a different video URL.

### 💰 Pricing

This Actor is **$Free** (platform fees apply).

# Actor input Schema

## `mode` (type: `string`):

Choose what to extract. 'video' extracts data from specific video URLs. 'profile' scrapes all videos from user profiles. 'hashtag' retrieves hashtag/challenge statistics (video count, view count). 'download' saves watermark-free videos. 'music' extracts music/sound info. 'trending' is currently limited (requires residential proxies).

## `start_urls` (type: `array`):

Used in video, download, and music modes. List of TikTok video URLs to process.

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

Used in profile mode. Usernames or profile URLs. Example: khaby.lame, @charlidamelio, https://www.tiktok.com/@bellapoarch

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

Used in hashtag mode. Hashtag names (with or without #). Example: fyp, viral, #catsoftiktok

## `max_results` (type: `integer`):

Maximum number of videos to extract per profile/hashtag. Does not apply to video/download/music modes (those process all provided URLs).

## `request_timeout` (type: `integer`):

Timeout for each HTTP request in seconds. Increase if you experience timeouts.

## Actor input object example

```json
{
  "mode": "video",
  "start_urls": [
    {
      "url": "https://www.tiktok.com/@meowtakeover/video/7625675185487662344"
    }
  ],
  "profiles": [
    "meowtakeover"
  ],
  "hashtags": [
    "cats"
  ],
  "max_results": 10,
  "request_timeout": 30
}
```

# 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 = {
    "mode": "video",
    "start_urls": [
        {
            "url": "https://www.tiktok.com/@meowtakeover/video/7625675185487662344"
        }
    ],
    "profiles": [
        "meowtakeover"
    ],
    "hashtags": [
        "cats"
    ],
    "max_results": 10,
    "request_timeout": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("gentle_cloud/tiktok-data-extractor").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 = {
    "mode": "video",
    "start_urls": [{ "url": "https://www.tiktok.com/@meowtakeover/video/7625675185487662344" }],
    "profiles": ["meowtakeover"],
    "hashtags": ["cats"],
    "max_results": 10,
    "request_timeout": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("gentle_cloud/tiktok-data-extractor").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 '{
  "mode": "video",
  "start_urls": [
    {
      "url": "https://www.tiktok.com/@meowtakeover/video/7625675185487662344"
    }
  ],
  "profiles": [
    "meowtakeover"
  ],
  "hashtags": [
    "cats"
  ],
  "max_results": 10,
  "request_timeout": 30
}' |
apify call gentle_cloud/tiktok-data-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Multi Scraper",
        "description": "Extract TikTok profiles, videos, hashtags, trending content, and music data. Download watermark-free videos. One Actor replaces 13 separate scrapers. Fastest, cheapest, most complete TikTok data solution on Apify.",
        "version": "0.0",
        "x-build-id": "tw5gabBamAaSHG3gN"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gentle_cloud~tiktok-data-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gentle_cloud-tiktok-data-extractor",
                "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/gentle_cloud~tiktok-data-extractor/runs": {
            "post": {
                "operationId": "runs-sync-gentle_cloud-tiktok-data-extractor",
                "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/gentle_cloud~tiktok-data-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-gentle_cloud-tiktok-data-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "video",
                            "profile",
                            "hashtag",
                            "download",
                            "music",
                            "trending"
                        ],
                        "type": "string",
                        "description": "Choose what to extract. 'video' extracts data from specific video URLs. 'profile' scrapes all videos from user profiles. 'hashtag' retrieves hashtag/challenge statistics (video count, view count). 'download' saves watermark-free videos. 'music' extracts music/sound info. 'trending' is currently limited (requires residential proxies)."
                    },
                    "start_urls": {
                        "title": "TikTok Video URLs",
                        "type": "array",
                        "description": "Used in video, download, and music modes. List of TikTok video URLs to process.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "profiles": {
                        "title": "User Profiles",
                        "type": "array",
                        "description": "Used in profile mode. Usernames or profile URLs. Example: khaby.lame, @charlidamelio, https://www.tiktok.com/@bellapoarch",
                        "items": {
                            "type": "string"
                        }
                    },
                    "hashtags": {
                        "title": "Hashtags",
                        "type": "array",
                        "description": "Used in hashtag mode. Hashtag names (with or without #). Example: fyp, viral, #catsoftiktok",
                        "items": {
                            "type": "string"
                        }
                    },
                    "max_results": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of videos to extract per profile/hashtag. Does not apply to video/download/music modes (those process all provided URLs)."
                    },
                    "request_timeout": {
                        "title": "Request Timeout (seconds)",
                        "minimum": 10,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Timeout for each HTTP request in seconds. Increase if you experience timeouts."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
