Skip to main content
POST
/
v2
/
web
/
yt-captions
Extract YouTube captions
curl --request POST \
  --url https://api.weblinq.dev/v2/web/yt-captions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "videoId": "<string>",
  "lang": "en",
  "includeVideoDetails": false
}'
{
  "success": true,
  "data": {
    "videoId": "<string>",
    "language": "<string>",
    "captions": [
      {
        "start": "<string>",
        "dur": "<string>",
        "text": "<string>"
      }
    ],
    "videoDetails": {
      "title": "<string>",
      "description": "<string>"
    },
    "metadata": {
      "totalCaptions": 123,
      "extractionTime": 123,
      "timestamp": "<string>"
    }
  },
  "creditsCost": 123,
  "requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Enter your API token or session token

Body

application/json

YouTube caption extraction parameters

videoId
string
required

YouTube video ID

Required string length: 1 - 100
lang
string
default:en

Language code for subtitles (e.g., "en", "fr", "de")

Required string length: 2 - 5
includeVideoDetails
boolean
default:false

Whether to include video details along with captions

Response

Captions extracted successfully

success
boolean
required
data
object
required
requestId
string<uuid>
required

Unique request identifier for tracing

timestamp
string<date-time>
required

ISO timestamp when the response was generated

creditsCost
number

Credits consumed by this operation

I