# YouTube



Video search over YouTube's official Data API — find videos by keyword, then read any one in full: statistics, duration, tags.



## YouTube Video Card

One YouTube video's card — title, channel, and thumbnail.

- Method: `GET`
- Path: `/v1/social/youtube/video`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `url` | string | required | A youtube.com/watch or youtu.be URL. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/social/youtube/video \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "url": "https://www.youtube.com/watch?v=DExBeFCx3mQ",
    "title": "Paranoid Android (Remastered)",
    "author_name": "Radiohead - Topic",
    "author_url": "https://www.youtube.com/channel/UCr_iyUANcn9OX_yy9piYoLw",
    "thumbnail_url": "https://i.ytimg.com/vi/DExBeFCx3mQ/hqdefault.jpg",
    "width": 200,
    "height": 150
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-23T12:30:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-23T13:30:00.000Z"
  }
}
```

**MCP**: callable from any AI agent via `call_api` with endpoint `youtube-video-card` — https://mcp.diraz.ae/mcp

## YouTube Channel Feed

A YouTube channel's or playlist's latest videos — titles, links, publish times, and thumbnails.

- Method: `GET`
- Path: `/v1/social/youtube/channel`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `channel_id` | string | required | Channel id (`UC…`) or playlist id (`PL…`). |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/social/youtube/channel \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "channel_id": "UCbfYPyITQ-7l4upoX8nvctg",
    "channel": "Mozilla",
    "videos": [
      {
        "video_id": "dQw4w9WgXcQ",
        "title": "Firefox: What's new",
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "published_at": "2026-08-21T18:00:07+00:00",
        "channel": "Mozilla",
        "thumbnail_url": "https://i4.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
        "description": "The monthly tour of what shipped."
      }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-23T12:30:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-23T12:45:00.000Z"
  }
}
```

**MCP**: callable from any AI agent via `call_api` with endpoint `youtube-channel-feed` — https://mcp.diraz.ae/mcp