# YouTube videos

> Get the most-viewed YouTube Shorts posted in the last 48 hours in one request.

Source: https://dev.virlo.ai/docs/youtube-videos
Markdown: https://dev.virlo.ai/docs/youtube-videos.md
Section: By platform

## About the Virlo API (applies to every page)

- Base URL: `https://api.virlo.ai/v1`. Every request needs the header `Authorization: Bearer YOUR_API_KEY` (keys start with `virlo_tkn_`).
- Responses are JSON inside a `data` field, except the `/v1/webhooks` endpoints, which return the object or array directly. Field names are snake_case.
- Prices are in US dollars from a prepaid balance. 1 credit = $0.01. The `X-Cost` response header on each successful response is the exact charge. Errors are free.
- Slow jobs return an ID. Check its status every 15 seconds (or whatever `retry_after_seconds` says) until `finalized` is `true`.
- All docs pages: https://dev.virlo.ai/llms.txt. Every page in one file: https://dev.virlo.ai/llms-full.txt. MCP server for AI assistants: https://dev.virlo.ai/api/mcp/mcp.

---

See which YouTube Shorts posted in the last two days have the most views so far.

**At a glance**

- **What it does:** Ranks Shorts Virlo has collected, not all of YouTube. Takes about a second.
- **You send:** Optionally, how many Shorts you want.
- **You get back:** Link, caption, views, likes, comments, hashtags, usually a transcript. No channel name; open the link.
- **Cost:** $0.25 per request, even for 100 Shorts. Errors are free.

## Get top YouTube Shorts

**Endpoint:** `GET https://api.virlo.ai/v1/youtube/videos/digest`

Cost per request: $0.25

- `limit` (integer, optional): How many Shorts: 1 to 100 (default 50; above 100 gives 100). Other settings, even `platform`, fail.

**cURL request:**

```bash
curl -G https://api.virlo.ai/v1/youtube/videos/digest \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d limit=50
```

**JavaScript request:**

```js
const res = await fetch('https://api.virlo.ai/v1/youtube/videos/digest?limit=50', {
  headers: { Authorization: 'Bearer YOUR_API_KEY' },
})
const { data } = await res.json()
```

**Python request:**

```python
import requests

res = requests.get(
    'https://api.virlo.ai/v1/youtube/videos/digest',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={'limit': 50},
)
data = res.json()['data']
```

**Response 200 OK:**

```json
{
  "data": [
    {
      "id": "72a237ab-30d8-4e8a-8579-b2e746a43d04",
      "url": "https://www.youtube.com/shorts/z3Ao0FH-0fU",
      "type": "youtube",
      "description": "I could NOT see that coming #relatablestories #comedy #funnymemes",
      "publish_date": "2026-09-23T08:25:27",
      "views": 1841170,
      "number_of_likes": 42179,
      "number_of_comments": 634,
      "number_of_shares": null,
      "bookmarks": 0,
      "hashtags": ["#storytelling", "#shorts", "#relatablestories", "#comedy", "#funnymemes"],
      "thumbnail_url": "https://auth.virlo.ai/storage/v1/object/public/thumbnails/99306a7d461bd83fab98a3154f19faab1145f0b385e69210af6f33567af38ee7.jpg",
      "duration": 13,
      "external_id": "z3Ao0FH-0fU",
      "author_id": "d28e53d4-9ff1-482f-9dfa-0544ea34e7ad",
      "niche": "unknown",
      "region": null,
      "upload_region": "US",
      "upload_region_source": "youtube_channel_country",
      "transcript_raw": "There's a clip in the Cars movie where Sally splashes mud on Lightning McQueen.",
      "is_eligible_for_commission": null,
      "is_duet": null,
      "is_stitch": null,
      "sound": {
        "id": "36d69972-708a-4e5e-893f-c1143757abf2",
        "title": "Original Sound",
        "duration": null,
        "platform": "youtube",
        "cover_url": "c01121a411aca7f631d30acf872b53ebf262e9ff7524eb6bac1e535693fa68db.jpg",
        "is_original": true,
        "usage_count": null,
        "owner_handle": "tyler.vitelli",
        "owner_nickname": "@tyler.vitelli",
        "is_commerce_music": null
      }
    }
  ]
}
```

**Response 400:**

```json
{
  "message": ["property platform should not exist"],
  "error": "Bad Request",
  "statusCode": 400,
  "code": "validation_error"
}
```

`0` likes or comments can mean "not reported", even on hit Shorts. Shares and saves (`bookmarks`) aren't reported. Hashtags usually keep the `#`, unlike other platforms.

[What each field means](https://dev.virlo.ai/docs/videos#get-videos-digest)

---

More in By platform:

- [YouTube hashtags](https://dev.virlo.ai/docs/youtube-hashtags.md)
- [TikTok hashtags](https://dev.virlo.ai/docs/tiktok-hashtags.md)
- [TikTok videos](https://dev.virlo.ai/docs/tiktok-videos.md)
- [Instagram hashtags](https://dev.virlo.ai/docs/instagram-hashtags.md)
- [Instagram videos](https://dev.virlo.ai/docs/instagram-videos.md)
