YouTubeData & subtitles

YouTube data and subtitles

Title, author, duration, thumbnail, caption languages, and timed subtitles.

API flow

Video metadata

POST /api/youtube/detail

Captions

POST /api/youtube/subtitle

No native captions: POST /api/transcribe/submit with the video URL, then GET /api/transcribe/{job_id} (see Transcription).

More endpoints in the API docs →

Common workflows

Video detail

POST /api/youtube/detail — raw video payload for a URL.

Captions

POST /api/youtube/subtitle — native caption text by language.

Search videos

POST /api/youtube/search — keyword search with limit / cursor.

Channel profile

POST /api/youtube/user/detail — channel URL or @handle.

Channel uploads

POST /api/youtube/user/works — paginated channel videos.

Playlist

POST /api/youtube/playlist — playlist items with pagination.

Copy and run

Replace YOUR_API_KEY with a console key. First POST /api/youtube/detail, then POST /api/youtube/subtitle.

import requests

API_BASE = "https://www.dataspider.ai/api"
HEADERS = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
}

detail = requests.post(
    f"{API_BASE}/youtube/detail",
    headers=HEADERS,
    json={"url": "https://www.youtube.com/watch?v=sample-keynote"},
)
print(detail.json())

subs = requests.post(
    f"{API_BASE}/youtube/subtitle",
    headers=HEADERS,
    json={"url": "https://www.youtube.com/watch?v=sample-keynote", "language": ""},
)
print(subs.json())

JSON response

response.json
{
  "code": 200,
  "message": "ok",
  "success": true,
  "data": {
    "platform": "youtube",
    "video_id": "sample-keynote",
    "title": "Keynote 2026",
    "author": "Channel Name",
    "duration": 524,
    "thumbnail": "https://i.ytimg.com/vi/sample/hqdefault.jpg",
    "available_subtitles": [
      "en",
      "zh-Hans",
      "ja"
    ]
  }
}

What you get

Video data

  • Title, description, and author
  • Duration and thumbnail
  • Available caption languages
  • Video and audio streams

Captions

  • Fetch native captions by language
  • SRT / VTT / JSON / TXT
  • Timed segments
  • Fall back to transcription when missing

Other platforms

Ready to integrate?

Create an API key, try a URL in Playground, then wire it into your app.