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.
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 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.
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"
# 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"])
// 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);
onefeedapi call douyin.index.keywords.related 'keyword=露营' until=2026-10-04T00:00:00Z{
"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"
}
}
}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.
Douyin trend-index related keywords · $0.0020 / a call · Parameters, fields and errors on the endpoint's page →
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.
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"]}'
# 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"])
// 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);
onefeedapi call douyin.index.keywords.history since=2026-09-01T00:00:00Z until=2026-09-30T00:00:00Z 'keywords=咖啡,CityWalk'{
"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"
}
}
}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.
Douyin trend-index keyword trends · $0.0060 / a call · Parameters, fields and errors on the endpoint's page →
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
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.
{
"capability": "douyin.index.keywords.related",
"keyword": "露营",
"until": "2026-10-04T00:00:00Z",
"idempotency_key": "<a new UUID>"
}Sign in to copy the setup prompt with your keyAbout the MCP server →
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 inmetrics, the next page inpage.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-Pricecaps one call, and the sameIdempotency-Keywithin 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
nullindex. 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.
# 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.