Douyin (TikTok China) Scraper — Videos, Creators, Comments
Pricing
from $0.005 / actor start
Douyin (TikTok China) Scraper — Videos, Creators, Comments
Search Douyin by keyword and export videos, creator profiles and comments.
Pricing
from $0.005 / actor start
Rating
0.0
(0)
Developer
wangyan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Douyin (TikTok China) Scraper — Videos, Creators & Comments
Export Douyin data as JSON, CSV or Excel. Search by keyword, pull full video details, profile creators, collect comments — without an API key, a Chinese business entity, or an agency.
Douyin has 700M+ daily active users and is where Chinese consumers discover products, music, food trends and entertainment. It is also almost completely closed to outsiders: no public API, cryptographically-signed web endpoints, and the official Open Platform requires a mainland Chinese company. This Actor gives you the data layer without any of that.
Quick start (3 minutes)
- Grab a cookie — open https://www.douyin.com/ in your browser (log in for best
results), press
F12→ Console, runcopy(document.cookie). - Click "Try for free" at the top of this page (or paste the cookie into the
cookiefield of a run). - Hit "Start" — results appear in the Dataset tab within ~45 seconds.
Minimal input that works:
{"searchKeywords": ["美食"],"cookie": "ttwid=...; sessionid_ss=...;","maxItems": 20}
What you can do with it
| You are | You use it to |
|---|---|
| A brand entering China | Measure share of voice, find which product claims resonate, track competitors |
| An agency | Build KOL / influencer shortlists from real engagement numbers, not media kits |
| A dropshipper / sourcing operator | See what is trending in China 3–6 months before it reaches Western marketplaces |
| A music / entertainment team | Spot breakout songs, hashtags, dance challenges by region |
| A trend / AI team | Feed a genuinely hard-to-obtain Chinese-language video dataset into your models |
Three ways to use it
1 · Search by keyword
{"searchKeywords": ["火锅", "宠物"],"cookie": "...","maxItems": 200,"sort": "most_liked","searchType": "all","fetchVideoDetails": true,"maxCommentsPerVideo": 20}
2 · Deep-scrape specific videos
{"videoUrls": ["https://www.douyin.com/video/7421123456789012345"],"cookie": "...","maxCommentsPerVideo": 100}
3 · Pull a creator's recent posts
{"creatorUrls": ["https://www.douyin.com/user/MS4wLjABAAAAyourSecUidHere"],"cookie": "...","maxPostsPerCreator": 50}
The user URL path is a sec_uid (base64-url string starting with MS4wLjABAAAA), not the
pretty name you may see on the profile page.
Input reference
| Field | Default | Notes |
|---|---|---|
searchKeywords | [] | Chinese works ×10 better than English |
videoUrls | [] | https://www.douyin.com/video/<aweme_id> |
creatorUrls | [] | https://www.douyin.com/user/<sec_uid> |
cookie | "" | Required in practice. See Cookie walkthrough |
maxItems | 100 | Hard cap. You only pay for records actually delivered |
sort | general | general / latest / most_liked |
searchType | all | all / video / user |
fetchVideoDetails | false | Open each video for full desc + music + IP + stats |
maxCommentsPerVideo | 0 | Set > 0 to also pull comments (charged separately) |
maxPostsPerCreator | 20 | Recent posts to collect per creator |
proxyConfiguration | {useApifyProxy: true, apifyProxyGroups: ["RESIDENTIAL"]} | CN proxy strongly recommended |
Cookie walkthrough
1. Open https://www.douyin.com/ in Chrome / Edge / Firefox2. Log in — scan the QR with the Douyin mobile app (strongly recommended)3. Press F12 → Developer Tools opens4. Click the "Console" tab5. Paste this and press Enter:copy(document.cookie)6. Clipboard now holds the cookie string7. Paste into the "cookie" field of the Actor input
The cookie looks like:
ttwid=xxx; odin_tt=xxx; sessionid_ss=xxx; msToken=xxx; s_v_web_id=xxx; ...
Critical cookies: ttwid and sessionid_ss. If either is missing, log in again.
Cookies die fast on Douyin. Expect to refresh every 1–3 days under heavy use. The Actor logs a warning when the cookie looks poisoned.
CN proxy — required in practice
Douyin blocks or heavily throttles most non-CN IPs. The Actor usually returns zero without a CN residential proxy.
"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"],"apifyProxyCountry": "CN"}
Bring-your-own works too:
"proxyConfiguration": {"proxyUrls": ["http://user:pass@cn-proxy.example.com:8080"]}
Output
Each record is a flat JSON object. Chinese counts like 1.2w / 3.4万 / 2亿 are normalised
to integers.
Video (from search)
{"source": "search","searchKeyword": "美食","awemeId": "7421123456789012345","awemeType": 0,"title": "撸猫日常","description": "一只小猫咪在玩","awemeUrl": "https://www.douyin.com/video/7421123456789012345","coverUrl": "https://p.douyin.com/cover.jpg","videoUrl": "https://aweme.snssdk.com/video.mp4","duration": 15,"diggCount": 12000,"commentCount": 350,"shareCount": 42,"collectCount": 12000,"playCount": 500000,"createdAt": 1727500000,"authorId": "9876543210","authorSecUid": "MS4wLjABAAAA...","authorNickname": "撸猫小队长","authorAvatar": "...","authorUrl": "https://www.douyin.com/user/MS4wLjABAAAA..."}
Video detail (with fetchVideoDetails: true)
Adds ipLocation, downloadCount, imageUrls[] (photo-mode posts), tags[], and
music.{id,title,author}.
Creator profile
{"source": "creator","secUid": "MS4wLjABAAAA...","userId": "9876543210","nickname": "撸猫小队长","douyinId": "catmaster","bio": "每天一只猫","gender": 2,"ipLocation": "北京","followingCount": 128,"followerCount": 125000,"totalFavorited": 34000,"awemeCount": 342,"verified": true,"verifyReason": "宠物博主"}
Comment
{"source": "comment","awemeId": "7421...","commentId": "7421000000000000001","content": "太可爱了","diggCount": 11000,"replyCount": 23,"createdAt": 1727500100,"ipLocation": "上海","authorId": "111","authorSecUid": "MS4wLjABAAAA...","authorNickname": "路人甲"}
Pricing
Pay-per-event — you are only charged for records actually delivered.
| Event | Price (USD) | What triggers it |
|---|---|---|
apify-actor-start | $0.005 | Once per run (per GB RAM, min 1) |
video-scraped | $0.0015 | Each video delivered |
creator-scraped | $0.004 | Each creator profile |
comment-scraped | $0.0004 | Each comment |
Cost estimator
| Job | Setting | Approx cost |
|---|---|---|
| Quick keyword scan | 100 videos, no details | $0.16 |
| Deep hashtag sweep | 1 000 videos + details + 20 comments | $9.50 |
| 10-KOL shortlist | 10 creators × 50 posts each | $0.80 |
| Daily trend monitor | 500 videos/day for 30 days | $22.50 / month |
Platform margin: Apify takes 20%, you keep 80%. Prices above are what you pay.
Common errors
| Error / symptom | Cause | Fix |
|---|---|---|
No videos captured for 'X' | Cookie expired or no CN proxy | Re-copy cookie + enable CN residential proxy |
| Zero results on every run | IP blocked by Douyin | Switch Apify proxy group, wait 10 min |
BrowserType.launch timeout | Memory too low | Raise minMemoryMbytes to 4096 |
| Login page in screenshots | Cookie wasn't logged-in | Scan QR with Douyin mobile app, re-copy |
aweme_id not extracted from URL | Wrong URL format | Must be /video/<numeric_id>, not shortened share link |
| Only comments, no videos | maxItems consumed by comments | Separate the runs or raise maxItems |
Why this exists
Douyin signs every web API call with X-Bogus and msToken headers derived from obfuscated
browser JS that ByteDance updates without notice. Re-implementing is a losing maintenance
race.
Instead the Actor opens a real Chromium page in the Apify runtime, lets the page's own JS make the real signed calls, and reads JSON off the wire. ByteDance can rotate signatures all they want — the browser catches up for us.
Known limits
- Cookies expire within days. Users are expected to refresh their own cookie.
- Search depth is capped by Douyin's own paging — a few hundred videos per keyword.
- English keywords mostly return nothing. The platform is Chinese-first.
- Non-CN IPs are usually blocked. CN residential proxy is practically required.
- This is a scraper, not a CRM. Data is read-only, best-effort.
Changelog
- 0.1.1 · Initial public release