抖音 / Douyin API - 热榜、搜索、评论、博主数据
Pricing
from $4.99 / 1,000 dataset items
抖音 / Douyin API - 热榜、搜索、评论、博主数据
社媒数据助手 SocialDataX 提供的只读抖音 / Douyin data API,支持热榜 / hot list、作品搜索 / video search、作品详情 / video details、评论 / comments、评论回复 / comment replies、博主信息 / creator profiles、博主作品列表 / creator videos 和合集/短剧列表 / creator series。
Pricing
from $4.99 / 1,000 dataset items
Rating
0.0
(0)
Developer
SocialDataX
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
抖音 / Douyin API - 搜索、详情、评论、博主、热榜数据
这是社媒数据助手 SocialDataX 的 Apify Actor 适配层,提供只读抖音 / Douyin data API。
Apify 用户无需配置 SocialDataX API Key;直接通过 Apify Console、Apify API、Dataset export 或自动化工作流运行即可。
支持能力:
- 作品搜索 / video search
- 作品详情 / video details
- 评论列表 / comments
- 评论回复 / comment replies
- 博主信息 / creator profiles
- 博主作品列表 / creator videos
- 博主合集/短剧列表 / creator series
- 热榜 / hot list
This Actor is a read-only, unofficial data API integration. It is not affiliated with Douyin or ByteDance.
Support / 联系我们
如果 run 失败、需要更高用量,或想接入批量数据工作流,请通过 SocialDataX support 联系我们:
- Website: https://socialdatax.com/
If a run fails, you need higher limits, or you want to discuss a bulk data workflow, contact SocialDataX support:
- Website: https://socialdatax.com/
选择字段
先选择 operation,再填写该 operation 需要的字段。Apify 表单里其它字段可以留空;即使误填了无关字段,Actor 也会忽略。
| Operation | 必填字段 | 可选字段 | 说明 |
|---|---|---|---|
search_videos | keyword | sort_type, publish_time_range, duration_range, content_type, page_token, max_items, auto_paginate | 按关键词搜索抖音作品,支持排序和筛选,默认会自动翻页直到达到 max_items。 |
search_hot_list | 无 | max_items | 抖音热榜,请求一次并按 max_items 限制写入 Dataset。 |
get_video_detail | aweme_id 或 url 至少填一个 | 无 | 获取单个抖音作品详情;两者都填时优先使用 url。 |
get_video_comments | aweme_id 或 url 至少填一个 | page_token, max_items, auto_paginate | 获取一级评论列表;两者都填时优先使用 url。 |
get_video_sub_comments | aweme_id, comment_id | page_token, max_items, auto_paginate | 获取某条一级评论下的回复。先运行 get_video_comments,从 Dataset 复制 reply_count > 0 行里的 aweme_id + comment_id。 |
get_user_info | sec_user_id 或 profile_url 至少填一个 | 无 | 获取博主信息;两者都填时优先使用 profile_url。 |
list_user_videos | sec_user_id 或 profile_url 至少填一个 | page_token, max_items, auto_paginate | 获取博主作品列表;两者都填时优先使用 profile_url。 |
list_user_series | sec_user_id 或 profile_url 至少填一个 | page_token, max_items, auto_paginate | 获取博主合集/短剧列表;两者都填时优先使用 profile_url。 |
字段填写建议 / Input tips
url: 推荐直接粘贴抖音作品链接、短链接或分享文案,适用于get_video_detail和get_video_comments。get_video_sub_comments不使用url,请先跑get_video_comments再复制 Dataset 行里的真实aweme_id + comment_id。profile_url: 推荐直接粘贴抖音主页链接、短链接或分享文案,适用于get_user_info、list_user_videos和list_user_series。aweme_id: 只填真实作品 ID;如果把作品链接或分享文案误填到aweme_id,Actor 会尽量自动按url处理。get_video_sub_comments例外,它必须使用get_video_commentsDataset 行里的真实aweme_id。sec_user_id: 只填真实sec_user_id/author_sec_user_id。不要填昵称、主页名称或抖音号;如果只有主页链接或分享文案,请填profile_url。comment_id: 只填get_video_commentsDataset row 里的comment_id。请选择reply_count > 0的一级评论行,不要填评论内容、昵称或其它文本。
如果用户把作品链接填到博主类 operation、把主页链接填到作品类 operation,或在 get_video_sub_comments 的 aweme_id 里粘贴作品链接/分享文案,Actor 会跳过 SocialDataX API 请求并在 OUTPUT 写入中英文 warning 和支持链接,避免因为明显可修正的输入问题直接失败。
输入示例
作品搜索:
{"operation": "search_videos","keyword": "露营","sort_type": "general","publish_time_range": "all","duration_range": "all","content_type": "all","max_items": 50,"auto_paginate": true}
热榜:
{"operation": "search_hot_list","max_items": 50}
作品详情:
{"operation": "get_video_detail","url": "https://www.douyin.com/video/7648208200076573925"}
评论列表:
{"operation": "get_video_comments","url": "https://www.douyin.com/video/7648208200076573925","page_token": "","max_items": 50,"auto_paginate": true}
评论回复:
{"operation": "get_video_sub_comments","aweme_id": "7648208200076573925","comment_id": "7648330123242324788","page_token": "","max_items": 50,"auto_paginate": true}
comment_id 来自 get_video_comments 的 Dataset 结果。选择 reply_count > 0 的一级评论行,复制该行的 aweme_id 和 comment_id。
博主信息:
{"operation": "get_user_info","profile_url": "https://www.douyin.com/user/MS4wLjABAAAAVbcQXT1UykaJ9ceFzkeTICuowUGwD57JWzQTd5UjN2A"}
博主作品列表:
{"operation": "list_user_videos","profile_url": "https://www.douyin.com/user/MS4wLjABAAAAVbcQXT1UykaJ9ceFzkeTICuowUGwD57JWzQTd5UjN2A","page_token": "","max_items": 50,"auto_paginate": true}
博主合集/短剧列表:
{"operation": "list_user_series","profile_url": "https://www.douyin.com/user/MS4wLjABAAAAeTw694TE8HsvvitqbV3ot9pqHh6n6MThBKz2pECOOn4","page_token": "","max_items": 50,"auto_paginate": true}
max_items 默认 50,最大 1000。auto_paginate=false 时只请求当前 page_token。热榜不需要分页参数,Actor 会请求一次,并按 max_items 限制写入 Dataset 的热榜条目数。
如果用户在 Apify run options 里设置了更低的 paid Dataset item 上限,Actor 会把列表类 max_items 自动裁剪到该上限,避免超预算请求过多页面。
如果该上限为 0,Actor 会直接结束并在 OUTPUT 写入 warning,不会请求 SocialDataX API。
Apify 计划要求
持续使用需要 Apify paid plan。Apify free plan 用户有 5 次 SocialDataX API request 试用额度;每次请求一个接口页面计 1 次,auto_paginate=true 时每翻一页都会计入一次。试用额度用完后,请升级 Apify 计划继续使用。
Ongoing use requires an Apify paid plan. Free-plan users get a 5-request SocialDataX API trial. Each requested page counts as one request, so auto_paginate=true can consume multiple requests in one run.
输出
Actor 会把结果写入 Apify Dataset,适合 JSON、CSV、Excel / XLSX、JSONL 等格式导出。
列表类接口会为 items[] 或 hot_items[] 中的每个元素写入一条扁平 dataset row:
{"operation": "get_video_comments","item_index": 1,"query_aweme_id": "7648208200076573925","query_page_token": "","query_max_items": 50,"query_auto_paginate": true,"aweme_id": "7648208200076573925","comment_id": "7648330123242324788","content": "这套露营装备清单很实用。","reply_count": 8,"author_sec_user_id": "MS4wLjABAAAALynj49NNn56hWtVWVcPsfDfNnpMSC-LwECb-ChhQd4lRlQwduE3zeDvy4aj3YTyF","author_name": "露营爱好者","page_request_index": 1,"page_item_count": 20,"page_next_page_token": "next-token","page_has_more": true}
详情类接口会写入一条 dataset row。author、video、music 等常见对象会展开为 author_*、video_*、music_* 字段;图片和数组字段保留 JSON 值。
如果某一页 items 为空但仍有分页信息,且本次 run 没有继续拿到后续实际 item,Actor 会写入一条 empty_page=true 的 summary row,避免丢失 next_page_token。如果自动翻页后拿到了后续实际 item,中间空页不会写入 Dataset row,也不会占用 max_items。如果空页已经没有下一页,则不会写入 Dataset row。
如果 run 失败,OUTPUT 会保留一条轻量失败摘要,方便在 Apify 控制台里直接看到请求次数、状态码和简要错误信息。
Apify API 调用
同步运行并直接获取 Dataset items:
curl -X POST "https://api.apify.com/v2/acts/socialdatax~socialdatax-douyin-data-api/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"operation": "search_videos","keyword": "露营","max_items": 50,"auto_paginate": true}'
Python client 示例:
from apify_client import ApifyClientclient = ApifyClient("<APIFY_TOKEN>")run = client.actor("socialdatax/socialdatax-douyin-data-api").call(run_input={"operation": "search_videos","keyword": "露营","max_items": 50,"auto_paginate": True,})items = client.dataset(run["defaultDatasetId"]).list_items().items
费用
Apify 用户按 Actor 页面展示的 Apify 价格和用量计费,不需要购买或配置 SocialDataX API Key。