# YouTube Music

Search the YouTube Music catalog — the same shelves the music app shows, with video ids, artists, play counts, and durations.

- Method: `GET`
- Path: `/v1/music/ytm/search`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `q` | string | required | Search terms — artist, title, or both. |
| `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/music/ytm/search \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "query": "paranoid android",
    "tracks": [
      {
        "video_id": "DExBeFCx3mQ",
        "title": "Paranoid Android",
        "artist": "Radiohead",
        "result_type": "Song",
        "plays": "97M plays",
        "duration": "6:23"
      }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-22T14:50:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-22T15:50:00.000Z"
  }
}
```