# How to get Douyin keyword trends in bulk

2 endpoints do it: Douyin trend-index related keywords → Douyin trend-index keyword trends. The worked example below is 5 calls and costs $0.0260 in all; a failed call is not charged.

Updated 2026-11-15

Start from one keyword, widen it into a list with its related keywords from the trend-index (巨量算数), then get the daily search index and composite index five keywords at a time. You end up with one day-by-day table that shows which words are rising and when each one peaked.

## Step by step

### Step 1: Douyin trend-index related keywords

Ask for one keyword and a day, and that week's related keywords come back in one call, with no paging. Each item's `keyword` is the related word; `relation` says whether it is searched together with yours (`query`) or appears with it in content (`posts`); a higher `relevance` means closer. Pick the words to compare and take their `keyword` into the next step. ([Douyin trend-index related keywords](https://onefeedapi.com/apis/douyin/index/keywords/related/), $0.0020 / a call)

cURL

```bash
curl -G "https://onefeedapi.com/v1/douyin/index/keywords/related" \
  --data-urlencode "keyword=露营" \
  --data-urlencode "until=2026-10-04T00:00:00Z" \
  -H "Authorization: Bearer $ONEFEED_API_KEY"
```

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.douyin.index.keywords.related(keyword="露营", until="2026-10-04T00:00:00Z")
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.douyin.index.keywords.related({ keyword: "露营", until: "2026-10-04T00:00:00Z" });
console.log(result.data.items);
```

CLI

```bash
onefeedapi call douyin.index.keywords.related 'keyword=露营' until=2026-10-04T00:00:00Z
```

Recorded response: From a response recorded 2026-10-12 21:52 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

```jsonc
{
  "code": "ok",
  "request_id": "c0ec3319-99cf-4ec1-8441-1e77af9db440",
  "data": {
    "items": [
      {
        "keyword": "露营车",
        "related_to": "露营",
        "relation": "query",
        "rank": 2,
        "relevance": 0.07604021617112115,
        "search_index": 669384,
        "composite_index": 190809
      },
      // … 172 more
    ]
  },
  "page": {
    "next_cursor": null,
    "cursor_expires_at": null,
    "has_more": false,
    "returned": 173
  },
  "warnings": [],
  "meta": {
    "capability": "douyin.index.keywords.related",
    "result_status": "complete",
    "fetched_at": "2026-10-12T21:52:26.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {},
    "billing": {
      "amount": "0.002",
      "currency": "USD",
      "balance_after": "9.998"
    }
  }
}
```

### Step 2: Douyin trend-index keyword trends

Put your keyword and the related ones you picked into `keywords`, up to five a call, with `since` and `until`. Each keyword with figures comes back as one item, whose `points` hold the daily `search_index` and `composite_index`. For more words, call again, five at a time. ([Douyin trend-index keyword trends](https://onefeedapi.com/apis/douyin/index/keywords/history/), $0.0060 / a call)

cURL

```bash
curl "https://onefeedapi.com/v1/douyin/index/keywords/history" \
  -H "Authorization: Bearer $ONEFEED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"since":"2026-09-01T00:00:00Z","until":"2026-09-30T00:00:00Z","keywords":["咖啡","CityWalk"]}'
```

Python

```python
# pip install onefeedapi
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()  # reads ONEFEED_API_KEY
result = dx.douyin.index.keywords.history(since="2026-09-01T00:00:00Z", until="2026-09-30T00:00:00Z", keywords=["咖啡", "CityWalk"])
print(result["data"]["items"])
```

TypeScript

```typescript
// npm i @onefeedapi/sdk
import { OneFeedAPI } from "@onefeedapi/sdk";

const dx = new OneFeedAPI(); // reads ONEFEED_API_KEY
const result = await dx.douyin.index.keywords.history({ since: "2026-09-01T00:00:00Z", until: "2026-09-30T00:00:00Z", keywords: ["咖啡", "CityWalk"] });
console.log(result.data.items);
```

CLI

```bash
onefeedapi call douyin.index.keywords.history since=2026-09-01T00:00:00Z until=2026-09-30T00:00:00Z 'keywords=咖啡,CityWalk'
```

Recorded response: From a response recorded 2026-10-12 21:47 UTC. Names, text and IDs are examples, and so are the links: none is the recorded one (the page shows no one's personal data); the figures are as recorded. Long lists are cut. The request ID, cursor and balance are made up.

```jsonc
{
  "code": "ok",
  "request_id": "53564b2f-0976-4ff1-bacd-8f35e1e89865",
  "data": {
    "items": [
      {
        "keyword": "咖啡",
        "points": [
          {
            "date": "2026-09-01T00:00:00Z",
            "search_index": 4542097,
            "composite_index": 1627826
          },
          {
            "date": "2026-09-02T00:00:00Z",
            "search_index": 4430237,
            "composite_index": 1603543
          },
          {
            "date": "2026-09-03T00:00:00Z",
            "search_index": 4439049,
            "composite_index": 1606224
          },
          {
            "date": "2026-09-04T00:00:00Z",
            "search_index": 4590172,
            "composite_index": 1648872
          },
          {
            "date": "2026-09-05T00:00:00Z",
            "search_index": 5608382,
            "composite_index": 1966637
          },
          {
            "date": "2026-09-06T00:00:00Z",
            "search_index": 5341970,
            "composite_index": 1888380
          },
          {
            "date": "2026-09-07T00:00:00Z",
            "search_index": 5098808,
            "composite_index": 1808789
          },
          // … 23 more
        ]
      },
      // … 1 more
    ]
  },
  "page": {
    "next_cursor": null,
    "cursor_expires_at": null,
    "has_more": false,
    "returned": 2
  },
  "warnings": [],
  "meta": {
    "capability": "douyin.index.keywords.history",
    "result_status": "complete",
    "fetched_at": "2026-10-12T21:47:47.000Z",
    "cached": false,
    "replayed": false,
    "unavailable": {
      "points.notes": "platform",
      "points.impressions": "platform",
      "points.views": "platform",
      "points.engagements": "platform"
    },
    "billing": {
      "amount": "0.006",
      "currency": "USD",
      "balance_after": "9.994"
    }
  }
}
```

## What the example costs

One keyword's related keywords for a week, then the daily index of 20 keywords over 30 days, in 4 calls of five

| Endpoint | Calls | Price | Subtotal |
| --- | --- | --- | --- |
| [Douyin trend-index related keywords](https://onefeedapi.com/apis/douyin/index/keywords/related/) | 1 | $0.0020 | $0.0020 |
| [Douyin trend-index keyword trends](https://onefeedapi.com/apis/douyin/index/keywords/history/) | 4 | $0.0060 | $0.0240 |
| Total | 5 |  | $0.0260 |

Prices are the prices in force when this page was built. A failed call costs nothing.

## In your AI (MCP)

Connect OneFeedAPI to your AI client once. Then say what you want; the agent finds these endpoints, checks the price and calls them on your balance.

Say: Look up the related keywords of 露营 (camping) for the latest week in Douyin's trend-index, pick the 4 most related, and get the daily search index and composite index of those and 露营 for September 2026, as one table.

What the agent sends to the call tool: 

```json
{
  "capability": "douyin.index.keywords.related",
  "keyword": "露营",
  "until": "2026-10-04T00:00:00Z",
  "idempotency_key": "<a new UUID>"
}
```

[About the MCP server](https://onefeedapi.com/mcp/)

## Why OneFeedAPI

- Steady: endpoints were available 99.9% of the last 30 days, on a public status page you can check.
- Fast: a paid call took 2.2 seconds at the median over the last 7 days (counted 2026-11-06).
- Fewer tokens: across 36 endpoints on Douyin, one recorded real response each, the platform's own JSON comes to 2.4M tokens and what an AI reads through OneFeedAPI's MCP server to 72k, 97% fewer; the JSON of a direct API call is 96% fewer too (counted 2026-11-06). Every platform answers in one shape: the author in `author`, counts in `metrics`, the next page in `page.next_cursor`, so another platform needs no new parser.
- See before you pay: every endpoint's page shows a recorded real response, field by field.
- Spending you control: a failed call is not charged; each key can have a limit, `X-Max-Price` caps one call, and the same `Idempotency-Key` within 24 hours is never charged twice.
- Ready for AI: a remote MCP server listed in the official MCP registry as `com.onefeedapi/mcp`, usable from Claude, Cursor and ChatGPT.
- Free trial of up to 333 calls, no card.

## Good to know

- An index is the platform's own score, not a number of searches. Compare a keyword with its own past, or with another keyword on Douyin.
- Days are calendar days in China time (UTC+8). The platform publishes a day's figure a day or two late, and a day without a figure yet has a `null` index. Related keywords come by the week (Monday to Sunday); the latest week usually appears early the next week.
- A keyword the index does not cover is left out of the answer.
- Keywords come back as the platform writes them, with Latin letters in lower case: ask for CityWalk and you get citywalk.

## The whole script

The task above as one script that runs as it is: Python, the SDK, your key from ONEFEED_API_KEY. It writes a CSV file and ends by printing what it called, fetched and was charged.

```python
# pip install onefeedapi
# export ONEFEED_API_KEY=dx_...   (your key)
import csv
from decimal import Decimal
from onefeedapi import OneFeedAPI

dx = OneFeedAPI()
calls, fetched, charged = 0, 0, Decimal("0")

def run(capability, params):
    """One call; counts it and what it was charged."""
    global calls, charged
    result = dx.call(capability, params)
    calls += 1
    charged += Decimal(str(result["meta"]["billing"]["amount"]))
    return result

KEYWORD = "露营"
WEEK = "2026-10-19T00:00:00Z"
SINCE, UNTIL = "2026-09-01T00:00:00Z", "2026-09-30T00:00:00Z"

# 1. The keyword's related keywords in that week, the most relevant first.
related = run("douyin.index.keywords.related", {"keyword": KEYWORD, "until": WEEK})["data"]["items"]
words = [KEYWORD] + [each["keyword"] for each in sorted(related, key=lambda each: -each.get("relevance", 0))[:19]]

# 2. The daily index of every word, five at a time.
rows = []
for start in range(0, len(words), 5):
    for item in run("douyin.index.keywords.history", {"keywords": words[start:start + 5], "since": SINCE, "until": UNTIL})["data"]["items"]:
        for point in item["points"]:
            rows.append([item["keyword"], point["date"], point.get("search_index"), point.get("composite_index")])

fetched = len(rows)
with open("douyin-keywords.csv", "w", newline="", encoding="utf-8") as file:
    csv.writer(file).writerows([["keyword", "date", "search_index", "composite_index"], *rows])

print(f"calls: {calls}, items: {fetched}, charged: ${charged}")
```

Run for real on 2026-10-29: 5 calls, 600 rows written, $0.0260 charged. A failed call is not charged.

## Endpoints

- [Douyin trend-index related keywords](https://onefeedapi.com/apis/douyin/index/keywords/related/)
- [Douyin trend-index keyword trends](https://onefeedapi.com/apis/douyin/index/keywords/history/)

## More about Douyin

- [Douyin API](https://onefeedapi.com/apis/douyin/)
- [Douyin trend-index API](https://onefeedapi.com/apis/douyin/index/)
- [How to export Douyin video comments in bulk](https://onefeedapi.com/guides/douyin-video-comments/)
- [How to look up a Douyin creator's Xingtu rate card](https://onefeedapi.com/guides/douyin-xingtu-creator-rates/)
- [Does Douyin have an API? Get videos and comments with Python (2026)](https://onefeedapi.com/guides/douyin-api-python/)
- [How do I export Douyin data?](https://onefeedapi.com/answers/export-douyin-data/)
- [What is sec_uid on Douyin, and how is it different from uid and the Douyin ID?](https://onefeedapi.com/answers/douyin-sec-uid/)
- [What are aweme_id and modal_id on Douyin, and what is a v.douyin.com link?](https://onefeedapi.com/answers/douyin-aweme-id-modal-id/)
- [Is the Douyin search index a number of searches?](https://onefeedapi.com/answers/douyin-search-index-vs-search-count/)
- [What is the Douyin keyword index (Ocean Engine)?](https://onefeedapi.com/answers/what-is-douyin-keyword-index-ocean-engine/)
- [What is Douyin Xingtu?](https://onefeedapi.com/answers/what-is-douyin-xingtu/)
- [Douyin API for developers: third-party Douyin data APIs and what they return (2026)](https://onefeedapi.com/answers/douyin-third-party-data-apis/)
- [Douyin video download URL: getting a video's play address by API (2026)](https://onefeedapi.com/answers/douyin-video-play-url-api/)
- [Which social media data API is best for AI agents? Count the tokens a response takes (2026)](https://onefeedapi.com/answers/social-media-api-for-ai-agents/)

---

Catalog revision dc959672dd18e2d0. [HTML version](https://onefeedapi.com/guides/douyin-keyword-trends/)
