Douyin Search Scraper
Pricing
from $5.00 / 1,000 video returneds
Douyin Search Scraper
Scrape Douyin (China TikTok / 抖音) video search results by keyword. Returns videos with author, view/like/comment counts, music, hashtags. MCP/API-ready.
Pricing
from $5.00 / 1,000 video returneds
Rating
0.0
(0)
Developer
Khadin Akbar
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
4 days ago
Last modified
Categories
Share
Scrape Douyin (China TikTok / 抖音) video search results by keyword. One keyword in, structured JSON videos out. MCP-ready, residential-proxy-backed, premium reliability.
What it does
- Searches douyin.com for any keyword (Chinese, English, emoji, hashtag) and returns the public video results.
- Captures video title, author, view/like/comment/share/collect counts, music, hashtags, duration, publish date, video page URL, CDN stream URL.
- Filters by sort (relevance / latest / most liked), publish time (24h / 7d / 30d / 6mo), video duration (under 1m / 1-5m / over 5m).
- Built on Camoufox (anti-detect Firefox) + Apify Residential (HK/SG/TW/JP/MO rotation) — Douyin's JS challenge wall is cleared automatically.
When to use this actor
- China-market trend research (which videos rank for
美食,穿搭, your brand). - Cross-border ecommerce: mining viral Douyin product videos.
- Agency competitor analysis on Douyin campaigns.
- AI agent / MCP workflow: keyword to ranked Douyin videos in one tool call.
Not for: Douyin user profile data, video comments, or video transcripts — see sibling actors in the portfolio.
Output
One record per video. Key fields:
| Field | Type | Description |
|---|---|---|
awemeId | string | Douyin video ID, globally unique |
title | string | Video caption / description |
videoPageUrl | url | Public Douyin video URL |
videoUrl | url | Direct mp4 CDN URL (ephemeral) |
coverUrl | url | Cover/thumbnail image |
duration | int (ms) | Video length |
playCount | int | Total plays |
likeCount | int | Total likes |
commentCount | int | Total comments |
shareCount | int | Total shares |
collectCount | int | Bookmarks / favorites |
publishedAt | ISO 8601 | Publish timestamp |
authorNickname | string | Creator display name |
authorUniqueId | string | Creator handle |
authorUrl | url | Creator profile URL |
authorFollowerCount | int | Creator follower count |
musicTitle | string | Background music title |
musicAuthor | string | Music creator |
hashtags | string[] | Hashtags extracted from caption |
isOriginalSound | bool | Original audio? |
searchKeyword | string | The keyword that surfaced this video |
rank | int | Position in search results (1-indexed) |
scrapedAt | ISO 8601 | Extraction timestamp |
Pricing
Pay-Per-Event:
| Event | Price |
|---|---|
| Actor start | $0.00005 (per GB RAM) |
| Video returned | $0.005 |
50 videos = ~$0.25, 200 videos = ~$1.00, 1000 videos = ~$5.00.
Pay-Per-Usage (compute + proxy passthrough) is also enabled — Apify lets you pick at run time.
Input
{"searchQueries": ["美食", "穿搭"],"maxResults": 50,"sortBy": "relevance","publishTime": "unlimited","duration": "any"}
searchQueries(required) — array of keywords.maxResults— total cap across all keywords (1-1000, default 50).sortBy—relevance(default) /latest/most_liked.publishTime—unlimited(default) /day/week/month/halfYear.duration—any(default) /under1min/1to5min/over5min.proxyConfiguration— defaults to Apify Residential, country=HK. Override only if you have a China-region residential proxy.
Usage
Apify API
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~douyin-search-scraper/run-sync-get-dataset-items?token=<TOKEN>" \-H "Content-Type: application/json" \-d '{"searchQueries":["美食"],"maxResults":20}'
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('khadinakbar/douyin-search-scraper').call({searchQueries: ['美食', 'iphone'],maxResults: 100,sortBy: 'most_liked',});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python
from apify_client import ApifyClientclient = ApifyClient("<TOKEN>")run = client.actor("khadinakbar/douyin-search-scraper").call(run_input={"searchQueries": ["美食"],"maxResults": 50,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["title"], item["likeCount"])
MCP (AI agent)
Tool name on the Apify MCP server: apify--douyin-search-scraper.
search Douyin for the keyword "美食" (relevance, past 7 days, under 1 minute), max 30 results
The agent sees: keyword to ranked Douyin videos with structured engagement metrics. Charged per video returned.
How it works
- Camoufox Firefox launches on Apify Residential (HK by default).
- Navigates
douyin.com/search/{keyword}?type=video&sort_type=...&publish_time=...&filter_duration=.... - The page's own JavaScript fires signed
aweme/v1/web/search/item/XHR requests — we intercept the JSON responses viapage.on('response')(no client-side signing needed). - Scroll-paginates to trigger more XHRs until
maxResultsis reached. - Normalizes Douyin's nested aweme JSON to flat semantic fields.
- If the HK proxy is blocked, automatically retries through SG, TW, JP, MO before honest-failing.
Reliability
- Camoufox + Apify Residential is the only consistently working combination for Douyin from outside China.
- Datacenter proxies and Chrome+stealth are blocked.
- Some niche keywords return zero videos — actor exits SUCCEEDED with empty dataset (not an error).
- Full anti-bot block on every navigation across all 5 fallback countries -> run FAILS with clear reason.
Sibling actors
tiktok-trending-hashtags-scraper— TikTok Creative Center trending hashtagstiktok-profile-scraper— TikTok creator profilestiktok-video-comments-scraper— TikTok commentsx-tweet-scraper— X/Twitter posts- Full portfolio
Legal
This actor scrapes only publicly accessible Douyin search results, with no login required. You are responsible for compliance with Douyin's Terms of Service and applicable data-protection law in your jurisdiction. Personal data must be processed with a lawful basis under GDPR / PIPL / equivalent regulation. Do not republish Douyin video content without rights clearance.
FAQ
Why Apify Residential and not a CN proxy? CN-region residential proxies are unreliable and expensive; HK / SG / TW Apify Residential reaches douyin.com fastest from Apify's runtime.
Why is videoUrl sometimes a redirect or expires?
Douyin CDN URLs are signed and time-limited. Re-fetch from videoPageUrl if you need a fresh stream URL.
Does this work for English queries? Yes — Douyin returns mixed-language results. English brand names and product terms work; Chinese keywords return the most volume.
Why might a keyword return fewer videos than I asked for? Douyin caps each search at a few hundred results. Niche keywords may return only a few dozen.