# TikTok Creator Videos Scraper (`funny_ground/tiktok-creator-videos`) Actor

Enter a TikTok creator username and get every public video with full metadata and engagement stats.

- **URL**: https://apify.com/funny\_ground/tiktok-creator-videos.md
- **Developed by:** [Coor Yu](https://apify.com/funny_ground) (community)
- **Categories:** Videos, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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.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 Creator Videos Scraper

Enter one or more TikTok creator usernames and get **every public video** from each
profile, with full metadata and engagement stats.

---

### 中文说明

输入一个或多个 TikTok 达人用户名，抓取每位达人的**全部公开视频**，含完整元数据和互动指标。

**输入参数**

| 字段 | 类型 | 说明 |
|------|------|------|
| `creators` | 数组（必填） | 达人用户名（可带或不带 `@`）或主页链接，每行一个 |
| `maxVideos` | 整数 | 每个达人最多抓取的视频数；`0` = 全部 |
| `proxyConfiguration` | 对象 | 代理设置，**强烈建议用住宅代理（RESIDENTIAL）** |

**输出（Output schema）**

每条记录对应一个视频，主要字段：

| 字段 | 说明 |
|------|------|
| `id` / `url` | 视频 ID / 链接 |
| `text` | 文案 |
| `createTime` / `createTimeUnix` | 发布时间（ISO / 时间戳） |
| `durationSeconds` | 时长（秒） |
| `cover` / `dynamicCover` | 静态 / 动态封面 |
| `width` / `height` | 分辨率 |
| `playCount` | 播放量 |
| `diggCount` | 点赞 |
| `commentCount` / `shareCount` / `collectCount` | 评论 / 分享 / 收藏 |
| `hashtags` | 话题标签数组 |
| `music` | 音乐：`{ id, title, authorName, isOriginal }` |
| `isPinned` | 是否置顶 |
| `authorUsername` / `authorNickname` / `authorId` / `authorVerified` | 达人信息 |

控制台 **Output** 标签会以带封面缩略图的表格呈现以上结果。

**工作原理**：用真实浏览器打开达人主页，先读取服务端渲染的视频数据；再调用 TikTok 自身的 `item_list` 接口翻页——用页面内置的签名函数 `byted_acrawler.frontierSign` 对每次请求重新签名（`X-Bogus`），跟随 `cursor` 翻到底，从而拿到达人**全部**公开视频，不依赖任何第三方 actor。

**注意**：只能抓取公开视频；返回数量可能略少于主页显示的总数（差额为私密/地区限制/已删除）。请务必使用住宅代理。

---

### Input

| Field | Type | Description |
|-------|------|-------------|
| `creators` | array (required) | Usernames (with or without `@`) or full profile URLs. |
| `maxVideos` | integer | Max videos per creator. `0` = all available. |
| `proxyConfiguration` | object | Proxy settings. **Residential proxies recommended.** |

```json
{
    "creators": ["mrbeast", "@khaby.lame", "https://www.tiktok.com/@zachking"],
    "maxVideos": 0,
    "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
````

### Output

One dataset record per video:

| Field | Description |
|-------|-------------|
| `id`, `url` | Video ID and canonical URL |
| `text` | Caption / description |
| `createTime`, `createTimeUnix` | Publish time (ISO + epoch) |
| `durationSeconds` | Video length |
| `cover`, `dynamicCover` | Thumbnail images |
| `width`, `height` | Resolution |
| `playCount` | Views |
| `diggCount` | Likes |
| `commentCount`, `shareCount`, `collectCount` | Engagement |
| `hashtags` | Array of hashtag titles |
| `music` | `{ id, title, authorName, isOriginal }` |
| `isPinned` | Whether the video is pinned on the profile |
| `authorUsername`, `authorNickname`, `authorId`, `authorVerified` | Creator info |

#### Example record

```json
{
    "id": "7300000000000000000",
    "url": "https://www.tiktok.com/@zachking/video/7300000000000000000",
    "text": "Magic trick #magic",
    "createTime": "2024-11-01T12:00:00.000Z",
    "durationSeconds": 12,
    "playCount": 12000000,
    "diggCount": 800000,
    "commentCount": 5400,
    "shareCount": 22000,
    "hashtags": ["magic"],
    "music": { "id": "...", "title": "original sound", "authorName": "zachking", "isOriginal": true },
    "isPinned": false,
    "authorUsername": "zachking",
    "authorVerified": true
}
```

### How it works

The actor opens each profile in a real Chromium browser (via Crawlee's
`PlaywrightCrawler`) and reads the server-rendered video data. To page through the
creator's **entire** back-catalog it calls TikTok's `item_list` API directly:

1. It captures the exact `item_list` request the page issues itself (which carries
   TikTok's full expected parameter set).
2. For each subsequent page it swaps the `cursor` on that template and **re-signs the
   request with TikTok's own in-page signer** (`window.byted_acrawler.frontierSign`,
   producing the required `X-Bogus`), then fetches from inside the page so the request
   carries the page's cookies (`msToken`).
3. It follows the server-provided `cursor` until `hasMore` is false.

This is fully self-contained — no dependency on any third-party actor — and reliably
returns every public video, not just the most recent batch. Browser fingerprinting plus
residential proxies keep block rates low.

### Notes

- Only **public** profiles/videos are accessible. The returned count may be slightly
  below the profile's stated total — the difference is private, region-locked, or
  deleted posts.
- Always run with **RESIDENTIAL** proxies (the input default); datacenter IPs are blocked.
- TikTok rotates its request-signing internals periodically. If a run ever returns zero,
  the signer hook in `src/main.js` (`frontierSign`) is the place to update.

# Actor input Schema

## `creators` (type: `array`):

TikTok 达人用户名（可带或不带 @）或主页链接，每行一个。TikTok creator usernames (with or without @) or full profile URLs, one per line.

## `maxVideos` (type: `integer`):

每个达人最多抓取的视频数；填 0 表示抓取全部。Maximum number of videos to scrape per creator. Set 0 to scrape all available videos.

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

强烈建议使用住宅代理（RESIDENTIAL）——TikTok 会封锁机房 IP。Residential proxies are strongly recommended; TikTok blocks datacenter IPs.

## Actor input object example

```json
{
  "creators": [
    "charlidamelio",
    "@khaby.lame",
    "https://www.tiktok.com/@zachking"
  ],
  "maxVideos": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "creators": [
        "mrbeast"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("funny_ground/tiktok-creator-videos").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 = {
    "creators": ["mrbeast"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("funny_ground/tiktok-creator-videos").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 '{
  "creators": [
    "mrbeast"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call funny_ground/tiktok-creator-videos --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Creator Videos Scraper",
        "description": "Enter a TikTok creator username and get every public video with full metadata and engagement stats.",
        "version": "0.1",
        "x-build-id": "CnF5X5pdXaWBzpCv5"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/funny_ground~tiktok-creator-videos/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-funny_ground-tiktok-creator-videos",
                "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/funny_ground~tiktok-creator-videos/runs": {
            "post": {
                "operationId": "runs-sync-funny_ground-tiktok-creator-videos",
                "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/funny_ground~tiktok-creator-videos/run-sync": {
            "post": {
                "operationId": "run-sync-funny_ground-tiktok-creator-videos",
                "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": [
                    "creators"
                ],
                "properties": {
                    "creators": {
                        "title": "Creators / 达人",
                        "type": "array",
                        "description": "TikTok 达人用户名（可带或不带 @）或主页链接，每行一个。TikTok creator usernames (with or without @) or full profile URLs, one per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxVideos": {
                        "title": "Max videos per creator / 每个达人最多抓取数",
                        "minimum": 0,
                        "type": "integer",
                        "description": "每个达人最多抓取的视频数；填 0 表示抓取全部。Maximum number of videos to scrape per creator. Set 0 to scrape all available videos.",
                        "default": 0
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration / 代理设置",
                        "type": "object",
                        "description": "强烈建议使用住宅代理（RESIDENTIAL）——TikTok 会封锁机房 IP。Residential proxies are strongly recommended; TikTok blocks datacenter IPs.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
