# YouTube Video Captions API (V1)

Get YouTube Video Captions (V1) data via REST or OpenAny MCP—with pay-per-use pricing, no subscription, and no cookies required. Powered by JustOneAPI, pass parameters such as videoId, and retrieve structured data including business status code, returned language code field, returned language name field, video identifier, and response message for content research and account lookup, and integration reference.

Documentation: https://openany.si/youtube/youtube-video-captions-api-v1/3e19ee12-3d38-492d-8fc9-c0a6484a9881/
API ID: 3e19ee12-3d38-492d-8fc9-c0a6484a9881
Provider: justoneapi
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/justoneapi/api/youtube/get-video-captions/v1
Page update time: 2026-12-03T02:51:20.731Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.015385 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:51:19.470Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "15385",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## YouTube Video Captions (V1) API

Retrieve available caption tracks for a YouTube video or request captions in SRT, XML, JSON3, or plain-text format. Provide videoId in query. Read the response using the field paths below, preserving identifiers and the declared value types when mapping results.

## What You Can Build

- **Content research and account lookup**: Keep source records connected to their content and account identifiers.
- **Integration reference**: Use the selected request format and keep source identifiers with the returned result.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `code` | Business status code |
| `data.captions[].language_code` | Returned language code field |
| `data.captions[].language_name` | Returned language name field |
| `data.video_id` | Video identifier |
| `message` | Response message (nullable in the reference) |
| `recordTime` | Returned record time value (nullable in the reference) |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "YouTube Video Captions API (V1) request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "videoId": {
          "type": "string",
          "description": "The unique identifier for a YouTube video."
        },
        "languageCode": {
          "type": "string",
          "description": "Caption language code, such as en, zh-Hans, or a.en. Leave it empty to retrieve available caption tracks."
        },
        "format": {
          "type": "string",
          "description": "Caption output format.\n\nAvailable Values:\n- `srt`: SubRip caption format with timeline cues\n- `xml`: Original XML caption format\n- `json3`: YouTube original JSON caption structure\n- `txt`: Plain text without timeline cues",
          "enum": [
            "srt",
            "xml",
            "json3",
            "txt"
          ]
        }
      },
      "required": [
        "videoId"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "integer"
    },
    "data": {
      "type": "object",
      "properties": {
        "captions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "language_code": {
                "type": "string"
              },
              "language_name": {
                "type": "string"
              }
            }
          }
        },
        "video_id": {
          "type": "string"
        }
      }
    },
    "message": {
      "type": "null"
    },
    "recordTime": {
      "type": "null"
    }
  }
}
```

## Request example
Scenario: Official example · Historical response; independent request temp
```bash
curl \
  'https://api.openany.si/v1/agent-apis/justoneapi/api/youtube/get-video-captions/v1?videoId=%3CREPLACE_VIDEOID%3E' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "code": 0,
  "data": {
    "captions": [
      {
        "language_code": "en",
        "language_name": "English"
      }
    ],
    "video_id": "8qAHj1a0H4c"
  },
  "message": null,
  "recordTime": null
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which inputs identify this request?
Provide videoId in query (string). Keep identifiers and URLs in the formats documented for this implementation.

### Which values can I use for format?
The selected schema accepts srt, xml, json3, txt. Keep the documented string type and exact spelling for this input.

### Where do URL parameters belong?
Use the documented path and query inputs. This GET implementation does not use a JSON request body; keep path values and URL query values in their declared locations.

### How should I map the returned fields?
Use the documented response paths with their returned types. Keep null, empty collections, false and zero distinct, and retain the identifiers needed to match results to the request.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected API implementation. Follow its billing unit, quantity and any request-dependent rules before sending the request.

## Available implementations
- justoneapi: https://openany.si/youtube/youtube-video-captions-api-v1/3e19ee12-3d38-492d-8fc9-c0a6484a9881/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
