detail
POST /v1/detail 是“详情”动作:一条内容的正文和数据。目前在 18 个平台上开放(TikTok、Instagram、X、Reddit、YouTube、Facebook 等),平台是请求里的一个参数。每次调用 1 到 12 积分,因平台而异;失败的调用不扣。
POST
https://socialtoai.app/v1/detail请求
请求体是 JSON。下面这几项每个动作都一样,其余的参数因平台而异,见后文。
| 名称 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
platform | string | 请求体 | 是 | 要读的平台,取这个动作已开放的平台之一。 |
limit | integer | 请求体 | 否 | search、trending、comments、user_posts 才有:想要多少条。一次调用里一页接一页地取,直到够数或没有更多;每页按一次调用计费,用不上的页不扣。 |
max_cost_credits | integer | 请求体 | 否 | 这次调用最多花多少积分。超出时免费拒绝,并在返回里给出报价。 |
Idempotency-Key | string | 请求头 | 否 | 1 到 255 个可见 ASCII 字符。同一个键加同样的参数会返回第一次的结果,不会重复扣费。 |
平台与积分
每个平台收的参数不同。平台自己的页面上有完整的参数表、字段表和可以改的请求。
| 平台 | 价格键 | 积分 | 必填 | 可选 | 每页 |
|---|---|---|---|---|---|
| TikTok | tiktok.detail | 2 | id、url 里给一个 | – | – |
instagram.detail | 2 | id、url 里给一个 | – | – | |
| X | x.detail | 1 | id、url 里给一个 | – | – |
reddit.detail | 2 | id、url 里给一个 | – | – | |
| YouTube | youtube.detail | 2 | id、url 里给一个 | – | – |
facebook.detail | 2 | url | – | – | |
linkedin.detail | 2 | id、url 里给一个 | – | – | |
| Threads | threads.detail | 2 | id、url 里给一个 | – | – |
| Telegram | telegram.detail | 2 | id、url 里给一个 | – | – |
pinterest.detail | 2 | id、url 里给一个 | – | – | |
| 小红书 | xiaohongshu.detail | 12 | id、url 里给一个 | – | – |
| 抖音 | douyin.detail | 2 | id、url 里给一个 | – | – |
| 微博 | weibo.detail | 2 | id、url 里给一个 | – | – |
| 公众号 | wechat.detail | 12 | url | – | – |
| B 站 | bilibili.detail | 2 | id、url 里给一个 | – | – |
| 知乎 | zhihu.detail | 2 | id、url 里给一个 | – | – |
| 快手 | kuaishou.detail | 2 | id、url 里给一个 | – | – |
| 视频号 | wechat_channels.detail | 12 | id、url、export_id 里给一个 | – | – |
有些平台的这个动作还有另一种取值,由某个参数选中,单独计价:
| 平台 | 价格键 | 积分 | 由什么选中 |
|---|---|---|---|
| TikTok | tiktok.detail:transcript | 2 | include=transcript |
instagram.detail:transcript | 2 | include=transcript | |
| X | x.detail:transcript | 2 | include=transcript |
reddit.detail:transcript | 2 | include=transcript | |
| YouTube | youtube.detail:transcript | 2 | include=transcript |
linkedin.detail:transcript | 2 | include=transcript | |
| 知乎 | zhihu.detail:question | 2 | type=question |
| 知乎 | zhihu.detail:article | 2 | type=article |
| 知乎 | zhihu.detail:pin | 2 | type=pin |
参数
| 名称 | 类型 | 说明 | 哪些平台收 |
|---|---|---|---|
id | string | 视频编号,一串数字 | TikTok、Instagram、X、Reddit、YouTube、LinkedIn、Threads、Telegram、Pinterest、小红书、抖音、微博、B 站、知乎、快手和视频号 |
url | string | 视频链接,原样粘贴即可:网页链接 https://www.tiktok.com/@账号/video/…、App 复制出来的 www.tiktok.com/t/… 或 vm.tiktok.com 短链接,或含这些链接的整段分享文字。短链接由我们打开一次,看它跳到哪条视频 | 全部 |
lang | string | 要哪种语言的字幕,两个字母的语言代码(如 en、es、ja);不写时给平台默认的那种。视频没有这种语言的字幕时按没有字幕处理 | TikTok和YouTube |
export_id | string | search (platform=wechat_channels) 结果里的 id,export/ 开头。会过期,搜到后尽快用;返回的 id 是作品的数字编号 | 视频号 |
示例
TikTok:用编号或链接取一条视频:正文、作者、点赞数、评论数、播放或阅读数和发布时间。
curl https://socialtoai.app/v1/detail \ -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "platform": "tiktok", "id": "7665840565958872333" }'import osimport uuidimport requestsresponse = requests.post( "https://socialtoai.app/v1/detail", headers={ "Authorization": f"Bearer {os.environ['SOCIALTOAI_API_KEY']}", # A new key for each request; the same one again retries it without paying twice. "Idempotency-Key": str(uuid.uuid4()), }, json={ "platform": "tiktok", "id": "7665840565958872333", },)print(response.json()){ "request_id": "req_00000000-0000-4000-8000-000000000001", "schema_version": "v1", "fetched_at": "2026-10-12T18:45:36.000Z", "action": "detail", "platform": "tiktok", "status": "ok", "items": [ { "platform": "tiktok", "id": "…", "ref": "…", "approx": [], "extra": {}, "type": "content", "url": "https://example.com/…", "format": "video", "title": null, "text": "…", "published_at": "2026-10-08T13:12:22.000Z", "author": { "id": "…", "username": "…", "name": "…", "verified": null, "followers": 2060936 }, "metrics": { "likes": 67877, "comments": 524, "shares": 2472, "collects": 5331, "views": 449259, "reposts": null }, "images": null, "hashtags": [], "is_pinned": null } ], "unavailable": ["title", "author.verified", "metrics.reposts", "images", "is_pinned"], "warnings": [], "applied_params": { "id": "7665840565958872333" }, "cost_credits": 2, "billing": { "cost_credits": 2, "balance_credits": 98, "today_spend_credits": 2, "daily_limit_credits": null, "daily_remaining_credits": null, "display": "本次 2 积分(约 $0.0067),余额 98 积分(约 $0.33)" }, "replayed": false}示例数据:名字、链接和正文已换成占位符。
返回什么
返回外层结构,items 里是 content、entry:transcript 对象。一次调用返回一个对象。
失败的调用是 0 积分,并说明原因,见错误。
最近更新: