For AI

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

  1. Daily trend. Douyin index keyword trends takes keyword for one keyword or keywords=咖啡,奶茶 for up to five, comma-separated, plus since and until, read as calendar days in China time (UTC+8). Each keyword comes back as one item whose points hold a search_index and a composite_index per day. Keywords must be in the language people search in, which for Douyin is mostly Chinese.
  2. Related keywords. Douyin index related keywords takes keyword and until. Relations are published per week, Monday to Sunday, and you get the last complete week ending on or before until: each related keyword with its relation, rank, relevance and its own two indexes.
  3. Audience. Douyin index keyword audience takes keyword, since and until and returns the split by age, gender, province, city, city tier and interest, each with a share and a tgi (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 by rank, 1 being the most related. Ranks count within one relation and can skip numbers, so read them per relation.
  • 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.

Sources

Where people asked this (read 2026-11-20)

Updated

Connect once, then just ask.

Every new key comes with $0.10 to try it. One sentence connects your agent.

Start free
Connect your AI

Paste this into your agent

Read https://okdata.online/agents.md and set up okdata for me; my key is in the OKDATA_API_KEY environment variable.

Claude Code, Cursor, Codex and other agents that can open a link set themselves up from it.

MCP serverhttps://api.okdata.online/mcp