# How do I get Douyin Index (巨量算数) keyword trends through an API?

> Daily search and composite index of Douyin keywords from 巨量算数, Douyin's official index, five keywords a call, plus related keywords and audience. Parameters, delays and cost.

Canonical page: https://okdata.online/answers/douyin-index-keyword-trend-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](/apis/douyin/index/keywords/history/) 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](/apis/douyin/index/keywords/related/) 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](/apis/douyin/index/keywords/audience/get/) 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).

```bash
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:

```json
{ "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.

## Related

- The live board: [Douyin hot search](/tools/hot-search/douyin/)
- Reading platform scores: [Is the heat number on a hot search list a count of searches?](/answers/hot-search-heat-value-meaning/)
- The videos behind a keyword: [Is there an API to search Douyin videos by keyword?](/answers/douyin-video-search-api/)
- Using it for content planning: [trend research](/solutions/trend-research/)

## Endpoints used

- [Douyin index: keyword trends](https://okdata.online/apis/douyin/index/keywords/history/) `douyin.index.keywords.history`: $0.006 per call · about 1 results per page
- [Douyin index: related keywords](https://okdata.online/apis/douyin/index/keywords/related/) `douyin.index.keywords.related`: $0.002 per call · about 170 results per page
- [Douyin index: keyword audience](https://okdata.online/apis/douyin/index/keywords/audience/get/) `douyin.index.keywords.audience.get`: $0.002 per call

## More about Douyin

- [Douyin API](https://okdata.online/apis/douyin/)
- [Douyin API in Python: videos, profiles and comments (2026)](https://okdata.online/guides/douyin-api-python/)
- [How to export Douyin video comments in bulk](https://okdata.online/guides/douyin-video-comments/)
- [How to find Douyin Xingtu creators and get their rate cards](https://okdata.online/guides/douyin-xingtu-creator-rates/)
- [How do I shortlist creators by follower range and price on Douyin and Xiaohongshu?](https://okdata.online/answers/creator-shortlist-followers-price/)
- [How do I get Douyin live room data: viewers, products and top streamers?](https://okdata.online/answers/douyin-live-room-data/)
- [How much do Douyin and Xiaohongshu influencers charge? List prices in 11 categories (November 2026)](https://okdata.online/answers/douyin-xiaohongshu-influencer-rates-2026/)
- [How fresh is the data from a social media API?](https://okdata.online/answers/how-fresh-is-social-media-api-data/)
- [What do the prices on a Douyin Xingtu rate card mean?](https://okdata.online/answers/xingtu-rate-card-prices/)
- [How to collect Douyin comments: API, crawler or no-code (2026)](https://okdata.online/compare/douyin-comment-scraping/)
- [Douyin data APIs: official vs third-party vs open-source (2026)](https://okdata.online/compare/douyin-data-apis/)
- [Official platform APIs vs third-party data APIs (2026)](https://okdata.online/compare/official-apis-vs-data-apis/)
- [Scraping it yourself vs a per-call data API: cost, upkeep and risk](https://okdata.online/compare/scraping-vs-data-api/)
- [How to choose a social media data API (2026)](https://okdata.online/compare/social-media-data-apis/)

## Sources

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

- https://www.zhihu.com/question/417439409
- https://developer.open-douyin.com/forum/synthesize/post/6401c10d5403f7fe0f82a0b8

Updated 2026-11-20
