抖音相关推荐作品 API

给一条视频的 url(视频 ID、视频链接、v.douyin.com 短链或分享口令都行),读抖音为它推荐的相关作品,每千次 $0.56。

  • 每行是一条被推荐的作品,带 text、互动数和作者字段
  • 一次调用一份列表,没有翻页
  • 失败和空结果不收费
免费开始

接口健康状态

24h 健康值
正常
  • 健康 / 正常
  • 可用
  • 少量可用
  • 基本不可用
正常

24 小时趋势

30 天趋势

  1. 1请求

    POST /api/v1/social
    {
      "platform": "douyin",
      "action": "related_posts",
      "params": {
        "url": "https://www.douyin.com/video/7633646113853104116"
      }
    }
  2. 2JSON 响应

    {
      "results": [
        {
          "text": string,
          "media_type": string,
          "video_url": string,
          "like_count": number
        },
        …
      ]
    }
  3. 3行

    textmedia_typevideo_urllike_count
    stringstringstringnumber
  4. 4CSV

    douyin-related_posts-sample.csv id,url,text,media_type,video_url,like_count,comment_count,share_count,collect_count,author_name,author_id,author_douyin_id,author_bio,author_avatar_url,author_follower_count,author_following_count,author_like_count,author_video_count,author_is_verified,cover_image_url,video_width,video_height,video_bitrates,has_watermark,duration_sec,duration_seconds,hashtags,posted_at,title,music,location,image_urls,is_deleted,is_private,platform

请求带 url,返回一份相关作品列表,results 里每行是一条被推荐的作品,列成字段表,也可下载为 CSV。

能拿到什么数据

这个能力还没有公开的真实样本。下表列出每行会返回的字段、类型和含义,不放值。

字段类型含义
idstring该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。
urlstring该记录在原平台上的可访问链接。
textstring正文内容,已去除 HTML 标签,全文返回、不截断(个别平台的列表结果本身只有摘要,以该平台的字段说明为准)。
media_typestring媒体类型。
video_urlstring视频播放地址(带签名、会过期,要留存请及时下载);图文笔记或来源没给时为 null。
like_countnumber点赞数。null 表示该平台或该接口不公开此数据,不等于 0。
comment_countnumber评论数。null 表示不公开,不等于 0。
share_countnumber分享/转发数。null 表示不公开,不等于 0。
collect_countnumber收藏数。null 表示不公开,不等于 0。
author_namestring作者昵称(显示名)。
author_idstring作者在原平台的唯一 ID。
author_douyin_idstring作者抖音号。
author_biostring作者主页简介(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上)。
author_avatar_urlstring作者头像链接:search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上是博主的,live_room 上是主播的,comments 行上是评论者的。
author_follower_countnumber作者粉丝数。null 表示不公开。
author_following_countnumber作者关注数(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上)。
author_like_countnumber作者主页获赞总数(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts / transcript)。
author_video_countnumber作者作品总数(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上)。
author_is_verifiedboolean作者是否认证(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上;live_room 上是主播是否认证;comments 行上是评论者是否认证)。
cover_image_urlstring封面图链接:search / user_posts / posts_batch / related_posts / mix_posts / music_posts / media_links 是作品封面,music_search / music_detail 是音乐封面,billboard_topic_hot 是话题配图,user_mixes 是合集封面,live_room 是直播间封面;带签名的会过期。
video_widthnumber视频画面宽度(像素)。
video_heightnumber视频画面高度(像素)。
video_bitratesarray各清晰度播放地址:[{quality(清晰度名), bitrate(码率,bps), fps, is_h265(是否 H.265 编码), width, height(像素), url}],来源没给的项不出现;地址带签名、会过期(见 video_url_expires_at)。
has_watermarkboolean平台对这条作品视频文件的水印标记(true 表示带水印)。
duration_secnumber视频时长(秒)。
duration_secondsnumber时长,单位秒。非视频/音频内容为 null。
hashtagsarray正文里的话题标签数组,按出现顺序;没有时不出现这个字段。
posted_atstring发布时间,ISO 8601 格式、UTC 时区(如 2026-08-07T12:34:56+00:00)。平台只给非标准字符串时原样透传,解析前建议做容错。null 表示平台未公开。
titlestring标题。平台无标题概念时(如纯文本帖)为 null。
musicobject作品背景音乐:id、title(曲名)、author(演唱/作者)、is_original(是否原声)、duration_sec(秒)、cover_url、play_url(音频地址,可能会过期);没有音乐信息时没有这个键。
location—作品定位的地点(POI):id、name、category(地点分类)、address、district、city、province、country、city_code、latitude、longitude、cover_url、popularity_text(如 327人想去)、view_count、post_count(该地点下的作品数)、collect_count、visitor_count;作品没带定位时没有这个键。
image_urls—图片链接数组,按平台展示顺序;没有图片时不出现这个字段。
is_deletedboolean作品已被删除时为 true;抖音在作品行上标了才有这个键。
is_privateboolean作品仅自己可见(私密)时为 true;抖音在作品行上标了才有这个键。
platformstring数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。

