# Get caption track

Returns one caption track from required `caption_source`. Optional `caption_style` controls formatting and `translation_code` requests a translation.

- Platform: YouTube V2
- Request: `GET https://api.toolzerhub.com/v2/youtube/subtitle`
- Auth: `x-api-key` header
- Cost: 1 credit per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/youtube-v2/video/get-you-tube-subtitle-track

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `caption_source` | query | yes | string | Caption track URL returned by the subtitles or video-details endpoint. |
| `caption_style` | query | no | enum: json3, srv1, srv2, srv3, ttml, vtt, srt | Caption output style. Defaults to srv1 when omitted. |
| `translation_code` | query | no | string | Language code to translate the caption track into. |

## Example request

```bash
curl "https://api.toolzerhub.com/v2/youtube/subtitle?caption_source=<caption_source>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
