Answers

Is there an API to search Douyin videos by keyword?

Short answer

Yes. The okdata Douyin video search endpoint takes a keyword and returns about 20 videos per call, sorted by relevance, latest or most liked, each with caption, likes, comments, shares, saves, hashtags and the author, for $0.02 a call. 1,000 videos take 50 calls and cost $1.00.

A marketer wants every Douyin video about "露营装备" from the last two weeks, ranked by likes, to see which angles and formats work. Douyin's web search needs a logged-in session, throws image captchas after a few queries, and scrapers often return an empty list once that happens, without saying why. Yes, there is: an API call per page of results returns them as JSON, sortable by likes.

The endpoint

Douyin video search takes query and an optional sort:

  • relevance (default), what Douyin ranks first;
  • latest, newest first, for monitoring;
  • most_liked, for finding what already worked.

Each video comes with its ID and link, caption (text), publish time, likes, comments, shares, saves (favorites), hashtags, image URLs for photo posts, and the author's ID, name and verification. Follow page.next_cursor for more pages.

Cost

Videos Calls Cost
100 5 $0.10
1,000 50 $1.00
10 keywords × 3 pages, daily for a month 900 $18.00

Single-video lookups (video detail) are much cheaper, $0.002 each, so search to discover and use detail to refresh.

Example

curl -G "https://api.okdata.online/v1/douyin/videos/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=露营装备' \
  --data-urlencode 'sort=most_liked' \
  --data-urlencode 'fields=id,text,published_at,metrics.likes,metrics.comments,author.name'

Limits to plan for

  • No play counts. Douyin does not publish views on other people's videos; metrics.views is usually null, and meta.unavailable says the platform hides it. Use likes, comments, shares and saves.
  • No titles. Douyin videos have captions, not titles, so title is null and the caption is in text.
  • No date filter parameter. Sort by latest and stop paging when published_at passes your cutoff.
  • Follower counts are not in search results. Look authors up with account profile ($0.002).
  • Search depth per keyword is limited by Douyin. Narrower keywords widen coverage.

Alternatives

Douyin's open platform gives authorized access to your own account's data, not search over everyone's videos. 巨量算数 (Ocean Engine's free keyword tool) shows search trends for a keyword, not the videos. Open-source tools like MediaCrawler and TikTokDownloader can search with a logged-in session if you are ready to handle captchas. For a full research workflow, see content research.

Updated