Answers
How do I get Douyin Index (巨量算数) keyword trends through an API?
Short answer
okdata's Douyin index keyword trends takes one to five keywords and a date range and returns each keyword's search index and composite index day by day, $0.006 a call. Related keywords cost $0.002 a call and the keyword audience $0.002. Trends, related keywords and audience for 20 keywords every week come to $0.104.
巨量算数, often called the Douyin Index, is the analytics site of Ocean Engine (巨量引擎), Douyin's own ad platform. It charts how much a keyword is searched and talked about on Douyin, China's version of TikTok, with related keywords and an audience profile. The site is good for looking at one chart at a time. If you want dozens of keywords as daily numbers in a sheet or dashboard, next to your ad spend or sales, you need the numbers programmatically. Three endpoints return a keyword's trend, its related keywords and its audience from 巨量算数.
The calls
- Daily trend. Douyin index keyword trends takes
keywordfor one keyword orkeywords=咖啡,奶茶for up to five, comma-separated, plussinceanduntil, read as calendar days in China time (UTC+8). Each keyword comes back as one item whosepointshold asearch_indexand acomposite_indexper day. Keywords must be in the language people search in, which for Douyin is mostly Chinese. - Related keywords. Douyin index related keywords takes
keywordanduntil. Relations are published per week, Monday to Sunday, and you get the last complete week ending on or beforeuntil: each related keyword with itsrelation,rank,relevanceand its own two indexes. - Audience. Douyin index keyword audience takes
keyword,sinceanduntiland returns the split by age, gender, province, city, city tier and interest, each with ashareand atgi(target group index, 100 meaning average).
curl -G "https://api.okdata.online/v1/douyin/index/keywords/history" \
-H "Authorization: Bearer $OKDATA_API_KEY" \
--data-urlencode 'keywords=咖啡,奶茶' \
--data-urlencode 'since=2026-10-01' \
--data-urlencode 'until=2026-11-18'
A real run
Early on November 20, 2026 (Beijing time) we ran that request for 咖啡 (coffee) and 奶茶 (milk tea). It returned two items with 49 daily points each, October 1 to November 18. The last point for coffee:
{ "date": "2026-11-18T00:00:00Z", "search_index": 4700992, "composite_index": 1695378 }
Milk tea's search index that day was 1,896,738. Related keywords for coffee, for the week ending November 16, came to 173: 86 of type query (searched together) and 87 of type posts (appearing together in videos). The coffee audience for November 1 to 15 was 53% female, 31.2% aged 31 to 40, and the 18 to 23 group had the highest TGI, about 174.
What it costs
| Approach | Calls | Cost |
|---|---|---|
| Trends for five keywords | 1 | $0.006 |
| Trend, related keywords and audience for one keyword | 3 | $0.01 |
| All three for 20 keywords, weekly | 44 | $0.104 |
Send trend requests in groups of five keywords to keep the number of calls down.
Gotchas
- An index is a score, not a count. A search index of 4.7 million does not mean 4.7 million searches. Compare keywords on the same index with each other, not with view counts.
- A day or two behind. 巨量算数 publishes with a lag of one to two days, so the latest days can be missing or null. Our run early on the 20th already had the 18th.
- Keywords the index does not cover are left out. Ask for five and you may get three items; match them by
keyword. - How related keywords are ordered. The searched-together words (
relation: query) come first, then those appearing together in videos (posts), each group byrank, 1 being the most related. Ranks count within one relation and can skip numbers, so read them perrelation. - Related keywords come weekly. A week appears early the following week; before that, asking for it returns an empty list.
- No commas inside a keyword. The comma separates keywords.
Related
- The live board: Douyin hot search
- Reading platform scores: Is the heat number on a hot search list a count of searches?
- The videos behind a keyword: Is there an API to search Douyin videos by keyword?
- Using it for content planning: trend research
Sources
Where people asked this (read 2026-11-20)
Updated