# YouTube Transcripts

Extract a YouTube video's full transcript with timestamps, plus title, description, views, likes, and channel info. Pass multiple videos at once.

**Pricing:** $2 / 1k transcripts

**Endpoint:** `POST /api/v1/agents/youtube/video-transcript/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `urls` | array | Yes | One or more YouTube video URLs (full, youtu.be short link, or /shorts/). Pass several to transcribe a batch in a single run. |
| `language` | string | No | Preferred transcript language. We fetch every available subtitle track and pick the one matching this language (preferring auto-generated captions for non-Latin scripts). Falls back to English / the first track if the video has no track in this language. |

## Example

```bash
curl -X POST https://api.mindcase.co/api/v1/agents/youtube/video-transcript/run \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{"urls":["..."]}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/api/v1/agents/youtube/video-transcript/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "urls": [
        "..."
    ]
}},
)
data = resp.json()
```

## Get the results

`run` is async and returns a `job_id`. Poll until `status` is `completed`, then read the rows:

```bash
# 1) check status
curl https://api.mindcase.co/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/api/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, endpoints): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `videoUrl` | Video URL | url |
| `title` | Title | text |
| `transcript` | Transcript | text |
| `description` | Description | text |
| `durationS` | Duration (s) | number |
| `views` | Views | number |
| `likes` | Likes | number |
| `comments` | Comments | number |
| `published` | Published | text |
| `channel` | Channel | text |
| `channelHandle` | Channel Handle | text |
| `channelUrl` | Channel URL | url |
| `subscribers` | Subscribers | number |
| `language` | Language | text |
| `availableLanguages` | Available Languages | array |
| `autoGenerated` | Auto-Generated | boolean |
| `segments` | Segments | array |
| `hashtags` | Hashtags | array |
| `thumbnail` | Thumbnail | url |
