Douyin Search Scraper avatar

Douyin Search Scraper

Pricing

from $5.00 / 1,000 video returneds

Go to Apify Store
Douyin Search Scraper

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

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

4 days ago

Last modified

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:

FieldTypeDescription
awemeIdstringDouyin video ID, globally unique
titlestringVideo caption / description
videoPageUrlurlPublic Douyin video URL
videoUrlurlDirect mp4 CDN URL (ephemeral)
coverUrlurlCover/thumbnail image
durationint (ms)Video length
playCountintTotal plays
likeCountintTotal likes
commentCountintTotal comments
shareCountintTotal shares
collectCountintBookmarks / favorites
publishedAtISO 8601Publish timestamp
authorNicknamestringCreator display name
authorUniqueIdstringCreator handle
authorUrlurlCreator profile URL
authorFollowerCountintCreator follower count
musicTitlestringBackground music title
musicAuthorstringMusic creator
hashtagsstring[]Hashtags extracted from caption
isOriginalSoundboolOriginal audio?
searchKeywordstringThe keyword that surfaced this video
rankintPosition in search results (1-indexed)
scrapedAtISO 8601Extraction timestamp

Pricing

Pay-Per-Event:

EventPrice
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).
  • sortByrelevance (default) / latest / most_liked.
  • publishTimeunlimited (default) / day / week / month / halfYear.
  • durationany (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 ApifyClient
client = 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

  1. Camoufox Firefox launches on Apify Residential (HK by default).
  2. Navigates douyin.com/search/{keyword}?type=video&sort_type=...&publish_time=...&filter_duration=....
  3. The page's own JavaScript fires signed aweme/v1/web/search/item/ XHR requests — we intercept the JSON responses via page.on('response') (no client-side signing needed).
  4. Scroll-paginates to trigger more XHRs until maxResults is reached.
  5. Normalizes Douyin's nested aweme JSON to flat semantic fields.
  6. 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

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.