Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す

YouTube Video Transcript

APIドキュメント
https://api.sandbase.ai/v1/api/youtube/video-transcript

Fetch the transcript/captions of a YouTube video or Short by URL or ID.

料金
$0.0009 からUSD / 回
メソッド
POST
レスポンス
JSON
パラメータ
必須 0 件 · 任意 2 件

プレイグラウンド

入力
YouTube video ID. A Short uses the same ID as any other video.
Full YouTube video URL. Shorts (youtube.com/shorts/...), youtu.be, live, and embed URLs all work.
出力準備完了

出力はここに表示されます

入力を完了してから[実行]をクリックしてください。

API README

YouTube Video Transcript API

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.

Use cases

  • Index what a video says so you can search across many videos by spoken words.
  • Feed the transcript text into a summarizer or a question-answering tool.
  • Build subtitles or clickable timestamps from the timed segments.
  • Check whether a video mentions a brand, product, or phrase.

Request

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.

Parameters

NameTypeRequiredDescription
idstringNoYouTube video ID. A Short uses the same ID as any other video.
urlstringNoFull YouTube video URL. Shorts (youtube.com/shorts/...), youtu.be, live, and embed URLs all work.

Example response

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
}

Response fields

FieldMeaning
foundtrue when a transcript was found for the video. A lookup that finds nothing returns found: false.
data.languageLanguage code of the transcript, for example en.
data.transcriptThe full transcript as one string. Each caption line is separated by a newline.
data.segments[].textThe text of one caption line. Music cues such as [♪♪♪] can appear as text.
data.segments[].startSecondsStart time of the segment, in seconds from the beginning of the video.
data.segments[].durationSecondsHow long the segment lasts, in seconds.

Notes

  • Send either 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.
  • The id is the value after v= in a standard watch URL, for example dQw4w9WgXcQ.
  • Use data.transcript for the whole text and data.segments when you need timing.
  • To get video metadata such as title and stats, call YouTube Video Details.

Pricing

Billed at the actual cost of each call, about $0.0009 for the request above. Failed calls are not charged.

さらに探索

関連 APIs

すべての APIs
API価格レスポンス
YouTube1回あたり $0.0009 からJSON
YouTube1回あたり $0.00045 からJSON
YouTube1回あたり $0.0012 からJSON
YouTube1回あたり $0.0012 からJSON
YouTube1回あたり $0.0012 からJSON
YouTube$0.014286 / 回JSON

ガイド:Best YouTube API in 2026: Pricing Compared

質問

FAQ

YouTube Video Transcript API はどのように使いますか?

Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/youtube/video-transcript に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

YouTube Video Transcript API の料金はいくらですか?

1回あたり $0.0009 から、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。

YouTube Video Transcript API はどのパラメータを受け付けますか?

必須パラメータはありません。 任意: id (string) と url (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。

YouTube Video Transcript API は何を返しますか?

同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。

YouTube の開発者アカウントまたは API key は必要ですか?

いいえ。YouTube Video Transcript は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。YouTube の API アクセスを別途申請する必要はありません。