Harness 設定
YouTube Subtitling API
任意の言語と timestamp パラメータで YouTube subtitles を取得します。
GET
/v2/youtube/subtitling認証
Bearer API key
Content type
不要
レート制限
endpoint ごとの制限が適用される場合があります。
YouTube Subtitling API は YouTube video の structured subtitle data を取得し、Agent、content analysis、education products、search indexes、summary/translation workflows で video text を使えるようにします。
Endpoint
GET https://openapi.felo.ai/v2/youtube/subtitling認証
Authorization: Bearer YOUR_API_KEYQuery Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
video_code | string | はい | - | YouTube video ID。例: dQw4w9WgXcQ |
language | string | いいえ | - | 字幕の language code。例: en or zh-CN; 省略すると下流サービスが利用可能な言語を選択します |
with_time | boolean | いいえ | false | 返すかどうか: start and duration 各字幕 item に対して |
レスポンス Fields
| フィールド | 型 | 説明 |
|---|---|---|
data.title | string | YouTube video タイトル |
data.contents | array | Subtitle items |
data.contents[].start | number | 字幕開始時間(秒) |
data.contents[].duration | number | 字幕長(秒) |
data.contents[].text | string | Subtitle text |
Example
curl -X GET "https://openapi.felo.ai/v2/youtube/subtitling?video_code=dQw4w9WgXcQ&language=en&with_time=true" \
-H "Authorization: Bearer YOUR_API_KEY"ユースケース
- Let an Agent understand a YouTube video before answering questions.
- video content の検索可能なテキスト index を作成します。
- 要約や翻訳 workflow の元テキストを準備します。
- Map notes, quotes, or summaries back to timestamps.
注記
- This API does not download video or audio, and it only returns existing subtitles.
- Some videos may not have subtitles or the requested language.
- If
languageis omitted, subtitle selection depends on downstream availability.
Error Responses
| HTTP Status | Error Code | 説明 | 推奨対応 |
|---|---|---|---|
| 400 | YOUTUBE_SUBTITLING_FAILED | validation failed, video does not exist, subtitles unavailable, or downstream client-side error | Check video_code, subtitle availability, and language |
| 401 | INVALID_API_KEY | API key missing, invalid, or revoked | Verify API key and authorization header |
| 500 | YOUTUBE_SUBTITLING_FAILED | 内部サービスエラー | Retry; contact support if it persists |
| 502 | YOUTUBE_SUBTITLING_FAILED | Downstream subtitle service failed or unavailable | 後でもう一度試してください |