# YouTube 字幕ライブ（Advanced）

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/serp/youtube/video_subtitles/live/advanced`

**Tags:** DataForSEO

YouTube 上の 1 本の動画の字幕トラックを同期的に返します。`keyword`、`type`、`se_domain`、`location_code`、`language_code`、`check_url`、`datetime`、`spell`、`refinement_chips`、`item_types`、`items_count`、`items` を返します。`advanced` が既定の選択肢です。ランキング一覧だけが必要な場合は `regular`、パーサーが破棄したものを確認したい場合だけ `html` を使います。DataForSEO のエンベロープに包まれます。データは `tasks[0].result`、結果は `tasks[0].status_code` にあり、拒否されたリクエストでも HTTP 200 が返ります。

### 料金の参考情報

- 計量方式：報告されたレスポンスコスト。
- 参考リクエスト見積もり：USD 0.02。
- 参照用の顧客乗数：1.0。確定済みの顧客金額には再適用しないでください。

参考情報のメタデータであり、アカウントへの見積もり、保証された価格、支出上限ではありません。リソースクレジットは Felo クレジットではありません。最終的な請求は Felo の請求記録に従います。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "video_id": {
            "type": "string",
            "description": "動画の ID\n必須フィールド\n動画 ID は、URL または YouTube Organic 結果の 'youtube_video' 項目で確認できます\n例:\nY8Wu4rSNJms"
          },
          "location_code": {
            "type": [
              "integer",
              "null"
            ],
            "description": "検索エンジンのロケーションコード\nlocation_name を指定しない場合は必須フィールド\nこのフィールドを使用する場合、location_name を指定する必要はありません\n検索エンジンがサポートするロケーションとその location_code の一覧は、https://api.dataforseo.com/v3/serp/youtube/locations に別途リクエストを送信して取得できます\n例:\n2840"
          },
          "language_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "検索エンジンの言語コード\nlanguage_name を指定しない場合は必須フィールド\nこのフィールドを使用する場合、language_name を指定する必要はありません\n検索エンジンがサポートする言語とその language_code の一覧は、https://api.dataforseo.com/v3/serp/youtube/languages に別途リクエストを送信して取得できます\n例:\nen"
          },
          "device": {
            "type": [
              "string",
              "null"
            ],
            "description": "デバイスタイプ\n任意フィールド\n唯一の値: desktop"
          },
          "location_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "検索エンジンのロケーションの完全名\nlocation_code を指定しない場合は必須フィールド\nこのフィールドを使用する場合、location_code を指定する必要はありません\n検索エンジンがサポートするロケーションとその location_name の一覧は、https://api.dataforseo.com/v3/serp/youtube/locations に別途リクエストを送信して取得できます\n例:\nUnited States"
          },
          "language_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "検索エンジンの言語の完全名\nlanguage_code を指定しない場合は必須フィールド\nこのフィールドを使用する場合、language_code を指定する必要はありません\n検索エンジンがサポートする言語とその language_name の一覧は、https://api.dataforseo.com/v3/serp/youtube/languages に別途リクエストを送信して取得できます\n例:\nEnglish"
          },
          "os": {
            "type": [
              "string",
              "null"
            ],
            "description": "デバイスのオペレーティングシステム\n任意フィールド\n次の値から選択します: windows、macos\nデフォルト値: windows"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "ユーザー定義のタスク識別子\n任意フィールド\n文字数上限は 255 です\nこのパラメーターを使ってタスクを識別し、結果と照合できます\n指定した tag の値は、レスポンスの data オブジェクトに含まれます"
          },
          "subtitles_language": {
            "type": [
              "string",
              "null"
            ],
            "description": "元のテキストの言語コード\n言語コードは YouTube Video Info の結果から取得できます"
          },
          "subtitles_translate_language": {
            "type": [
              "string",
              "null"
            ],
            "description": "翻訳されたテキストの言語コード\n可能な値:\n\"az\", \"ay\", \"ak\", \"sq\", \"am\", \"en\", \"ar\", \"hy\", \"as\", \"af\", \"eu\", \"be\", \"bn\", \"my\", \"bg\", \"bs\", \"bho\", \"cy\", \"hu\", \"vi\", \"haw\", \"ht\", \"gl\", \"lg\", \"el\", \"ka\", \"gn\", \"gu\", \"gd\", \"da\", \"fy\", \"zu\", \"iw\", \"ig\", \"yi\", \"id\", \"ga\", \"is\", \"es\", \"it\", \"yo\", \"kk\", \"kn\", \"ca\", \"qu\", \"rw\", \"ky\", \"zh-Hant\", \"zh-Hans\", \"ko\", \"co\", \"xh\", \"ku\", \"km\", \"lo\", \"la\", \"lv\", \"ln\", \"lt\", \"lb\", \"mk\", \"mg\", \"ms\", \"ml\", \"dv\", \"mt\", \"mi\", \"mr\", \"mn\", \"und\", \"de\", \"ne\", \"nl\", \"no\", \"ny\", \"or\", \"om\", \"pa\", \"fa\", \"pl\", \"pt\", \"ps\", \"ro\", \"ru\", \"sm\", \"sa\", \"ceb\", \"nso\", \"sr\", \"si\", \"sd\", \"sk\", \"sl\", \"so\", \"sw\", \"su\", \"tg\", \"th\", \"ta\", \"tt\", \"te\", \"ti\", \"ts\", \"tr\", \"tk\", \"uz\", \"ug\", \"uk\", \"ur\", \"fil\", \"fi\", \"fr\", \"ha\", \"hi\", \"hmn\", \"hr\", \"cs\", \"sv\", \"sn\", \"ee\", \"eo\", \"et\", \"st\", \"jv\", \"ja\", \"kri\""
          }
        },
        "example": [
          {
            "language_code": "en",
            "location_code": 2840,
            "video_id": "Y8Wu4rSNJms"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "language_code": "en",
      "location_code": 2840,
      "video_id": "Y8Wu4rSNJms"
    }
  ]
}
```

