# YouTube Videos

Extract a YouTube channel's content catalog — videos, shorts, and live streams — with view counts, durations, and publishing channel identity

**Pricing:** $0.5 / 1k videos

**Endpoint:** `POST /api/v1/agents/youtube/videos/run`

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

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `urls` | array | Yes | YouTube channel URLs. One per line. |
| `maxVideos` | integer | No | Videos per channel. Use 0 for all. |
| `sortVideosBy` | string | No | Sort order for videos. |
| `maxShorts` | integer | No | Shorts per channel. Use 0 for all, leave blank to skip. |
| `maxStreams` | integer | No | Live streams per channel. Use 0 for all, leave blank to skip. |

## Example

```bash
curl -X POST https://api.mindcase.co/api/v1/agents/youtube/videos/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/videos/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, SDKs, MCP): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `videoUrl` | Video URL | url |
| `videoTitle` | Video Title | text |
| `type` | Type | text |
| `views` | Views | number |
| `published` | Published | text |
| `duration` | Duration | text |
| `isLive` | Is Live | boolean |
| `thumbnail` | Thumbnail | url |
| `channel` | Channel | text |
| `channelHandle` | Channel Handle | text |
| `channelUrl` | Channel URL | url |
| `channelId` | Channel ID | text |
| `subscribers` | Subscribers | number |
| `channelTotalVideos` | Channel Total Videos | number |
| `channelTotalViews` | Channel Total Views | number |
| `channelVerified` | Channel Verified | boolean |
| `channelLocation` | Channel Location | text |
| `channelJoinedYear` | Channel Joined Year | number |
| `channelDescription` | Channel Description | text |
| `channelAvatar` | Channel Avatar | url |
| `channelBanner` | Channel Banner | url |
| `channelLinks` | Channel Links | object_array |
