怎么用 API 找抖音当前热榜话题,之后如何追踪热度?
从 GET /v1/douyin/trends/list 读取当前榜单,热搜可用 board=hot_search,飙升可用 board=rising。把返回的榜单名称、位次、热度和采集时点存成快照;想持续跟踪一个词,再用 douyin 趋势任务取逐日搜索指数。
DataXAPI 价目生效日期与版本 2026-11-25 · v22
按观察目标选一个榜单
该目录的 board 还包括 topics、searches、music。成功响应从 data.items 读取 id、name、rank、heat 等可用字段。需要更多样本时仅沿同一个 board 的返回游标向下读取。
巨量算数的 /v1/douyin/index/trends/list 支持 topics 或 rising。分别采集时,在表中标注端点、board 与 fetched_at,再比较相同来源同一榜单的进入、退出和位次变化。
把热点线索转成可复查的观察词
把确认要跟踪的名称收入关键词清单,用 POST /api/run 的 douyin 任务设一个明确的起止日。保存 keyword、date、searchIndex,然后按日期看后续变动。先用 mode=demo 核对字段,无需上游请求。
榜单的 heat 和逐日 searchIndex 使用不同口径,适合分列展示。报告可以写「采集时位列该榜第 5」,另附日期范围内的热度趋势。避免把不同字段直接相加。
保存一份可复查的实时热搜快照
示例请求 board=hot_search,每次 DataXAPI 参考价 USD 0.002。将原始响应保存在独立快照文件,后续用相同端点和榜型比较。采集时间优先保留 meta.fetched_at。历史指数另从托管任务取,不能补造过去的实时榜单。
set -eu
: "${SOCIAL2API_API_KEY:?需要 catalog 权限}"
: "${DATAXAPI_API_KEY:?需要自己的 DataXAPI Key}"
catalog_get() {
path=$1; cap=$2; shift 2
curl -fsSG "https://social2api.com$path" \
-H "Authorization: Bearer $SOCIAL2API_API_KEY" \
-H "X-DataXAPI-Key: $DATAXAPI_API_KEY" -H "X-Max-Price: $cap" "$@"
}
snapshot=douyin-hot-search-$(date -u +%Y%m%dT%H%M%SZ).json
catalog_get /v1/douyin/trends/list 0.002 --data-urlencode board=hot_search > "$snapshot"
jq '.meta.fetched_at as $at | {collected_at:$at,request_id,board:"hot_search",results:[.data.items[]|{id,name,rank,heat}]}' "$snapshot"