idstring
YouTube video ID. A Short uses the same ID as any other video.
https://api.sandbase.ai/v1/api/youtube/video-transcriptFetch the transcript/captions of a YouTube video or Short by URL or ID.
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
Returns the transcript of a YouTube video or Short as plain text and as timed segments. You pass either a video url or a video id.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/video-transcript" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | YouTube video ID. A Short uses the same ID as any other video. |
url | string | No | Full YouTube video URL. Shorts (youtube.com/shorts/...), youtu.be, live, and embed URLs all work. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"language": "en",
"segments": [
{
"durationSeconds": 1.68,
"startSeconds": 1.36,
"text": "[♪♪♪]"
}
],
"transcript": "[♪♪♪]\n♪ We're no strangers to love ♪\n♪ You know the rules and so do I ♪\n♪ A full…"
},
"found": true
}
| Field | Meaning |
|---|---|
found | true when a transcript was found for the video. A lookup that finds nothing returns found: false. |
data.language | Language code of the transcript, for example en. |
data.transcript | The full transcript as one string. Each caption line is separated by a newline. |
data.segments[].text | The text of one caption line. Music cues such as [♪♪♪] can appear as text. |
data.segments[].startSeconds | Start time of the segment, in seconds from the beginning of the video. |
data.segments[].durationSeconds | How long the segment lasts, in seconds. |
url or id. A Short uses the same ID as any other video, and youtube.com/shorts/..., youtu.be, live, and embed URLs all work for url.id is the value after v= in a standard watch URL, for example dQw4w9WgXcQ.data.transcript for the whole text and data.segments when you need timing.Billed at the actual cost of each call, about $0.0009 for the request above. Failed calls are not charged.
Geliştirmeye başlayın
Birleşik kimlik doğrulama ve kullanım takibi sunan Platform API uç noktası.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/video-transcript" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}'SandBase API anahtarınızı sunucu ortamınıza ayarlayın. İstekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarınızı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın.
idstringYouTube video ID. A Short uses the same ID as any other video.
urlstringFull YouTube video URL. Shorts (youtube.com/shorts/...), youtu.be, live, and embed URLs all work.
Bu API için kaydedilmiş örnek yanıt; görüntülerken canlı istek yapılmaz.
Yayınlanmış bir kaydedilmiş yanıt yok. Yanıtını incelemek için API'yi Playground'da çalıştırın.
Daha fazlasını keşfedin
| API | Fiyat | Yanıt |
|---|---|---|
YouTube Video TranscriptBu API YouTube | Kullanım başına $0.0009'den itibaren | JSON |
YouTube | Kullanım başına $0.00045'den itibaren | JSON |
YouTube | Kullanım başına $0.0012'den itibaren | JSON |
YouTube | Kullanım başına $0.0012'den itibaren | JSON |
YouTube | Kullanım başına $0.0012'den itibaren | JSON |
YouTube | $0.014286 çağrı başına | JSON |
Kılavuzlar:Best YouTube API in 2026: Pricing Compared
Sorular
SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/youtube/video-transcript adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
çağrı başına $0.0009'dan başlayan, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.
Gerekli parametre yoktur. İsteğe bağlı: id (string) ve url (string). Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.
Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.
Hayır. YouTube Video Transcript, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. YouTube API erişimi için ayrıca başvuru yapmanız gerekmez.