抖音合集里的作品 API

按 mix_id 读一个抖音合集里的作品,每集一行,带 episode、text、like_count、comment_count、share_count 和这一集的 play_count,每千次 $0.79。

  • 每行是合集里的一集,episode 从 1 开始
  • mix_episode_count 给出合集一共几集
  • 失败和空结果不收费
免费开始

接口健康状态

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

24 小时趋势

30 天趋势

  1. 1请求

    POST /api/v1/social
    {
      "platform": "douyin",
      "action": "mix_posts",
      "params": {
        "mix_id": "7631984690945067058"
      }
    }
  2. 2JSON 响应

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

    textmedia_typevideo_urllike_count
    stringstringstringnumber
  4. 4CSV

    douyin-mix_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,play_count,episode,mix_episode_count

请求带 mix_id,返回一页合集里的作品,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)。
play_countnumber仅热点宝视频榜单和合集上是真实播放数。在 billboard_video_hot、billboard_low_fan_explosion、billboard_high_completion 上是抖音平台自己统计的播放数,mix_posts 是这一集作品的播放数,user_mixes 是整个合集的播放数;其余能力上抖音不对外公开播放量,值多为 0,不代表真实播放,热度请看点赞、评论、分享数。
episodenumber这条作品是第几集,从 1 开始:mix_posts 是合集里的,series_posts 是短剧里的。
mix_episode_count—这个合集一共几集(mix_posts),每行相同。

用途

  • 逐集看表现

    按 episode 排开,比较各集的 like_count、comment_count 和 play_count,看哪几集更受关注。

  • 取合集的视频地址

    翻页读完,用每行的 url 和 video_url 拿到各集的地址;video_url 带签名、会过期。

  • 看合集的发布节奏

    读每集的 posted_at,看合集是集中发完,还是隔几天更新一集。

  • 接着读作者

    每行带作者的 author_name 和 author_id,可以把 author_id 交给 profile 读主页。

抖音开放平台 与 EveryInfra 对比

下面从接入条件看,比较抖音开放平台文档和 EveryInfra mix_posts。

对比项抖音开放平台EveryInfra
接入条件"已经申请用户管理权限,并且通过用户授权的第三方开发者,可以获取相应数据。"一把 EveryInfra API Key 放在 Authorization: Bearer 请求头里,请求只带 mix_id,不需要作者授权。

引文出自抖音开放平台的用户信息获取接入方案,2026-11-22 核对;页面没有标更新日期。开放平台的 OpenAPI 列表里没有读取合集里作品的接口,所以这里只比接入条件。 官方出处: 用户信息获取接入方案

限制和注意事项

  • mix_id 必填:纯数字的合集 ID,取自 user_mixes 返回行的 mix_id;也收 https://www.douyin.com/collection/<ID> 链接。
  • 一次调用返回一页,按集数从前往后,实际条数可能不满;拿下一页,把响应里的 next_page_token 原样作为 page_token 传回,其余参数不变,令牌 24 小时内有效,翻到底时没有 next_page_token。
  • episode 从 1 开始,是这一集在合集里的序号;mix_episode_count 是合集一共几集,每行相同。
  • play_count 是这一集作品的播放数。
  • video_url 带签名、会过期,要留存请及时下载。

价格

每次调用 $0.000792,按次计费,不按条数算;一次调用返回一页,翻一页算一次调用。失败和空结果不收费。

调用次数费用
10,000$7.92
100,000$79.17
1,000,000$791.67

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

代码示例

#
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": "mix_posts",
  "params": {
    "mix_id": "7631984690945067058"
  }
}'

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

API 参考

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

POST

AI 提示词

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

接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 douyin,action 填 mix_posts,参数放在 params 里。
- 必填参数:
  - mix_id:抖音合集 ID,纯数字,取自 user_mixes 返回行的 mix_id;也收 https://www.douyin.com/collection/<ID> 链接。
- 可选参数:
  - page_token:翻页令牌。不传是第 1 页;之后把上一页响应里的 next_page_token 原样传回取下一页,其余参数不变。令牌 24 小时内有效;翻到底时没有 next_page_token。一页最多 15 集,按集数从前往后。
- 返回一组记录,每条记录的主要字段:id、url、text、media_type(媒体类型)、video_url(视频播放地址(带签名、会过期)、like_count、comment_count、share_count、collect_count、author_name、author_id、author_douyin_id(作者抖音号);一共 37 个字段,完整列表见 https://api.everyinfra.com/api/v1/social/catalog?platform=douyin。
- 示例请求体:
{
  "platform": "douyin",
  "action": "mix_posts",
  "params": {
    "mix_id": "7631984690945067058"
  }
}
- 计费:$0.79 / 千次;失败和空结果不扣费。
- 一次要采几十上百个时,在请求体加 "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是mix_posts能力标识,固定值。
mix_idbody.paramsstring是-抖音合集 ID,纯数字,取自 user_mixes 返回行的 mix_id;也收 https://www.douyin.com/collection/<ID> 链接。
page_tokenbody.paramsstring否-翻页令牌。不传是第 1 页;之后把上一页响应里的 next_page_token 原样传回取下一页,其余参数不变。令牌 24 小时内有效;翻到底时没有 next_page_token。一页最多 15 集,按集数从前往后。

响应示例

#
这组示例参数还没有真实样例:这里只按接口定义列出响应结构和字段,值用 … 占位,不是一次真实调用的结果。
json
{  "id": "req_…",  "platform": "douyin",  "action": "mix_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": …,      "play_count": …,      "episode": …,      "mix_episode_count": …    }  ],  "next_page_token": …,  "pagination": { … },  "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)。
play_count仅热点宝视频榜单和合集上是真实播放数。在 billboard_video_hot、billboard_low_fan_explosion、billboard_high_completion 上是抖音平台自己统计的播放数,mix_posts 是这一集作品的播放数,user_mixes 是整个合集的播放数;其余能力上抖音不对外公开播放量,值多为 0,不代表真实播放,热度请看点赞、评论、分享数。
episode这条作品是第几集,从 1 开始:mix_posts 是合集里的,series_posts 是短剧里的。
mix_episode_count这个合集一共几集(mix_posts),每行相同。

错误与计费

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

错误码

常见问题

抖音合集作品接口返回什么?

每行是合集里的一集:id、url、text、media_type、video_url、like_count、comment_count、share_count、collect_count、posted_at、episode、mix_episode_count,加上作者的 author_name、author_id 等字段。

合集 ID 从哪里来?

从 user_mixes 的返回行里取 mix_id,也可以直接传合集链接 https://www.douyin.com/collection/<ID>。

读一页合集作品要多少钱?

每次 $0.000792,每千次 $0.79,按调用次数算,不按条数算。失败和空结果不收费。

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

Google Analytics 同意才加载 隐私