API para YouTube: Transcrição de vídeo (versão completa)
Obtenha a transcrição de um vídeo ou Short do YouTube com segmentos com tempo e sua procedência: se o texto vem de legendas escritas pelo criador ou de reconhecimento automático de fala.
Rede de provedores
Provedores ordenados por tráfego
Teste
Faça sua primeira requisição
{
"data": {
"authorId": "Alex Rivera",
"authorUrl": "https://example.com/page",
"category": "general",
"channel": "example",
"createdUtc": 12.5,
"description": "A short example description of this item.",
"durationSeconds": 12.5,
"image": "https://example.com/image.jpg",
"isAiGenerated": true,
"isAutoGenerated": true,
"keywords": [
"a1b2c3d4"
],
"language": "en",
"likes": 12500,
"segments": [
{
"endSeconds": 180,
"startSeconds": 180,
"text": "A short example description of this item."
}
],
"title": "Example title",
"transcript": "example",
"url": "https://example.com/page",
"videoId": "a1b2c3d4",
"views": 12500
},
"found": true,
"reason": "not_found"
}interface YoutubeVideoTranscriptFullResponse {
data: {
authorId?: string;
authorUrl?: string;
category?: string;
channel?: string;
createdUtc?: number;
description?: string;
durationSeconds?: number;
image?: string;
isAiGenerated?: boolean | null;
isAutoGenerated: boolean;
keywords?: string[];
language: string;
likes?: number;
segments?: {
endSeconds: number;
startSeconds: number;
text: string;
}[];
title?: string;
transcript: string;
url?: string;
videoId?: string;
views?: number;
} | null;
found: boolean;
reason?: "not_found";
}Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.
Referência
Requisição, resposta e preço
Última verificação em 2026-09-29 · disponibilidade e latência medidas em 30dcurl -X POST https://api.getanyapi.com/v1/run/youtube.video_transcript_full \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'| Campo | Tipo | Valor de exemplo |
|---|---|---|
| Corpo da requisição | ||
| url | string | "https://www.youtube.com/watch?v=dQw4w9WgXcQ"URL do vídeo ou Short do YouTube (ex.: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" ou "https://www.youtube.com/shorts/Fir1x9cw2vg"). |
| captionKind | enum | Qual faixa de legenda aceitar: "manual" só legendas escritas pelo criador, "automatic" só o reconhecimento de fala do YouTube, "any" a que existir. |
| language | string | Código do idioma preferido da legenda (ex.: "en", "es"). O padrão é inglês. Se o vídeo não tiver legendas nesse idioma, você recebe a transcrição em outro idioma disponível no vídeo; o campo `language` no resultado indica qual. |
| requireFields | array | Opcional; se omitido, o roteamento não muda e a fonte mais barata atende. Informe os campos de saída que esta requisição precisa poder retornar, por exemplo `isAiGenerated`, e ela só será atendida por uma fonte que retorne todos eles. Os campos que você não informar continuam sendo retornados sempre que a fonte que atende os tiver. Isso pode aumentar o seu preço: quando a fonte mais barata não consegue retornar um campo informado, uma fonte mais cara atende, e você recebe a cotação e é cobrado pelo preço dela. Um campo informado ainda pode vir ausente em uma transcrição que realmente não o tenha. Se você informar uma combinação de campos que nenhuma fonte retorna sozinha, a requisição é recusada como entrada inválida, sem cobrança. |
| Resposta | ||
| data | object | |
| data.authorId | string | YouTube channel ID of the publishing channel. |
| data.authorUrl | string | Canonical URL of the publishing channel, tracking query parameters stripped. |
| data.category | string | YouTube category the video is filed under, for example "Music". |
| data.channel | string | Channel name that published the video. |
| data.createdUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.description | string | Full video description text. |
| data.durationSeconds | number | Video duration in seconds. |
| data.image | string | URL of the video thumbnail image. |
| data.isAiGeneratedpode ser exigido | boolean | True when the words were recognized from the audio by the serving lane rather than read from any YouTube caption track, or null when the serving source does not say. |
| data.isAutoGenerated | boolean | True when YouTube generated the caption track by speech recognition rather than the creator supplying it. Automatic captions carry recognition errors, especially on names and jargon. Populated whenever the provider has data for the entity. |
| data.keywords | string[] | Keywords the uploader tagged the video with. |
| data.language | string | Caption language code (e.g. "en"). Populated whenever the provider has data for the entity. |
| data.likes | integer | Number of likes. |
| data.segments | object[] | Timed transcript segments in playback order. Populated whenever the provider has data for the entity. |
| data.segments[].endSeconds | number | Segment end offset in seconds. |
| data.segments[].startSeconds | number | Segment start offset in seconds. |
| data.segments[].text | string | Text of this transcript segment. |
| data.title | string | Video title. |
| data.transcript | string | Full transcript text, segments joined in playback order. Populated whenever the provider has data for the entity. |
| data.url | string | Watch URL of the video. |
| data.videoId | string | Unique identifier of the video. |
| data.views | integer | Number of views. |
| 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. |
| Preço | ||
| Preço por requisição | USD | US$ 0,001 |
| Preço /mil req. | USD | US$ 1,00 |
Dúvidas frequentes
Sobre o endpoint Transcrição de vídeo (versão completa) da API para YouTube
O endpoint Transcrição de vídeo (versão completa) da AnyAPI para YouTube retorna dados de YouTube em JSON normalizado com uma chamada POST para /v1/run/youtube.video_transcript_full. Obtenha a transcrição de um vídeo ou Short do YouTube com segmentos com tempo e sua procedência: se o texto vem de legendas escritas pelo criador ou de reconhecimento automático de fala. A AnyAPI distribui cada requisição entre 2 fontes, com failover automático quando uma falha. Custa a partir de US$ 1 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 100,0% das chamadas ao endpoint Transcrição de vídeo (versão completa) da API para YouTube feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 7,4 segundos, em 1.063 chamadas medidas.