> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# TikTok Video Analytics API

> Returns view, like, comment and save totals for a TikTok video plus its growth curve for the first 14 days after posting.

`POST /v1/data/tiktok/video-analytics/run`

**Pricing:** $0.002 per video metric report ($2.00 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**videoUrls** `string[]` *required*

The TikTok video URLs or numeric video ids to pull metrics for.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/tiktok/video-analytics/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "videoUrls": [
      "https://www.tiktok.com/@nba/video/7702956518437702942",
      "https://www.tiktok.com/@nba/video/7702677121671597342",
      "https://www.tiktok.com/@nba/video/7699659604275334431"
    ]
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/tiktok/video-analytics/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "videoUrls": [
        "https://www.tiktok.com/@nba/video/7702956518437702942",
        "https://www.tiktok.com/@nba/video/7702677121671597342",
        "https://www.tiktok.com/@nba/video/7699659604275334431"
    ]
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/tiktok/video-analytics/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "videoUrls": [
    "https://www.tiktok.com/@nba/video/7702956518437702942",
    "https://www.tiktok.com/@nba/video/7702677121671597342",
    "https://www.tiktok.com/@nba/video/7699659604275334431"
  ]
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one video metric report, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `videoId` | Video Id | text |
| `videoUrl` | Video Url | url |
| `views` | Views | number |
| `likes` | Likes | number |
| `comments` | Comments | number |
| `saves` | Saves | number |
| `trendInterval` | Trend Interval | text |
| `viewsTrend` | Views Trend | object\_array |
| `likesTrend` | Likes Trend | object\_array |
| `commentsTrend` | Comments Trend | object\_array |
| `savesTrend` | Saves Trend | object\_array |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "tiktok/video-analytics",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "videoUrl": "https://www.tiktok.com/@_/video/7702956518437702942",
      "commentsTrend": [
        {
          "at": "2026-10-31T00:00:00Z",
          "value": 1811
        },
        {
          "at": "2026-11-01T00:00:00Z",
          "value": 4448
        }
      ],
      "trendInterval": "day",
      "likesTrend": [
        {
          "at": "2026-10-31T00:00:00Z",
          "value": 308331
        },
        {
          "at": "2026-11-01T00:00:00Z",
          "value": 932938
        }
      ],
      "savesTrend": [
        {
          "at": "2026-10-31T00:00:00Z",
          "value": 13330
        },
        {
          "at": "2026-11-01T00:00:00Z",
          "value": 33217
        }
      ],
      "saves": 52602,
      "viewsTrend": [
        {
          "at": "2026-10-31T00:00:00Z",
          "value": 2903658
        },
        {
          "at": "2026-11-01T00:00:00Z",
          "value": 9654892
        }
      ],
      "likes": 1417152,
      "views": 14583429,
      "comments": 7066,
      "videoId": "7702956518437702942"
    }
  ]
}
```

## Related APIs

To find videos first use [`tiktok/posts`](https://docs.mindcase.co/apis/tiktok/posts); to download the file use [`tiktok/download`](https://docs.mindcase.co/apis/tiktok/download).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.