## Responses

### 200 — 操作成功

Headers:
- `X-Request-Id` (string) — Felo サポートに問い合わせる際に伝えるリクエスト識別子。

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_SerpYoutubeVideoSubtitlesLiveAdvancedResponseInfo"
    }
  ]
}
```

### 400 — リクエストを処理できませんでした。リクエストパラメータを確認してください。

### 401 — 有効な Felo API キーが必要です。

### 402 — 請求要件が満たされていないため、リクエストを続行できません。

### 403 — このアカウントにはこの操作を行う権限がありません。

### 429 — リクエストまたは支出の上限に達しました。

### 502 — サービスがリクエストを完了できませんでした。

### 503 — API または請求サービスが一時的に利用できません。

### 504 — リクエストの処理中にサービスがタイムアウトしました。

### default — エラーレスポンス。上流のパススルーレスポンスはプロバイダーの形式を使用する場合があります

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "API の現在のバージョン"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "一般的なステータスコード\nレスポンスコードの完全な一覧はこちらです"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "一般的な情報メッセージ\n一般的な情報メッセージの完全な一覧はこちらです"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "合計実行時間（秒）"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "タスクの総コスト（USD）",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 配列内のタスク数",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "エラーで返された tasks 配列内のタスク数",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "タスク識別子\n当社システム内で UUID 形式の一意のタスク識別子"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "タスクのステータスコード\nDataForSEO によって生成され、次の範囲の値になります: 10000-60000\nレスポンスコードの完全な一覧はこちらです"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "タスクの情報メッセージ\n一般的な情報メッセージの完全な一覧はこちらです"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "実行時間（秒）"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "タスクの総コスト（USD）",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "result 配列内の要素数",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL パス"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "POST リクエストで指定したものと同じパラメーターを含みます"
    }
  }
}
```

### Response36Afe1097B20_SerpYoutubeVideoSubtitlesLiveAdvancedResponseInfo

`#/components/schemas/Response36Afe1097B20_SerpYoutubeVideoSubtitlesLiveAdvancedResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_SerpYoutubeVideoSubtitlesLiveAdvancedTaskInfo"
              }
            ]
          },
          "description": "タスクの配列"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_SerpYoutubeVideoSubtitlesLiveAdvancedResultInfo

`#/components/schemas/Response36Afe1097B20_SerpYoutubeVideoSubtitlesLiveAdvancedResultInfo`

