Sand AISand AI MAGI-2MAGI-2 अब SandBase पर है: 1080p वीडियो, नेटीव ऑडियो के साथअभी आज़माएँ

YouTube Video Captions

API दस्तावेज़
https://api.sandbase.ai/v1/api/youtube/video-captions

Get available caption tracks for a YouTube video or request captions in SRT, XML, JSON3, or plain-text format. Use it to support transcription, accessibility, localization, or text analysis.

मूल्य
$0.014286USD / कॉल
मेथड
POST
प्रतिक्रिया
JSON
पैरामीटर
1 आवश्यक · 2 वैकल्पिक

प्लेग्राउंड

इनपुट
The unique identifier for a YouTube video.
Caption language code, such as en, zh-Hans, or a.en. Leave it empty to retrieve available caption tracks.
Caption output format.
आउटपुटतैयार

आपका आउटपुट यहाँ दिखाई देगा

इनपुट पूरा करें, फिर Run पर क्लिक करें।

API README

YouTube Video Captions API

This API returns the caption tracks available for a YouTube video. It needs a videoId. If you also pass languageCode, it returns the captions for that language in the format you set with format.

Use cases

  • List which caption languages a video offers before you decide what to download.
  • Check whether a video has English captions before you queue it for transcription.
  • Build a language picker for a video player or localization tool from the track list.
  • Collect caption text in srt, xml, json3, or txt format for text analysis.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/video-captions" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"videoId": "dQw4w9WgXcQ"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
videoIdstringYesThe unique identifier for a YouTube video.
formatstringNoCaption output format.
languageCodestringNoCaption language code, such as en, zh-Hans, or a.en. Leave it empty to retrieve available caption tracks.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "captions": [
    {
      "language_code": "en",
      "language_name": "English"
    }
  ],
  "video_id": "dQw4w9WgXcQ"
}

Response fields

FieldMeaning
video_idThe ID of the video the caption tracks belong to. It matches the videoId you sent.
captions[]One entry for each caption track available for the video.
captions[].language_codeThe code for the track language, such as en, de, or ja. Pass this value as languageCode to request the captions for that track.
captions[].language_nameThe language name for the track in English, such as English or German.

Notes

Pricing

$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

और जानें

संबंधित APIs

सभी APIs
APIकीमतप्रतिक्रिया
YouTube$0.014286 प्रति कॉलJSON
YouTube$0.00045 प्रति कॉल सेJSON
YouTube$0.0012 प्रति कॉल सेJSON
YouTube$0.0012 प्रति कॉल सेJSON
YouTube$0.0012 प्रति कॉल सेJSON
YouTube$0.014286 प्रति कॉलJSON

गाइड्स:Best YouTube API in 2026: Pricing Compared

प्रश्न

FAQ

YouTube Video Captions API का उपयोग कैसे करें?

https://api.sandbase.ai/v1/api/youtube/video-captions पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।

YouTube Video Captions API की लागत कितनी है?

$0.014286 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।

YouTube Video Captions API कौन-से parameters स्वीकार करती है?

आवश्यक: videoId (string)। वैकल्पिक: languageCode (string) और format (srt, xml, json3, txt में से एक)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।

YouTube Video Captions API क्या लौटाती है?

एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।

क्या मुझे एक YouTube developer account या API key चाहिए?

नहीं। YouTube Video Captions SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से YouTube API access के लिए आवेदन करने की आवश्यकता नहीं है।