# Douyin Profile Scraper (`hgservices/douyin-profile-scraper`) Actor

Scrape Douyin (抖音) creator profiles: every video post with captions, likes, comments, shares, saves, music & hashtags, plus no-watermark MP4 URLs. Export to JSON, CSV, or Excel. No login, no code.

- **URL**: https://apify.com/hgservices/douyin-profile-scraper.md
- **Developed by:** [Harish Garg](https://apify.com/hgservices) (community)
- **Categories:** Videos, Social media, Lead generation
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.10 / 1,000 profile scraped charges

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Scraper — Export Creator Videos & Stats (No Watermark)

Scrape any **Douyin (抖音)** creator profile — China's version of TikTok — and export clean, structured data in seconds. Get a creator's **full post history** with **no-watermark video URLs**, captions, like/comment/share/save counts, author details, music, and hashtags. No login, no coding, no browser extensions.

Export results to **JSON, CSV, or Excel**, or pull them straight into your app via the Apify API.

### What this Douyin profile scraper does

- 👤 **Scrape entire Douyin profiles** — pull a creator's post history, newest first, up to 5,000 posts per profile.
- 📊 **Optional engagement stats per post** — likes, comments, shares, saves, and admire counts for every video (off by default; turn on **Fetch engagement stats** when you need them).
- 🎬 **No-watermark video URLs** — every video post includes the direct no-watermark MP4 link plus backup CDN mirrors.
- 🖼️ **Handles photo/slideshow posts** — image posts are captured too, not just videos.
- 🎵 **Get the background music** — track title and audio URL for each post.
- ⚡ **Fast and reliable** — no login or cookies required; just paste profile links and run.

### What data you get

For every post on a scraped profile, this scraper returns:

| Data | Description |
|------|-------------|
| No-watermark video URL | Direct MP4 link, ready to download or embed |
| Caption & hashtags | Full description text plus extracted hashtags |
| Author | Display name, unique ID, and profile ID |
| Engagement | Likes, comments, shares, saves, and admires (with **Fetch engagement stats** on) |
| Publish date | When the post went up |
| Duration & region | Video length and country |
| Cover image | Thumbnail URL |
| Music | Track title and audio URL |
| Photo posts | Image URLs for slideshow-style posts |
| On-screen text (OCR) | Douyin's own OCR of text shown in the video (with **Fetch engagement stats** on, when available) |

### How to use the Douyin profile scraper

1. **Add profile links** — paste one or more creator profile URLs (`https://www.douyin.com/user/MS4wLjABAAAA...`), `v.douyin.com` share links that redirect to a profile, or bare `sec_uid` values (`MS4wLjABAAAA...`).
2. **Set your options** — choose how many videos to pull per profile (up to 5,000) and whether to fetch per-post engagement stats.
3. **Run and export** — click **Start**, then download your results as JSON, CSV, or Excel, or fetch them via the API.

#### Example input

```json
{
  "profileUrls": [
    "https://www.douyin.com/user/MS4wLjABAAAARhKifOuUM5SVneEoxKNleQQxW3tKGDzdd9rah6nEpLc"
  ],
  "maxVideosPerProfile": 30,
  "includeStats": true
}
```

#### Example output (one post from a profile)

```json
{
  "awemeId": "7045159024525905183",
  "url": "https://www.douyin.com/video/7045159024525905183",
  "desc": "37岁再次手绘家乡图寻亲 #抖音寻人",
  "createTime": "2021-12-24T14:55:12+00:00",
  "authorName": "黎方富",
  "durationMs": 123513,
  "region": "CN",
  "videoUrlNoWatermark": "https://v9-v2-mps-cdn.douyinvod.com/.../main.mp4",
  "videoMirrors": ["https://v9-v2-mps-cdn.douyinvod.com/.../main.mp4", "..."],
  "cover": "https://p3-pc-sign.douyinpic.com/...jpeg",
  "musicUrl": "https://sf11-cdn-tos.douyinstatic.com/obj/ies-music/....mp3",
  "hashtags": ["抖音寻人"],
  "seoOcrContent": "37岁再次手绘家乡图寻亲",
  "diggCount": 9755,
  "commentCount": 1044,
  "shareCount": 551,
  "collectCount": 289,
  "admireCount": 12
}
```

Engagement counts (likes, comments, shares, saves, admires) and on-screen OCR text come from a per-post detail fetch, controlled by the **Fetch engagement stats** option (off by default — turn it on when you need the numbers). With the option off, each post still returns its caption, publish date, author, media links, and hashtags — without the counts — and runs finish much faster.

To save a video file, fetch the URL in `videoUrlNoWatermark` (or one of the `videoMirrors`) with your own tool of choice — the links are direct CDN URLs that need no login or cookies.

### Looking for keyword search?

Keyword search now lives in its own dedicated actor — **Douyin Search Scraper** — built for discovering videos by search term with sort, publish-window, and duration filters. This actor stays focused on what it does best: creator profiles.

### Popular use cases

- **Trend & influencer research** — track what top creators post and how it performs.
- **Competitor analysis** — monitor rival brands' Douyin content and engagement.
- **Content creators & marketers** — archive your own posts with no-watermark copies and stats.
- **Datasets for AI/ML** — collect video, caption, and metadata at scale.
- **Social media analytics** — measure reach and engagement across creators over time.

### Frequently asked questions

**Can I scrape all videos from a Douyin user?**
Yes — that's exactly what this actor does. Add the profile URL, set how many videos to fetch, and run. Posts come back newest first.

**Do the videos come without a watermark?**
Yes. Every video post includes a direct no-watermark MP4 URL (`videoUrlNoWatermark`) plus backup mirror links. Open the link or fetch it with your own tooling to save the file — no login or cookies needed.

**Do I need a Douyin account or login?**
No. This scraper works without any account, password, or cookies.

**Can I scrape a single video by its URL?**
No — this actor is profile-only. Paste the creator's profile URL instead: the video you want comes back as one of the profile's posts (use a small **Max videos per profile** for a quick run).

**Can I search Douyin by keyword instead of pasting profile URLs?**
Keyword search has moved to its own dedicated actor, **Douyin Search Scraper**. This one focuses on creator profiles.

**Does it work with Douyin share links?**
Yes — both full `douyin.com/user/...` URLs and short `v.douyin.com/...` share links that redirect to a profile are supported, as are bare `sec_uid` values.

**What formats can I export?**
JSON, CSV, and Excel, or pull data programmatically through the Apify API.

**Does it capture photo (slideshow) posts?**
Yes. Image posts return their picture URLs alongside the usual metadata.

### Integrations

Connect this Douyin scraper to your workflow with the **Apify API**, or automate it with **Make**, **Zapier**, **n8n**, Google Sheets, Slack, and more. Schedule runs to keep your Douyin data fresh automatically.

### Is it legal to scrape Douyin?

This scraper collects **publicly available** data only. You are responsible for how you use the data — respect Douyin's terms, applicable laws (such as GDPR), and copyright. Do not use scraped content in ways that infringe creators' rights.

# Actor input Schema

## `profileUrls` (type: `array`):

Douyin user profile URLs (https://www.douyin.com/user/MS4wLjABAAAA...), v.douyin.com share links that redirect to a profile, or bare sec\_uids (MS4wLjABAAAA...). The actor lists each user's posts, newest first.

## `maxVideosPerProfile` (type: `integer`):

Upper bound on posts fetched per profile URL.

## `includeStats` (type: `boolean`):

Enrich every post with engagement stats (likes, comments, shares, saves, admires) and on-screen OCR text. Costs one extra request per video, so runs take longer; off by default — turn on only if you need the per-post numbers.

## Actor input object example

```json
{
  "profileUrls": [
    "https://www.douyin.com/user/MS4wLjABAAAARhKifOuUM5SVneEoxKNleQQxW3tKGDzdd9rah6nEpLc"
  ],
  "maxVideosPerProfile": 20,
  "includeStats": false
}
```

# Actor output Schema

## `videos` (type: `string`):

One item per scraped Douyin post: awemeId, canonical video URL, caption, publish timestamp, author (name, sec\_uid, uid, handle), duration, region, no-watermark MP4 URL plus mirrors, cover/images, music, hashtags — and, when the corresponding input options are enabled, engagement stats (likes, comments, shares, saves, admires), on-screen OCR text, and top comments. Failed profiles appear as items with only 'url' and 'error' fields.

# 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 = {
    "profileUrls": [
        "https://www.douyin.com/user/MS4wLjABAAAARhKifOuUM5SVneEoxKNleQQxW3tKGDzdd9rah6nEpLc"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/douyin-profile-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 = { "profileUrls": ["https://www.douyin.com/user/MS4wLjABAAAARhKifOuUM5SVneEoxKNleQQxW3tKGDzdd9rah6nEpLc"] }

# Run the Actor and wait for it to finish
run = client.actor("hgservices/douyin-profile-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 '{
  "profileUrls": [
    "https://www.douyin.com/user/MS4wLjABAAAARhKifOuUM5SVneEoxKNleQQxW3tKGDzdd9rah6nEpLc"
  ]
}' |
apify call hgservices/douyin-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hgservices/douyin-profile-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/xjANF1r92EBngenlg/builds/BBWHtJfPdBuVvqAPE/openapi.json