```json
{
  "type": "object",
  "properties": {
    "video_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "POST 配列で受信した動画の ID"
    },
    "se_domain": {
      "type": [
        "string",
        "null"
      ],
      "description": "POST 配列の検索エンジンドメイン"
    },
    "location_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "POST 配列の所在地コード"
    },
    "language_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "POST 配列の言語コード"
    },
    "check_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "検索エンジン結果への直接 URL。正確な結果が提供されたことを確認するために使用できます"
    },
    "datetime": {
      "type": [
        "string",
        "null"
      ],
      "description": "結果を受信した日時。UTC 形式：“yyyy-mm-dd hh-mm-ss +00:00”。例：2019-11-15 12:57:46 +00:00"
    },
    "spell": {
      "type": [
        "object",
        "null"
      ],
      "oneOf": [
        {
          "$ref": "#/components/schemas/Response36Afe1097B20_SpellInfo"
        }
      ],
      "description": "検索エンジンの自動修正。検索エンジンが修正されたキーワードの結果を返した場合、検索エンジンによって修正されたキーワードと自動修正のタイプを示します"
    },
    "item_types": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "SERP の検索結果タイプ。SERP で見つかった検索結果のタイプ（items）を含みます。指定可能なアイテム：youtube_subtitles"
    },
    "unsupported_language": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "言語がシステムでサポートされていないかどうかを示します"
    },
    "translate_language": {
      "type": [
        "string",
        "null"
      ],
      "description": "翻訳されたテキストの言語コード"
    },
    "origin_language": {
      "type": [
        "string",
        "null"
      ],
      "description": "元のテキストの言語コード"
    },
    "category": {
      "type": [
        "string",
        "null"
      ],
      "description": "動画が属するカテゴリ。注意：このフィールドは非推奨であり、常に null を返します"
    },
    "subtitles_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "動画の字幕数",
      "format": "int64"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "動画のタイトル"
    },
    "items_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "items 配列で返される結果の数",
      "format": "int64"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_YoutubeSubtitles"
          }
        ]
      },
      "description": "SERP で見つかった検索結果の要素"
    }
  }
}
```

### Response36Afe1097B20_SerpYoutubeVideoSubtitlesLiveAdvancedTaskInfo

`#/components/schemas/Response36Afe1097B20_SerpYoutubeVideoSubtitlesLiveAdvancedTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_SerpYoutubeVideoSubtitlesLiveAdvancedResultInfo"
              }
            ]
          },
          "description": "結果の配列"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_SpellInfo

`#/components/schemas/Response36Afe1097B20_SpellInfo`

```json
{
  "properties": {
    "keyword": {
      "type": [
        "string",
        "null"
      ],
      "description": "検索エンジンの自動修正によって取得されたキーワード\n 結果は修正後のキーワードに対して提供されます"
    },
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "自動修正のタイプ\n 指定可能な値：\n did_you_mean、showing_results_for、no_results_found_for、including_results_for\n 注意：Yahoo と Yandex がサポートする自動修正タイプは次のとおりです：\n including_results_for"
    }
  }
}
```

### Response36Afe1097B20_YoutubeSubtitles

`#/components/schemas/Response36Afe1097B20_YoutubeSubtitles`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "要素の種類"
    },
    "rank_group": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>SERP のグループ順位</em><br>同じ <code>type</code> 値を持つ要素のグループ内での位置<br><code>type</code> 値が異なる要素の位置は <code>rank_group</code> から除外されます"
    },
    "rank_absolute": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em> ターゲットドメインの SERP における絶対ランク</em><br>SERP 内のすべての要素の中での絶対位置"
    },
    "text": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>字幕で翻訳されたテキスト</em>"
    },
    "start_time": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>字幕テキストが開始する秒</em>"
    },
    "end_time": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>字幕テキストが終了する秒</em>"
    },
    "duration_time": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>字幕の長さ（秒）</em>"
    }
  }
}
```
