{"agent":{"expose":"search","prompt":"Use Crawl4AI to get captions of a YouTube video."},"also":["subtitles","transcript","video transcript","transcription"],"beta":true,"call":{"aliases":["POST /recipes/youtube-captions"],"method":"POST","path":"/tools/youtube-captions"},"categories":["video"],"cost":{"cases":[{"price":"1.5 to 2 credits","when":"A run"},{"price":"3 credits","when":"From the second source"},{"price":"free","when":"A run with no row"}],"rule":"1.5 to 2 credits · 3 credits from the second source · a run with no row is free","text":"1.5 to 2 cr"},"description":"One YouTube video's captions (its transcript) in one language, as one row: the whole text, the timed lines, whether they are auto-generated, and every caption language the video has. `video` is the watch URL, a youtu.be or shorts link, or the 11-character id; `language` a code such as en, es or pt-BR (default en), or `any` for the default captions. A person's track comes before an auto-generated one. No captions in that language gives no row and a warning listing the languages. 1 to 3 s; when YouTube refuses, a slower second source gives the default captions (billed even when it has none).","docs":"/tools/youtube-captions","essential":false,"essential_order":null,"examples":[{"answer":{"body":{"request_id":"req_…","rows":[{"available_languages":[{"auto":false,"code":"af","name":"Afrikaans"},{"auto":false,"code":"sq","name":"Albanian"},"…"],"is_auto_generated":false,"language":"en","segments":[{"duration_s":2.575,"start_s":27.103,"text":"Good morning. How are you?"},{"duration_s":1.403,"start_s":29.702,"text":"(Audience) Good."},"…"],"text":"Good morning. How are you? (Audience) Good. It's been great, hasn't i…","title":"Do schools kill creativity? | Sir Ken Robinson | TED","url":"https://www.youtube.com/watch?v=iG9CE55wbtY","video_id":"iG9CE55wbtY"}],"took_ms":1000,"tool":"youtube-captions","usage":{"credits":1}},"credits":1,"more":0,"rows":1,"took_ms":1000},"input":{"language":"en","video":"dQw4w9WgXcQ"},"label":"dQw4w9WgXcQ, en"},{"input":{"language":"en","video":"https://www.youtube.com/watch?v=iG9CE55wbtY"},"label":"https://www.youtube.com/watch?v=iG9CE55wbtY, en"}],"id":"youtube-captions","input_schema":{"additionalProperties":true,"properties":{"language":{"default":"en","description":"`language` a code such as en, es or pt-BR (default en), or `any` for the default captions.","type":"string"},"video":{"description":"`video` is the watch URL, a youtu.be or shorts link, or the 11-character id","type":"string"}},"required":["video"],"type":"object"},"inputs":[{"example":"dQw4w9WgXcQ","help":"`video` is the watch URL, a youtu.be or shorts link, or the 11-character id","name":"video","required":true,"type":"string"},{"advanced":true,"default":"en","example":"en","help":"`language` a code such as en, es or pt-BR (default en), or `any` for the default captions.","name":"language","type":"string"}],"kind":"sites","name":{"lead":"YouTube","rest":"captions"},"output":{"fields":[{"meaning":"The 11-character id of the video.","name":"video_id","type":"string"},{"meaning":"The video's title as YouTube shows it.","name":"title","type":"string"},{"meaning":"The language code of the captions in the row (en, es, pt-BR), as YouTube names the track; null when the row came from the second source, which gives the video's default captions without a code.","name":"language","type":"string"},{"meaning":"true when YouTube made the captions by speech recognition, false when a person wrote or uploaded them; null on the second source.","name":"is_auto_generated","type":"boolean"},{"meaning":"Every caption track the video has, {code, name, auto}: auto is true for an auto-generated track. On the second source code is null (it names languages only).","name":"available_languages","type":"object[]"},{"meaning":"The whole transcript as plain text: every line in order, joined by spaces, line breaks removed.","name":"text","type":"string"},{"meaning":"The timed lines in order, {start_s, duration_s, text}, seconds as numbers (27.103). On an auto-generated track a line's duration can run past the next line's start: YouTube shows two lines at once.","name":"segments","type":"object[]"},{"meaning":"The video's watch URL.","name":"url","type":"string"}],"row_is":"","view":"rows"},"related":[{"id":"youtube-channel","why":"Handle, title, description, subscribers, subscribers text, videos"},{"id":"youtube-channel-videos","why":"Title, published, views, description, thumbnail"},{"id":"instagram-reels","why":"Plays, likes, comments, thumbnail"}],"run":"both","source":"youtube","status":"verified","summary":"Title, language, available languages, text, segments","synonyms":["captions","video","youtube","subtitles","transcript","video transcript","transcription","closed captions","cc","what is said in a video","text of a video","spoken words","subs","summarize a video","video to text","speech text"],"typical":"37 s","version":1,"visibility":"public"}