---
title: "Extract YouTube captions"
method: POST
path: "/v2/web/yt-captions"
tags: ["Web v2"]
---

# Extract YouTube captions

`POST /v2/web/yt-captions`

Extract captions/subtitles from a YouTube video using video ID

## Request body

- object
  - `videoId` string, required — YouTube video ID
  - `lang` string — Language code for subtitles (e.g., "en", "fr", "de")
  - `includeVideoDetails` boolean — Whether to include video details along with captions

## Response `200`

Captions extracted successfully

- object
  - `success` true, required
  - `data` object, required
    - `videoId` string, required
    - `language` string, required
    - `captions` object[], required
      - `start` string, required
      - `dur` string, required
      - `text` string, required
    - `videoDetails` object
      - `title` string, required
      - `description` string, required
    - `metadata` object, required
      - `totalCaptions` number, required
      - `extractionTime` number, required
      - `timestamp` string, required
  - `creditsCost` number — Credits consumed by this operation
  - `requestId` string, uuid, required — Unique request identifier for tracing
  - `timestamp` string, date-time, required — ISO timestamp when the response was generated

## Other responses

- `401` — Authentication required
- `422` — Validation error
- `500` — Internal server error

---

[API](https://skmtc.net/weblinq/apis/weblinq-api.md) · [All operations](https://skmtc.net/weblinq/apis/weblinq-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/weblinq/weblinq-api/versions/364690cf91b7/schema)