用途

  • 看一条爆款旁边被推荐什么

    对一条表现好的视频读相关作品,比较各行的 like_count 和 text,看抖音把哪些内容放在它旁边。

  • 找同类账号

    读被推荐作品的 author_id 和 author_follower_count,列出和这条视频内容相近的账号。

  • 收集选题线索

    读各行的 text 和 hashtags,看同一类内容常带哪些话题。

  • 拿分享口令直接查

    手里只有一段分享口令时,整段传给 url,不用先换成视频链接。

抖音开放平台 与 EveryInfra 对比

下面拿抖音开放平台「总体授权说明」里的原文,对比 EveryInfra related_posts 怎么接入。

对比项抖音开放平台EveryInfra
用户授权"第三方发起抖音授权登录请求,抖音用户允许授权第三方应用后(扫码确认或账号密码授权登录),确认通过后,会重定向到第三方网站(回调接口)。"不用让抖音用户扫码或登录,也不用回调地址;请求头放 EveryInfra API Key,请求只带 url。

引文出自抖音开放平台「总体授权说明」页,2026-11-22 核对;页面没有标更新日期。抖音官方文档没有讲相关推荐作品,所以这里只比接入方式。 官方出处: 总体授权说明

限制和注意事项

  • url 必填,一次一条视频;收视频 ID、视频链接、v.douyin.com 短链和整段带短链的分享口令。
  • 返回的是抖音推荐的那一部分,不是完整的相关作品名单。
  • 一次调用返回一份列表,没有翻页。
  • 互动数是取到那一刻的值;要看变化用 post_history。
  • video_url 带签名、会过期,要留存请及时下载。

价格

每次调用 $0.000556,按次计费,不按作品条数算;一次调用返回一份列表。失败和空结果不收费。

调用次数费用
10,000$5.56
100,000$55.56
1,000,000$555.56

合计按每次调用的标价算。

代码示例

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "douyin",
  "action": "related_posts",
  "params": {
    "url": "https://www.douyin.com/video/7633646113853104116"
  }
}'

OpenAPI 定义 (JSON)示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。

API 参考

下面是 related_posts 的参数、响应字段、错误和计费,可以复制整页,或用 Markdown 打开后交给 AI 助手。

POST

AI 提示词

#
请帮我用 EveryInfra 的「抖音相关推荐作品」接口(douyin/related_posts)写一个数据采集脚本。

