subtitle_count와 automatic_caption_count가 모두 0이면 자막이 없는 영상이니 자막 다운로드를 요청하지 마세요. 같은 언어가 수동·자동 생성 자막에 모두 있으면 자막 다운로드의 type으로 어느 쪽을 받을지 고릅니다(기본은 수동 자막 우선).
{
"data": {
"video_id": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
"original_language": "en",
"subtitle_count": 2,
"automatic_caption_count": 2,
"subtitles": [
{ "lang": "en", "name": "English", "auto": false, "formats": ["vtt", "srv3"] },
{ "lang": "ja", "name": "Japanese", "auto": false, "formats": ["vtt", "srv3"] }
],
"automatic_captions": [
{ "lang": "en-orig", "name": "English (Original)", "auto": true, "formats": ["vtt"], "translated": false },
{ "lang": "ko", "name": "Korean", "auto": true, "formats": ["vtt"], "translated": true }
],
"success": 1
},
"api": { "success": true, "cost": 20, "ms": 3700, "pl_id": 1595635 }
}
예시는 길이를 줄이려고 자동 생성 자막을 두 개만 적었습니다.