YTAPI.devDocs

Quickstart

Fast, reliable API for YouTube video transcripts, metadata, playlists, channels, and search.

YTAPI lets you extract transcripts, video metadata, playlists, channel details and search results from YouTube with simple HTTP requests. It supports word-level timestamps, multiple output formats (JSON, text, Markdown, SRT, VTT), and high-concurrency batch processing.

Base URL

All API endpoints are versioned under the /v1 prefix.

Production: https://api.ytapi.dev/v1

Explore the API


30-Second Quickstart

Get Your API Key

Generate an API key from the Developer Dashboard.

Make Your First Request

curl -X POST https://api.ytapi.dev/v1/transcripts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video_id": "dQw4w9WgXcQ",
    "format": "markdown"
  }'
import requests

response = requests.post(
    "https://api.ytapi.dev/v1/transcripts",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "video_id": "dQw4w9WgXcQ",
        "format": "markdown"
    }
)

# Text formats (markdown, srt, vtt) return raw text directly
print(response.text)
const res = await fetch("https://api.ytapi.dev/v1/transcripts", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    video_id: "dQw4w9WgXcQ",
    format: "markdown"
  })
});

// Text formats (markdown, srt, vtt) return raw text directly
const markdown = await res.text();
console.log(markdown);
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	payload, _ := json.Marshal(map[string]any{
		"video_id": "dQw4w9WgXcQ",
		"format":   "markdown",
	})

	req, _ := http.NewRequest("POST", "https://api.ytapi.dev/v1/transcripts", bytes.NewBuffer(payload))
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}

Prefer a client library? pip install ytapi-sdk or npm install @ytapi/sdk. See SDKs.

Parse the Response

Every response includes telemetry headers for observability:

HeaderDescription
X-CacheHIT, MISS, BYPASS, or STALE — whether served from cache
X-Track-Kindasr (auto-generated) or manual (creator-uploaded)
X-Track-LanguageNegotiated ISO language code (e.g. en, zh-Hans)
X-Request-IdUnique request tracking identifier

Features at a Glance

FeatureDescription
TranscriptsSub-400ms median latency with automatic language fallback. Outputs JSON, plain text, Markdown, SRT, and VTT.
Word TimestampsSet word_level=true for millisecond-level start and end timestamps for each word.
Video MetadataTitles, descriptions, view counts, duration, publication dates, and channel details.
PlaylistsComplete playlist details and paginated video lists using continuation tokens.
ChannelsChannel profiles, subscriber counts, uploads, and playlists.
SearchQuery YouTube videos, channels, and playlists with type and upload date filters.
Batch ProcessingSubmit up to 100 tasks in a single asynchronous job, executed across a concurrent worker pool (default 10, max 20).

On this page