# Douyin Profile Posts Scraper (`burbn/douyin-profile-posts-scraper`) Actor

Fast, reliable Douyin (Chinese TikTok) user profile posts & video scraper. Extract video URLs, captions, hashtags, likes, comments, shares, saves, play counts, music MP3s, and cover images in bulk. Download data in JSON

- **URL**: https://apify.com/burbn/douyin-profile-posts-scraper.md
- **Developed by:** [Kevin](https://apify.com/burbn) (community)
- **Categories:** Social media, Videos, Automation
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Douyin Profile Posts Scraper – Chinese TikTok Video Data Extractor

**Scrape Douyin (Chinese TikTok) user profile posts and videos by profile URL or sec\_user\_id. Extract video descriptions, hashtags, video play URLs (no watermark), cover images, likes, comments, shares, saves, play count, duration, music details, and author info. Supports automatic pagination. Built with Apify best practices for reliability and speed.**

***

### Table of Contents

- [Features](#features)
- [Use Cases](#use-cases)
- [Quick Start](#quick-start)
- [Input Parameters](#input-parameters)
- [Output Format](#output-format)
- [Performance & Limits](#performance--limits)
- [FAQ](#faq)
- [Troubleshooting](#troubleshooting)
- [Tags](#tags)

***

### Features

- **Profile Posts Lookup** – Fetch all published videos and posts from any Douyin user profile using a profile URL or `sec_user_id`.
- **Automatic Pagination** – Effortlessly paginate through user post feeds using cursor-based navigation up to your configured limit.
- **Engagement Metrics** – Extract likes (`digg_count`), comments (`comment_count`), shares (`share_count`), saves (`collect_count`), and play counts.
- **Rich Media URLs** – Direct access to video play URLs, cover images, dynamic/animated covers, and raw origin covers.
- **Hashtag & Caption Extraction** – Full video captions/descriptions and extracted hashtags array.
- **Music & Audio Details** – Get background music title, author, audio MP3 URL, music cover image, and original sound indicators.
- **Video Metadata** – Extract duration (in seconds & milliseconds), video dimensions (width & height), creation timestamp (ISO & Unix), and long-video flags.
- **Author Information** – Include author nickname, user ID, avatar URL, and verification details with every post item.

***

### Use Cases

| Use Case | Description | Key Benefits |
|----------|-------------|--------------|
| Content & Trend Analysis | Analyze viral Douyin videos, top hashtags, and descriptions in China. | Extract descriptions, hashtags, and performance stats across posts. |
| Influencer Audit | Evaluate an influencer's content history and engagement consistency. | Track post frequency, likes, comments, and shares per video. |
| Video Asset Scraping | Collect high-quality video links and cover thumbnails for media projects. | Direct access to video MP4 URLs and thumbnail covers. |
| Competitor Monitoring | Track video posting strategies and top performing content of competitors. | Discover top performing videos by likes and shares. |
| Machine Learning & AI | Build video understanding and NLP datasets for Chinese short video content. | Clean structured JSON output ready for data pipelines. |

***

### Quick Start

#### 1. Basic – Scrape Profile Posts by sec\_user\_id

```json
{
  "profile": "MS4wLjABAAAA5tk-S6TmjdcBuTnM23DledH7pWA7_uxxDxXHKhCQF7s",
  "maxPosts": 25
}
```

#### 2. Basic – Scrape Profile Posts by Profile URL

```json
{
  "profile": "https://www.douyin.com/user/MS4wLjABAAAA5tk-S6TmjdcBuTnM23DledH7pWA7_uxxDxXHKhCQF7s",
  "maxPosts": 50
}
```

***

### Input Parameters

| Parameter | Type | Required | Description | Default | Example |
|-----------|------|----------|-------------|---------|---------|
| `profile` | String | Yes | Douyin profile URL or `sec_user_id` value. | `MS4wLjABAAAA...` | `"MS4wLjABAAAA..."` or `"https://www.douyin.com/user/MS4wLjABAAAA..."` |
| `maxPosts` | Integer | No | Maximum number of posts to scrape from the profile. | `50` | `25` |

#### Supported Input Formats

| Format | Example |
|--------|---------|
| `sec_user_id` (direct) | `MS4wLjABAAAA5tk-S6TmjdcBuTnM23DledH7pWA7_uxxDxXHKhCQF7s` |
| Douyin profile URL | `https://www.douyin.com/user/MS4wLjABAAAA5tk-S6TmjdcBuTnM23DledH7pWA7_uxxDxXHKhCQF7s` |
| Douyin share URL | `https://www.iesdouyin.com/share/user/MS4wLjABAAAA5tk-S6TmjdcBuTnM23DledH7pWA7_uxxDxXHKhCQF7s` |

***

### Output Format

#### Sample Post Output Data Structure

```json
{
  "source": "douyin_profile_posts",
  "position": 1,

  "aweme_id": "7365831805125086475",
  "group_id": "7365831805125086475",

  "description": "示例视频描述 #热门话题",
  "hashtags": [
    "热门话题"
  ],

  "create_time": "2024-05-06T10:29:32.000Z",
  "create_time_unix": 1714991372,

  "author_uid": "580172780942295",
  "author_sec_uid": "MS4wLjABAAAA1SOIG0C4Fiu1A2UJ3X37wlzdpgZz7seUzWrJMWEtFmY",
  "author_nickname": "XSaiHtetAungX",
  "author_unique_id": "Saisai199844",
  "author_avatar_url": "https://p3.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_25312b39350a4dcb8a0dc9c9dd7929c8.jpeg?from=327834062",
  "author_custom_verify": null,

  "video_url": "https://v3-dy-o.zjcdn.com/8b3dff097eb934e533f05d9898db9dab/...",
  "cover_url": "https://p11-sign.douyinpic.com/tos-cn-p-0015/...",
  "dynamic_cover_url": "https://p11-sign.douyinpic.com/tos-cn-p-0015/...",
  "origin_cover_url": "https://p11-sign.douyinpic.com/tos-cn-p-0015/...",
  "video_width": 720,
  "video_height": 1414,
  "duration_seconds": 10,
  "duration_ms": 10239,
  "is_long_video": false,

  "music_id": "7365831853984877338",
  "music_title": "@XSaiHtetAungX创作的原声",
  "music_author": "XSaiHtetAungX",
  "music_url": "https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/7365831852843698971.mp3",
  "music_cover_url": "https://p3.douyinpic.com/aweme/1080x1080/aweme-avatar/...",
  "music_duration": 10,
  "is_original_sound": true,

  "digg_count": 155,
  "comment_count": 43,
  "share_count": 34,
  "collect_count": 4,
  "play_count": 0,

  "is_top": false,
  "is_ads": false,
  "aweme_type": 0,
  "is_aigc_media": false,

  "share_url": "https://www.iesdouyin.com/share/video/7365831805125086475/...",
  "scraped_at": "2026-08-06T04:05:18.850Z"
}
```

#### Output Fields Explained

| Field | Type | Description |
|-------|------|-------------|
| `source` | String | Source indicator, always `douyin_profile_posts` |
| `position` | Integer | Position of post in the scraped dataset (1-based) |
| `aweme_id` | String | Unique Douyin video / post ID |
| `group_id` | String | Group ID of the post |
| `description` | String | Caption / title of the post |
| `hashtags` | Array | List of extracted hashtags from description |
| `create_time` | String | Post creation time in ISO 8601 UTC format |
| `create_time_unix` | Number | Post creation time in Unix timestamp (seconds) |
| `author_uid` | String | Internal user ID of creator |
| `author_sec_uid` | String | Secure user ID of creator |
| `author_nickname` | String | Display name of video author |
| `author_unique_id` | String | Douyin handle / username |
| `author_avatar_url` | String | Profile picture URL of video author |
| `author_custom_verify` | String | Custom verification text (if any) |
| `video_url` | String | Direct video play URL (MP4) |
| `cover_url` | String | Static thumbnail cover image URL |
| `dynamic_cover_url` | String | Animated cover thumbnail URL |
| `origin_cover_url` | String | Raw original cover image URL |
| `video_width` | Number | Video width in pixels |
| `video_height` | Number | Video height in pixels |
| `duration_seconds` | Number | Video duration in seconds |
| `duration_ms` | Number | Video duration in milliseconds |
| `is_long_video` | Boolean | Whether video is categorized as long video |
| `music_id` | String | Unique audio / music track ID |
| `music_title` | String | Title of background music |
| `music_author` | String | Artist / author of background music |
| `music_url` | String | Audio play URL (MP3) |
| `music_cover_url` | String | Music cover image URL |
| `music_duration` | Number | Audio track duration in seconds |
| `is_original_sound` | Boolean | Whether audio is original sound by author |
| `digg_count` | Number | Number of likes received on video |
| `comment_count` | Number | Number of comments on video |
| `share_count` | Number | Number of shares / forwards |
| `collect_count` | Number | Number of bookmarks / saves |
| `play_count` | Number | Play count (if provided by API) |
| `is_top` | Boolean | Whether video is pinned to author's profile |
| `is_ads` | Boolean | Whether video is an advertisement |
| `aweme_type` | Number | Internal type indicator |
| `is_aigc_media` | Boolean | Whether video content was generated by AI |
| `share_url` | String | Web share link for the video |
| `scraped_at` | String | ISO timestamp when post was scraped |

***

### Performance & Limits

- **Cursor Pagination** – Automatically fetches posts page-by-page until your `maxPosts` target is reached.
- **Memory Batching** – Results are flushed to Apify dataset in batches of 25 items for memory efficiency.
- **Smart Key Failover** – Automatic key rotation and retry logic ensure uninterrupted performance.
- **Rate Limit Delay** – Built-in pause between pagination pages to avoid API rate limits.

***

### FAQ

- **Q: Where do I find sec\_user\_id?**
  - You can find `sec_user_id` in any Douyin profile URL (e.g. `https://www.douyin.com/user/MS4wLjABAAAA...`). You can also paste the full profile URL directly.
- **Q: Why did a profile return fewer posts than maxPosts?**
  - A profile will return fewer posts if the account has fewer total public posts published or if no more posts are available on Douyin.
- **Q: Can I download the videos?**
  - Yes! Each record includes a `video_url` field pointing directly to the MP4 file which you can download.
- **Q: What data formats can I export?**
  - Apify allows exporting datasets as JSON, CSV, Excel (XLSX), XML, HTML, or RSS.

***

### Troubleshooting

| Issue | Cause | Solution |
|-------|-------|----------|
| "No profile provided" | Missing or empty `profile` input | Enter a valid Douyin profile URL or `sec_user_id`. |
| "Could not extract sec\_user\_id" | Malformed profile URL | Check and enter a valid profile URL or sec\_user\_id. |
| Fewer posts returned | Profile has limited public videos | Verify total published videos on the profile. |
| Network error | Key limit or connection drop | The scraper automatically retries with rotated keys. |

***

### 🔗 You May Also Like

| Actor | Description |
|-------|-------------|
| [Douyin Profile Scraper](https://apify.com/burbn/douyin-profile-scraper) | Get detailed Douyin user profile details including nickname, bio, followers, likes, video count, IP location, and verification status. |

***

### Tags

`douyin scraper`, `douyin posts scraper`, `douyin video downloader`, `chinese tiktok scraper`, `douyin user videos`, `douyin feed scraper`, `douyin analytics`, `douyin api`, `tiktok china scraper`, `social media scraper`, `apify actor`

***

### Get Started Now

1. Enter a **Douyin profile URL** or **sec\_user\_id**
2. Set your desired **Max Posts** limit
3. Click **Start** to run the scraper
4. Export your video data in JSON, CSV, or Excel format
5. Click ["Try for free"](https://apify.com?fpr=free-credits) to test the actor

***

*Built using Apify Platform | Optimized for Performance & Reliability*

# Actor input Schema

## `profile` (type: `string`):

📋 Enter a Douyin profile URL or sec\_user\_id value. Supported formats:

• Profile URL: `https://www.douyin.com/user/MS4wLjABAAAA...`
• sec\_user\_id: `MS4wLjABAAAA...`

## `maxPosts` (type: `integer`):

Maximum number of posts/videos to scrape. The scraper will paginate through results until this limit is reached or no more posts are available.

• Default: 50 posts
• Maximum: 500 posts

## Actor input object example

```json
{
  "profile": "MS4wLjABAAAA5tk-S6TmjdcBuTnM23DledH7pWA7_uxxDxXHKhCQF7s",
  "maxPosts": 10
}
```

# Actor output Schema

## `posts_overview` (type: `string`):

Open the dataset view with an overview of all scraped Douyin posts including description, likes, comments, shares, plays, and video URLs.

# 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 = {
    "profile": "MS4wLjABAAAA5tk-S6TmjdcBuTnM23DledH7pWA7_uxxDxXHKhCQF7s"
};

// Run the Actor and wait for it to finish
const run = await client.actor("burbn/douyin-profile-posts-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "profile": "MS4wLjABAAAA5tk-S6TmjdcBuTnM23DledH7pWA7_uxxDxXHKhCQF7s" }

# Run the Actor and wait for it to finish
run = client.actor("burbn/douyin-profile-posts-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "profile": "MS4wLjABAAAA5tk-S6TmjdcBuTnM23DledH7pWA7_uxxDxXHKhCQF7s"
}' |
apify call burbn/douyin-profile-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,burbn/douyin-profile-posts-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/x9Fb0yOiGpNikUYZ8/builds/jgtvpqjUD0wf1vu0a/openapi.json