接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 douyin,action 填 related_posts,参数放在 params 里。
- 必填参数:
  - url:要找相关推荐的那条抖音视频:纯数字视频 ID、视频链接(https://www.douyin.com/video/<视频ID>)、v.douyin.com 短链,或整段带短链的分享口令都行。
- 可选参数:
  - limit:这次调用最多返回的条数,整数,至少为 1;不传按默认值,实际返回可能少于这个数。
- 返回一组记录,每条记录的主要字段:id、url、text、media_type(媒体类型)、video_url(视频播放地址(带签名、会过期)、like_count、comment_count、share_count、collect_count、author_name、author_id、author_douyin_id(作者抖音号);一共 34 个字段,完整列表见 https://api.everyinfra.com/api/v1/social/catalog?platform=douyin。
- 示例请求体:
{
  "platform": "douyin",
  "action": "related_posts",
  "params": {
    "url": "https://www.douyin.com/video/7633646113853104116"
  }
}
- 计费:$0.56 / 千次;失败和空结果不扣费。
- 一次要采几十上百个时,在请求体加 "mode": "async":先拿到 job_id,再轮询 GET https://api.everyinfra.com/api/v1/jobs/{job_id} 取结果。
- 返回 422 时,按错误信息里的候选参数和允许值修正;返回 429 或 503 时,按 Retry-After 等待后重试。

写代码前,先问清楚我要采哪些对象、一共多少个、需要哪些字段、结果存成什么格式,再把方案和大概花费讲给我确认。

请求参数

#
参数名位置类型必填默认值说明
Authorizationheaderstring是-Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。
platformbodystring是douyin平台标识,固定值。
actionbodystring是related_posts能力标识,固定值。
urlbody.paramsstring是-要找相关推荐的那条抖音视频:纯数字视频 ID、视频链接(https://www.douyin.com/video/<视频ID>)、v.douyin.com 短链,或整段带短链的分享口令都行。
limitbody.paramsinteger (1–)否-这次调用最多返回的条数,整数,至少为 1;不传按默认值,实际返回可能少于这个数。

响应示例

#
这组示例参数还没有真实样例:这里只按接口定义列出响应结构和字段,值用 … 占位,不是一次真实调用的结果。
json
{  "id": "req_…",  "platform": "douyin",  "action": "related_posts",  "results": [    {      "id": …,      "url": …,      "text": …,      "media_type": …,      "video_url": …,      "like_count": …,      "comment_count": …,      "share_count": …,      "collect_count": …,      "author_name": …,      "author_id": …,      "author_douyin_id": …,      "author_bio": …,      "author_avatar_url": …,      "author_follower_count": …,      "author_following_count": …,      "author_like_count": …,      "author_video_count": …,      "author_is_verified": …,      "cover_image_url": …,      "video_width": …,      "video_height": …,      "video_bitrates": …,      "has_watermark": …,      "duration_sec": …,      "duration_seconds": …,      "hashtags": …,      "posted_at": …,      "title": …,      "music": …,      "location": …,      "image_urls": …,      "is_deleted": …,      "is_private": …,      "platform": …    }  ],  "count": …,  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

返回字段

#

业务数据在 results 里;下表是每条记录可能包含的字段,平台没有提供的值不会被编造。

字段含义
id该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。
url该记录在原平台上的可访问链接。
text正文内容,已去除 HTML 标签,全文返回、不截断(个别平台的列表结果本身只有摘要,以该平台的字段说明为准)。
media_type媒体类型。
video_url视频播放地址(带签名、会过期,要留存请及时下载);图文笔记或来源没给时为 null。
like_count点赞数。null 表示该平台或该接口不公开此数据,不等于 0。
comment_count评论数。null 表示不公开,不等于 0。
share_count分享/转发数。null 表示不公开,不等于 0。
collect_count收藏数。null 表示不公开,不等于 0。
author_name作者昵称(显示名)。
author_id作者在原平台的唯一 ID。
author_douyin_id作者抖音号。
author_bio作者主页简介(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上)。
author_avatar_url作者头像链接:search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上是博主的,live_room 上是主播的,comments 行上是评论者的。
author_follower_count作者粉丝数。null 表示不公开。
author_following_count作者关注数(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上)。
author_like_count作者主页获赞总数(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts / transcript)。
author_video_count作者作品总数(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上)。
author_is_verified作者是否认证(search / user_posts / video / posts_batch / related_posts / mix_posts / music_posts 行上;live_room 上是主播是否认证;comments 行上是评论者是否认证)。
cover_image_url封面图链接:search / user_posts / posts_batch / related_posts / mix_posts / music_posts / media_links 是作品封面,music_search / music_detail 是音乐封面,billboard_topic_hot 是话题配图,user_mixes 是合集封面,live_room 是直播间封面;带签名的会过期。
video_width视频画面宽度(像素)。
video_height视频画面高度(像素)。
video_bitrates各清晰度播放地址:[{quality(清晰度名), bitrate(码率,bps), fps, is_h265(是否 H.265 编码), width, height(像素), url}],来源没给的项不出现;地址带签名、会过期(见 video_url_expires_at)。
has_watermark平台对这条作品视频文件的水印标记(true 表示带水印)。
duration_sec视频时长(秒)。
duration_seconds时长,单位秒。非视频/音频内容为 null。
hashtags正文里的话题标签数组,按出现顺序;没有时不出现这个字段。
posted_at发布时间,ISO 8601 格式、UTC 时区(如 2026-08-07T12:34:56+00:00)。平台只给非标准字符串时原样透传,解析前建议做容错。null 表示平台未公开。
title标题。平台无标题概念时(如纯文本帖)为 null。
music作品背景音乐:id、title(曲名)、author(演唱/作者)、is_original(是否原声)、duration_sec(秒)、cover_url、play_url(音频地址,可能会过期);没有音乐信息时没有这个键。
location作品定位的地点(POI):id、name、category(地点分类)、address、district、city、province、country、city_code、latitude、longitude、cover_url、popularity_text(如 327人想去)、view_count、post_count(该地点下的作品数)、collect_count、visitor_count;作品没带定位时没有这个键。
image_urls图片链接数组,按平台展示顺序;没有图片时不出现这个字段。
is_deleted作品已被删除时为 true;抖音在作品行上标了才有这个键。
is_private作品仅自己可见(私密)时为 true;抖音在作品行上标了才有这个键。
platform数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。

错误与计费

#
401
缺少 Key 或 Key 无效。
402
余额不足,先充值。
422
参数名或取值不对,按错误信息给的候选改;不扣费。
429
超过每分钟请求上限,按 Retry-After 等待后再试。
503
暂时无法完成,预扣的费用退回;结果未知时先核对,不要直接重发。
200 空结果
没有数据,不扣费。

错误码

常见问题

抖音相关推荐接口返回什么?

一份被推荐的作品列表,每行一条作品:id、url、text、media_type、like_count、comment_count、share_count、collect_count、作者字段、hashtags、posted_at 等。

这是这条视频全部的相关作品吗?

不是。这是抖音推荐的那一部分,不是完整的相关作品名单。

url 可以填什么?

纯数字视频 ID、视频链接(https://www.douyin.com/video/<视频ID>)、v.douyin.com 短链,或整段带短链的分享口令。

读一份要多少钱?

每次 $0.000556,每千次 $0.56,按调用次数算,不按作品条数算。失败和空结果不收费。

同一把 Key 还能调用抖音的其他能力。

Google Analytics 同意才加载 隐私