TikTok 视频转录文本(完整版) API
用 AnyAPI 自有的语音转文字转录 TikTok 视频中的语音:带时间的句子级片段、说话人标签、检测到的语言,以及可选的逐词时间,适用于 TikTok 没有发布字幕轨的视频,以及字幕轨识别错词的视频。AnyAPI 会下载视频并用 MAI-Transcribe-2 处理音频,而不是读取 TikTok 写好的任何内容,因此它能处理非英语语音,也能听准原生字幕听错的词。结果还包含视频的 ID、URL、创作者用户名和封面图。开启 hostVideo 还能拿到托管链接上的 MP4,不必担心 TikTok 带签名的短期 CDN URL 过期。如果你只需要 TikTok 自己发布的内容,并希望价格只有十分之一,请用 tiktok.video_transcript。
试一试
发出你的第一个请求
{
"data": {
"bytes": 42,
"durationSeconds": 12.5,
"expiresUtc": 12.5,
"hostedUrl": "https://example.com/page",
"id": "a1b2c3d4",
"language": "en",
"ownerUsername": "alex_rivera",
"segments": [
{
"endSeconds": 180,
"language": "en",
"speaker": "example",
"startSeconds": 180,
"text": "A short example description of this item.",
"words": [
{
"endSeconds": 180,
"startSeconds": 180,
"text": "A short example description of this item."
}
]
}
],
"source": "audio_asr",
"thumbnailUrl": "https://example.com/image.jpg",
"transcript": "example",
"url": "https://example.com/page"
},
"found": true,
"reason": "not_found"
}interface TiktokVideoTranscriptFullResponse {
data: {
bytes?: number;
durationSeconds?: number;
expiresUtc?: number;
hostedUrl?: string;
id?: string;
language?: string;
ownerUsername?: string;
segments?: {
endSeconds: number;
language?: string;
speaker?: string;
startSeconds: number;
text: string;
words?: {
endSeconds?: number;
startSeconds?: number;
text: string;
}[];
}[];
source: "audio_asr" | "transcript_unavailable";
thumbnailUrl?: string;
transcript: string;
url?: string;
} | null;
found: boolean;
reason?: "not_found";
}完整的参数与响应参考:这个接口的每个字段、类型和示例。
参考
请求、响应与价格
最近验证于 2026-09-29 · 可用率和延迟按 30d 统计curl -X POST https://api.getanyapi.com/v1/run/tiktok.video_transcript_full \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.tiktok.com/@thatdudecancook/video/7649086431641521421"}'| 字段 | 类型 | 示例值 |
|---|---|---|
| 请求体 | ||
| url | string | "https://www.tiktok.com/@thatdudecancook/video/7649086431641521421"TikTok 视频 URL(例如 "https://www.tiktok.com/@user/video/1234567890")。 |
| hostVideo | boolean | 同时存储视频,并返回一个无需 TikTok 签名 CDN URL 即可播放的托管 MP4 链接。在转录费用之外作为附加项扣费。 |
| wordTimestamps | boolean | 在每个片段内返回逐词时间。词只带时间;识别器给短语而不是单词打分,所以没有逐词置信度可返回。 |
| 响应 | ||
| data | object | |
| data.bytes | integer | Size of the hosted MP4 in bytes. |
| data.durationSeconds | number | Video duration in seconds. |
| data.expiresUtc | number | When the hosted link stops working. UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.hostedUrl | string | Hosted MP4 link, returned only when the request set hostVideo. It plays without TikTok's signed CDN URL and without any cookie, and it stops working at expiresUtc. |
| data.id | string | TikTok video id. |
| data.language | string | Detected spoken language of the audio (BCP-47 style code, e.g. "en"). |
| data.ownerUsername | string | Creator handle, without the leading @. |
| data.segments | object[] | Timed transcript segments in playback order, one per sentence, so a segment locates a specific line in the video rather than a whole speaker turn. Populated whenever the provider has data for the entity. |
| data.segments[].endSeconds | number | Segment end offset in seconds, taken from the last word it contains. |
| data.segments[].language | string | Detected language for this segment. |
| data.segments[].speaker | string | Speaker label for this segment, stable within one response and meaningless across responses. Telling voices apart is a guess, not an identification, and the label is not a name. |
| data.segments[].startSeconds | number | Segment start offset in seconds, taken from the first word it contains. |
| data.segments[].text | string | Text of this segment. |
| data.segments[].words | object[] | Per-word timings for this segment, returned only when the request set wordTimestamps. Words carry no confidence score: the recognizer scores a phrase rather than a word. |
| data.segments[].words[].endSeconds | number | Word end offset in seconds. |
| data.segments[].words[].startSeconds | number | Word start offset in seconds. |
| data.segments[].words[].text | string | The recognized word, in display form with its own punctuation. |
| data.source | "audio_asr" | "transcript_unavailable" | How the text was produced. "audio_asr" means the words come from speech recognition over the video's audio, never from a caption track TikTok published - for TikTok's own captions, use tiktok.video_transcript. "transcript_unavailable" means recognition did not complete for this video, so the transcript is empty for that reason rather than because the video has no speech in it; the rest of the record is still what we resolved, and no audio time is charged. Populated whenever the provider has data for the entity. |
| data.thumbnailUrl | string | Cover image for the video. A signed, short-lived TikTok CDN URL, often served as HEIC rather than JPEG, so fetch it promptly and transcode if you need broad browser support. |
| data.transcript | string | Full spoken-word transcript, recognized from the video's audio track. Populated whenever the provider has data for the entity. |
| data.url | string | Canonical URL of the video this transcript came from. |
| found | boolean | |
| reason | "not_found" | Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost. |
| 价格 | ||
| 每次请求价格(上限) | USD | US$0.095 |
| 价格(/千分钟音频) | USD | US$5.94 |
常见问题
关于 TikTok 视频转录文本(完整版) API
AnyAPI 的 TikTok 视频转录文本(完整版) API 只需一次 POST 请求 /v1/run/tiktok.video_transcript_full,就以统一格式的 JSON 返回 TikTok 数据。用 AnyAPI 自有的语音转文字转录 TikTok 视频中的语音:带时间的句子级片段、说话人标签、检测到的语言,以及可选的逐词时间,适用于 TikTok 没有发布字幕轨的视频,以及字幕轨识别错词的视频。AnyAPI 会下载视频并用 MAI-Transcribe-2 处理音频,而不是读取 TikTok 写好的任何内容,因此它能处理非英语语音,也能听准原生字幕听错的词。结果还包含视频的 ID、URL、创作者用户名和封面图。开启 hostVideo 还能拿到托管链接上的 MP4,不必担心 TikTok 带签名的短期 CDN URL 过期。如果你只需要 TikTok 自己发布的内容,并希望价格只有十分之一,请用 tiktok.video_transcript。无论哪个数据源提供服务,AnyAPI 都返回同一套统一的 schema。费用:每千分钟音频 US$5.94,单次请求最多 US$0.095,以美元计价,无需订阅,也没有每月最低消费。过去 30 天,通过 AnyAPI 发起的 TikTok 视频转录文本(完整版) API 调用中有 90.1% 成功,响应时间中位数为 4.7 秒,共测量 172 次调用。