抖音批量查作品 API

用 urls 一次查多条抖音作品,每条一行,带 text、like_count、comment_count、share_count、collect_count 和作者字段;urls 里每项算一次,每千次 $0.56。

  • 每行的 input 是你传的那一项,用它对回去
  • 没取到的不收费,列在响应的 missed 里
  • 失败和空结果不收费
免费开始

接口健康状态

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

24 小时趋势

30 天趋势

  1. 1请求

    POST /api/v1/social
    {
      "platform": "douyin",
      "action": "posts_batch",
      "params": {
        "urls": [
          "https://www.douyin.com/video/<VIDEO_ID_A>",
          "<VIDEO_ID_B>"
        ]
      }
    }
  2. 2JSON 响应

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

    textmedia_typevideo_urllike_count
    stringstringstringnumber
  4. 4CSV

    douyin-posts_batch-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,input

请求带 urls,返回每条作品一行,results 里的 input 对应你传的那一项,列成字段表,也可下载为 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)。
input—这一行对应的你传的那一项(posts_batch、profiles_batch、media_links 的 urls 里原样那个值),用来把结果对回去。

用途

  • 批量刷新作品库的互动数

    把库里的视频链接放进 urls,读各行的 like_count、comment_count,用 input 对回库里的记录。

  • 核对一批视频还在不在

    读 is_deleted 和 is_private,找出已被删除或仅自己可见的作品。

  • 比较一组视频的作者

    读 author_name、author_follower_count 和 author_is_verified,看这批视频出自什么规模的账号。

  • 接在链接识别之后

    一堆分享文字里混着好几个视频时,先用 resolve_links 把每一段 matched_text 拆出来,再放进 urls;短链和整段分享口令 posts_batch 本身就收。

抖音开放平台 与 EveryInfra 对比

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

对比项抖音开放平台EveryInfra
怎么调用"通过access_token进行接口调用,获取用户基本信息及其他操作等。"不用先拿 access_token;请求头放 EveryInfra API Key,urls 里放要读的作品。

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

限制和注意事项

  • urls 是数组,一次能传几项见参数说明;同一项只能出现一次。
  • 每项可以是纯数字视频 ID、视频链接(https://www.douyin.com/video/<视频ID>)、v.douyin.com 短链,或整段带短链的分享口令。
  • 按个数计费,每项算一次;没取到的不收费,列在响应的 missed 里。
  • is_deleted 为 true 表示作品已被删除;is_private 为 true 表示仅自己可见;抖音标了才有这两个键。
  • 互动数是取到那一刻的值;要看变化用 post_history。
  • 只支持同步调用。

价格

urls 里每一项算一次,每次 $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": "posts_batch",
  "params": {
    "urls": [
      "https://www.douyin.com/video/<VIDEO_ID_A>",
      "<VIDEO_ID_B>"
    ]
  }
}'

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

把 <> 里的占位换成真实视频 ID。urls 放最多 20 个视频,每项是视频 ID、视频链接、v.douyin.com 短链或带短链的分享口令,同一项只能出现一次;一个视频一行,没查到的不收费,列在响应的 missed 里。

API 参考

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

POST

AI 提示词

#
请帮我用 EveryInfra 的「抖音批量查作品」接口(douyin/posts_batch)写一个数据采集脚本。

接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 douyin,action 填 posts_batch,参数放在 params 里。
- 必填参数:
  - urls:要读的视频,一次最多 20 个,数组,同一项只能出现一次;按个数计费,每个算一次,没取到的退回。返回行带 input,原样是你传的那一项,用来对回去。
- 可选参数:
  - limit:这次调用最多返回的条数,整数,至少为 1;不传按默认值,实际返回可能少于这个数。
- 返回一组记录,每条记录的主要字段:id、url、text、media_type(媒体类型)、video_url(视频播放地址(带签名、会过期)、like_count、comment_count、share_count、collect_count、author_name、author_id、author_douyin_id(作者抖音号);一共 35 个字段,完整列表见 https://api.everyinfra.com/api/v1/social/catalog?platform=douyin。
- 示例请求体:
{
  "platform": "douyin",
  "action": "posts_batch",
  "params": {
    "urls": [
      "https://www.douyin.com/video/<VIDEO_ID_A>",
      "<VIDEO_ID_B>"
    ]
  }
}
- 计费:$0.56 / 千次;失败和空结果不扣费。
- 这个接口只能同步调用,请求体里不要加 "mode": "async"。
- 返回 422 时,按错误信息里的候选参数和允许值修正;返回 429 或 503 时,按 Retry-After 等待后重试。

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

请求参数

#
参数名位置类型必填默认值说明
Authorizationheaderstring是-Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。
platformbodystring是douyin平台标识,固定值。
actionbodystring是posts_batch能力标识,固定值。
urlsbody.paramsarray是-要读的视频,一次最多 20 个,数组,同一项只能出现一次;按个数计费,每个算一次,没取到的退回。返回行带 input,原样是你传的那一项,用来对回去。每项是 抖音视频:纯数字视频 ID、视频链接(https://www.douyin.com/video/<视频ID>)、v.douyin.com 短链,或整段带短链的分享口令都行。
limitbody.paramsinteger (1–)否-这次调用最多返回的条数,整数,至少为 1;不传按默认值,实际返回可能少于这个数。

响应示例

#
这组示例参数还没有真实样例:这里只按接口定义列出响应结构和字段,值用 … 占位,不是一次真实调用的结果。
json
{  "id": "req_…",  "platform": "douyin",  "action": "posts_batch",  "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": …,      "input": …    }  ],  "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)。
input这一行对应的你传的那一项(posts_batch、profiles_batch、media_links 的 urls 里原样那个值),用来把结果对回去。

错误与计费

#
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、is_deleted、is_private 等,另有 input。

怎么把结果对回我传的那一项?

每行的 input 原样是你传的那一项,按它对回去。

有的链接没取到,怎么办?

看响应里的 missed,这些项没取到、不收费;可以单独再请求。

批量查作品怎么算钱?

urls 里每一项算一次,每次 $0.000556,每千次 $0.56。失败和空结果不收费。

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

Google Analytics 同意才加载 隐私