Answers
How do I monitor brand mentions on Douyin and get new videos every day?
Short answer
Search each keyword on okdata with sort=latest once a day and stop paging when videos get older than your last run. A keyword usually needs one or two pages at $0.02 each, so 10 keywords at two pages a day cost $12.00 a month; refreshing a new video's numbers later costs $0.002.
A brand team wants every new Douyin video that mentions its name, its flagship product or a campaign hashtag in a morning report, with the ones gaining traction on top, so they can comment, reach out to the creator or flag a problem before it spreads. Douyin's own search has a publish-time filter, but tools that use it report results from far outside the chosen window, and relevance ranking mixes old hits with new uploads. A daily search sorted by newest, cut off at the time of your last run, gives exactly that list.
The method
Use Douyin video search with sort=latest:
- Run each keyword once a day (hourly during a launch or a crisis).
- Keep videos whose
published_atis after the last run; ignore IDs you already stored. - Stop paging when a page reaches older videos.
- Rank the new ones by likes, comments and shares, and send the list on.
There is no date parameter to rely on, and none is needed: sorting by latest and cutting at a timestamp is exact.
Cost
| Setup | Calls per day | Per day | Per 30 days |
|---|---|---|---|
| 1 keyword, usually 1 page | 1 | $0.02 | $0.60 |
| 10 keywords, 2 pages each | 20 | $0.40 | $12.00 |
| plus 2 comment pages on 3 hot videos a day | 6 | $0.012 | $0.36 |
To follow how a video develops over the following days, refresh it with video detail at $0.002; that is far cheaper than searching again.
Script
import os, requests, datetime as dt
URL = "https://api.okdata.online/v1/douyin/videos/search"
HEAD = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}
since = (dt.datetime.now(dt.timezone.utc) - dt.timedelta(days=1)).strftime("%Y-%m-%dT%H:%M:%S")
params, fresh = {"query": "某品牌 新品", "sort": "latest"}, []
for _ in range(3): # page cap
body = requests.get(URL, headers=HEAD, params=params, timeout=60).json()
items = body["data"]["items"]
fresh += [v for v in items if v["published_at"] >= since]
if not body["page"]["has_more"] or (items and items[-1]["published_at"] < since):
break
params["cursor"] = body["page"]["next_cursor"]
fresh.sort(key=lambda v: v["metrics"]["likes"] or 0, reverse=True)
Expect these
- Search matches loosely. Short brand names catch unrelated videos; add a product word or filter captions in code.
- Play counts are not public; rank by likes, comments and shares.
- Follower counts are not in search results. To flag big creators, look authors up with account profile.
- A page with nothing new still costs one call. Match frequency to how fast the keyword moves.
Alternatives
巨量算数 shows how search interest in a keyword moves over time, a good companion that does not list videos. Social listening suites cover Douyin with dashboards and alerts for teams that want no code. For a combined Douyin, Xiaohongshu and Weibo setup, see word-of-mouth monitoring.
Updated