# TikTok videos

> Get the most-viewed TikTok videos posted in the last 48 hours in one request.

Source: https://dev.virlo.ai/docs/tiktok-videos
Markdown: https://dev.virlo.ai/docs/tiktok-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 TikToks posted in the last two days have the most views so far.

**At a glance**

- **What it does:** Ranks TikToks Virlo has collected, not all of TikTok. Takes about a second.
- **You send:** Optionally, how many TikToks you want.
- **You get back:** Link (shows the handle), caption, views, likes, comments, shares, saves, hashtags, sound. No follower counts.
- **Cost:** $0.25 per request, even for 100 TikToks. Errors are free.

## Get top TikTok videos

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

Cost per request: $0.25

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

**cURL request:**

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

**JavaScript request:**

```js
const res = await fetch('https://api.virlo.ai/v1/tiktok/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/tiktok/videos/digest',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={'limit': 50},
)
data = res.json()['data']
```

**Response 200 OK:**

```json
{
  "data": [
    {
      "id": "367da5d1-5510-4e73-b9a5-fd6207e9915e",
      "url": "https://www.tiktok.com/@thesun/video/7688710703854767392",
      "type": "tiktok",
      "description": "This is the bizarre moment Rory Stewart suddenly turns and stares at fellow Newsnight guest, as viewers say ‘I can’t stop laughing’. Click on the link for more. #NewsNight #RoryStewart #tv ",
      "publish_date": "2026-09-23T12:44:27",
      "views": 5050311,
      "number_of_likes": 381807,
      "number_of_comments": 4803,
      "number_of_shares": 105189,
      "bookmarks": 23851,
      "hashtags": ["newsnight"],
      "thumbnail_url": "https://auth.virlo.ai/storage/v1/object/public/thumbnails/5f78a37402cb781959c245240f08b7ea1672b0867346cf35771adb32f177e612.jpg",
      "duration": 15,
      "external_id": "7688710703854767392",
      "author_id": "d9c40165-62e0-493c-8b34-7d60f7f13559",
      "niche": "unknown",
      "region": "GB",
      "upload_region": "GB",
      "upload_region_source": "tiktok_region",
      "transcript_raw": "All the value goes to them. It's terrifying. What's your sense of what's going on in government?",
      "is_eligible_for_commission": false,
      "is_duet": false,
      "is_stitch": false,
      "sound": {
        "id": "05b90659-49c5-4f94-ba15-da80d6ef8c11",
        "title": "original sound - thesun",
        "duration": 14,
        "platform": "tiktok",
        "cover_url": "7a926491c16af666224735afecb62c829a4e11f774fd221b2514238a4ef6a231.webp",
        "is_original": true,
        "usage_count": 51,
        "owner_handle": "thesun",
        "owner_nickname": "The Sun",
        "is_commerce_music": true
      }
    }
  ]
}
```

**Response 400:**

```json
{
  "message": ["limit must not be less than 1"],
  "error": "Bad Request",
  "statusCode": 400,
  "code": "validation_error"
}
```

`hashtags` often lists only one tag. The caption (`description`) has them all. Sound stats: look up `sound.id` in [Sound details](https://dev.virlo.ai/docs/sounds#sound-details) ($0.05 to $0.15).

[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)
- [YouTube videos](https://dev.virlo.ai/docs/youtube-videos.md)
- [TikTok hashtags](https://dev.virlo.ai/docs/tiktok-hashtags.md)
- [Instagram hashtags](https://dev.virlo.ai/docs/instagram-hashtags.md)
- [Instagram videos](https://dev.virlo.ai/docs/instagram-videos.md)
