怎么发
用 POST 带 JSON 请求体,或者用 GET 把同样的参数放进查询串。key 放在 Authorization 头里。
curl -X POST "https://api.silklinedata.com/v1/douyin-analytics/keywordTrend" \
-H "Authorization: Bearer $SILKLINE_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":5,"keywords":["美食","咖啡"]}'import os, requests
response = requests.post(
"https://api.silklinedata.com/v1/douyin-analytics/keywordTrend",
headers={"Authorization": "Bearer " + os.environ["SILKLINE_KEY"]},
json={
"limit": 5,
"keywords": ["美食", "咖啡"],
},
)
answer = response.json()
print(answer["data"], answer["meta"]["charged_usd"])const response = await fetch("https://api.silklinedata.com/v1/douyin-analytics/keywordTrend", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SILKLINE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"limit": 5,
"keywords": [
"美食",
"咖啡"
]
}),
});
const { data, cursor, meta } = await response.json();
console.log(data, meta.charged_usd);返回什么
这是 2026-11-09 一次真实请求返回的记录。普通用户的名字、头像和主页链接显示为 <masked>;长文字只在这里截短,接口里是完整的。
200 OK · 取数日期 2026-11-09
{
"data": [
{
"type": "keywordTrend",
"keyword": "美食",
"startDate": "2026-10-26",
"endDate": "2026-11-08",
"contentIndex": [
{
"date": "2026-10-26",
"index": 3717983
},
{
"date": "2026-10-27",
"index": 3778146
},
{
"date": "2026-10-28",
"index": 3836292
}
],
"searchIndex": [
{
"date": "2026-10-26",
"index": 7331904
},
{
"date": "2026-10-27",
"index": 7453244
},
{
"date": "2026-10-28",
"index": 7482794
}
],
"average": {
"content": 4133227,
"search": 8462771
},
"previousPeriodAverage": {
"content": 4050895,
"search": 8398212
},
"lastYearAverage": {
"content": 3536018,
"search": 7288537
},
"contentPeaks": [
{
"date": "2026-10-31",
"videos": [
{
"videoId": "7698209754858986731",
"title": "邯郸老式炸串15元60串 #接地气的小吃 #…",
"url": "https://www.douyin.com/video/76982097…"
},
{
"videoId": "7702393666706459958",
"title": "im back!!! #满级吃商通关赛 #抖音美食…",
"url": "https://www.douyin.com/video/77023936…"
},
{
"videoId": "7701238498208803554",
"title": "我姥真是太爱做罐头了,做的罐头太好吃…",
"url": "https://www.douyin.com/video/77012384…"
}
]
},
{
"date": "2026-11-07",
"videos": [
{
"videoId": "7703832448366366006",
"title": "有人懂这一杯都是芒果的快乐吗#固体杨枝…",
"url": "https://www.douyin.com/video/77038324…"
},
{
"videoId": "7705150922402281401",
"title": "这钱花的…比丢了还难受! #美食 #甜品 …",
"url": "https://www.douyin.com/video/77051509…"
},
{
"videoId": "7704617769991458058",
"title": "半斤一个的酸菜馅大蒸饺,配上专属东北…",
"url": "https://www.douyin.com/video/77046177…"
}
]
},
{
"date": "2026-10-30",
"videos": [
{
"videoId": "7678670600089103269",
"title": "一次啃四十个翅尖#华莱士 #翅尖 #美食",
"url": "https://www.douyin.com/video/76786706…"
},
{
"videoId": "7694835270495225216",
"title": "辣椒酥你就像我这样做,做法简单又好吃…",
"url": "https://www.douyin.com/video/76948352…"
},
{
"videoId": "7701996620426038568",
"title": "今天老妈喜笑颜开,新房子总算收拾妥当…",
"url": "https://www.douyin.com/video/77019966…"
}
]
}
],
"searchPeaks": [
{
"date": "2026-10-31",
"queries": [
"美食团购",
"附近美食团购",
"附近美食"
]
},
{
"date": "2026-11-07",
"queries": [
"吃美食视频",
"附近美食",
"附近美食团购"
]
},
{
"date": "2026-10-30",
"queries": [
"寻味城市招牌美食",
"美食",
"附近美食"
]
}
],
"interpretation": {
"contentIndex": 7500202,
"consumeIndex": 13207696,
"searchIndex": 32647664,
"changeVsPreviousPeriod": {
"content": 0.06990710043064643,
"consume": 0.023974883197269245,
"search": -0.003217215233816833
},
"changeVsLastYear": {
"content": 0.4413607506624247,
"consume": 0.0703690228334304,
"search": 0.1485423680580434
}
}
},
{
"type": "keywordTrend",
"keyword": "咖啡",
"startDate": "2026-10-26",
"endDate": "2026-11-08",
"contentIndex": [
{
"date": "2026-10-26",
"index": 1739826
},
{
"date": "2026-10-27",
"index": 1753275
},
{
"date": "2026-10-28",
"index": 1733753
}
],
"searchIndex": [
{
"date": "2026-10-26",
"index": 4837997
},
{
"date": "2026-10-27",
"index": 4871330
},
{
"date": "2026-10-28",
"index": 4817743
}
],
"average": {
"content": 1920335,
"search": 5391383
},
"previousPeriodAverage": {
"content": 1730576,
"search": 4826502
},
"lastYearAverage": {
"content": 1273559,
"search": 3681262
},
"contentPeaks": [
{
"date": "2026-11-07",
"videos": [
{
"videoId": "7698671073621748598",
"title": "你的爱 像是备胎弄的咖啡 #比莉 #dear…",
"url": "https://www.douyin.com/video/76986710…"
},
{
"videoId": "7703626541881094355",
"title": "今年的太妃榛果拿铁 也是被我提前喝上了…",
"url": "https://www.douyin.com/video/77036265…"
},
{
"videoId": "7695256960119596899",
"title": "咖啡端好,快乐拉倒~#边走边跳 #吻别散…",
"url": "https://www.douyin.com/video/76952569…"
}
]
},
{
"date": "2026-10-31",
"videos": [
{
"videoId": "7695256960119596899",
"title": "咖啡端好,快乐拉倒~#边走边跳 #吻别散…",
"url": "https://www.douyin.com/video/76952569…"
},
{
"videoId": "7695347592213022373",
"title": "没人告诉我们娃上学后会这么无聊 #金典…",
"url": "https://www.douyin.com/video/76953475…"
},
{
"videoId": "7701944422723849481",
"title": "大家笑我山上开咖啡店,我囤满美食,暴…",
"url": "https://www.douyin.com/video/77019444…"
}
]
},
{
"date": "2026-11-06",
"videos": [
{
"videoId": "7700242457841151103",
"title": "同志们!赚十万的机会来啦! #手工diy #…",
"url": "https://www.douyin.com/video/77002424…"
},
{
"videoId": "7704604341147176218",
"title": "老登第一次去网红咖啡店打卡的尴尬... #…",
"url": "https://www.douyin.com/video/77046043…"
},
{
"videoId": "7704615791790290530",
"title": "当你第一次去精品咖啡馆 #超自然行动组 …",
"url": "https://www.douyin.com/video/77046157…"
}
]
}
],
"searchPeaks": [
{
"date": "2026-11-07",
"queries": [
"瑞幸咖啡抖音团购",
"库迪咖啡",
"网友511元捡漏拍走标王咖啡豆"
]
},
{
"date": "2026-10-31",
"queries": [
"库迪咖啡",
"瑞幸咖啡团购",
"瑞幸咖啡抖音团购"
]
},
{
"date": "2026-11-06",
"queries": [
"瑞幸咖啡抖音团购",
"库迪咖啡",
"雪王咖啡拼豆大赛"
]
}
],
"interpretation": {
"contentIndex": 1846428,
"consumeIndex": 2091370,
"searchIndex": 20708536,
"changeVsPreviousPeriod": {
"content": 0.051775741812370844,
"consume": 0.09005721955472953,
"search": 0.10015048393460696
},
"changeVsLastYear": {
"content": 0.9972227392339421,
"consume": 0.6404932128575463,
"search": 0.4424071850906466
}
}
}
],
"cursor": null,
"meta": {
"request_id": "req_01JD8Q…",
"charged_usd": "0.046200",
"balance_usd": "9.875000",
"items": 2
}
}字段 12
| 字段 | 类型 | 示例值 |
|---|---|---|
| type | string | keywordTrend |
| keyword | string | 美食 |
| startDate | string | 2026-10-26 |
| endDate | string | 2026-11-08 |
| contentIndex | array | [{"date":"2026-10-26","index":3717983},{"date":"2026-10-27",… |
| searchIndex | array | [{"date":"2026-10-26","index":7331904},{"date":"2026-10-27",… |
| average | object | {"content":4133227,"search":8462771} |
| previousPeriodAverage | object | {"content":4050895,"search":8398212} |
| lastYearAverage | object | {"content":3536018,"search":7288537} |
| contentPeaks | array | [{"date":"2026-10-31","videos":[{"videoId":"7698209754858986… |
| searchPeaks | array | [{"date":"2026-10-31","queries":["美食团购","附近美食团购","附近美食"]},{"… |
| interpretation | object | {"contentIndex":7500202,"consumeIndex":13207696,"searchIndex… |
参数 2
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| limit | integer | 否 | 返回多少条记录,1 到 100。一次请求返回的条数不会超过这个数。 | 5 |
| keywords | array | 是 | 关键词或话题名,用中文。 | ["美食","咖啡"] |
翻页
这个接口一次请求就返回全部:要更多条就把 limit 调大(最多 100)。cursor 一直是 null。
一次请求花多少
按条计费;一次请求条数少或没有结果时,每取一页收费不超过这个接口每页的最低收费,可能更低;我们这边出错或超时不收费。
这个接口一页最多 2 条,每页最低收费 $0.005;要 100 条的请求会取 50 页。
- 1 条:最多 $0.0231
- 20 条:最多 $0.462
- 100 条:最多 $2.31
返回的 meta 里写着这次扣了多少(charged_usd)和还剩多少(balance_usd)。我们这边出错不收费。
常见问题
「关键词热度趋势」要传哪些参数?
必填:keywords。另外都可以传 limit(1 到 100)。
一次请求最多返回多少条?
每次请求最多 100 条(limit 1 到 100)。每页最多 2 条,要 100 条时一次请求取 50 页。
能接着往后取吗?
不能。这个接口一次请求就把结果全部返回,回答里的 cursor 是 null。
怎么收费?
每条 分析记录 $0.0231。每页最低收费 $0.005:条数少或没有结果时,每取一页最多收这么多,可能更低。取 100 条最多 $2.31。
请求失败或者没有结果时怎么收费?
按条计费;一次请求条数少或没有结果时,每取一页收费不超过这个接口每页的最低收费,可能更低;我们这边出错或超时不收费。回答里的 meta 写着这次收了多少、余额还剩多少。