> ## 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 Comments API

> Top-level TikTok comments: text, likes, reply counts, commenter handle and profile, timestamps and mentions. From video URLs or by profile.

`POST /v1/data/tiktok/comments/run`

**Pricing:** $0.0005 per comment ($0.5 per 1,000).

## Ways to call it

* **Video URL**: set `postURLs` (optional: `commentsPerPost`, `topLevelCommentsPerPost`)
* **Profile**: set `profiles` (optional: `resultsPerPage`, `commentsPerPost`, `topLevelCommentsPerPost`, `profileScrapeSections`, `profileSorting`, `excludePinnedPosts`)

## Request

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

**postURLs** `string`

TikTok video URL to get comments from. E.g. [https://www.tiktok.com/@username/video/1234567890](https://www.tiktok.com/@username/video/1234567890).

Format e.g. `https://www.tiktok.com/@looooooooch/video/7332342275151760642`.

**profiles** `string`

TikTok username whose videos' comments you want (with or without @). The actor pulls comments from the profile's videos; use Videos Per Profile to control how many.

Format e.g. `https://www.tiktok.com/@khaby.lame`.

**commentsPerPost** `integer`

Number of comments to return. Use 0 for all. Actual counts can vary on very high-comment videos due to TikTok API limits.

**topLevelCommentsPerPost** `integer`

Optional cap on top-level (non-reply) comments per video.

**resultsPerPage** `integer` (default: 1)

By Profile mode only. Number of videos to pull comments from per profile.

**profileScrapeSections** `string[]` (default: \["videos"])

By Profile mode only. Which sections to pull videos from.

Allowed values: `videos` (Videos), `reposts` (Reposts).

**profileSorting** `string` (default: latest)

By Profile mode only. Order videos by latest, most popular, or oldest.

Allowed values: `latest` (Latest), `popular` (Most popular), `oldest` (Oldest).

**excludePinnedPosts** `boolean` (default: false)

By Profile mode only. Skip pinned videos at the top of a profile.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/tiktok/comments/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "postURLs": "https://www.tiktok.com/@looooooooch/video/7332342275151760642",
    "commentsPerPost": 100
  }
}'
```

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

r = requests.post(
    "https://api.mindcase.co/v1/data/tiktok/comments/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "postURLs": "https://www.tiktok.com/@looooooooch/video/7332342275151760642",
    "commentsPerPost": 100
}},
)
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/comments/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "postURLs": "https://www.tiktok.com/@looooooooch/video/7332342275151760642",
  "commentsPerPost": 100
} }),
});
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 comment, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `commentId` | Comment ID | text |
| `commenterUrl` | Commenter URL | url |
| `commenterId` | Commenter ID | text |
| `commenterAvatar` | Commenter Avatar | image |
| `comment` | Comment | text |
| `likes` | Likes | number |
| `likedByCreator` | Liked By Creator | text |
| `pinnedByCreator` | Pinned By Creator | text |
| `replies` | Replies | number |
| `postedDate` | Posted Date | date |
| `mentions` | Mentions | array |
| `postUrl` | Post URL | url |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "tiktok/comments",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "commenterId": "7647889466430817310",
      "commenterUrl": "https://www.tiktok.com/@wyattman10314",
      "comment": "We def got bought",
      "pinnedByCreator": false,
      "commentId": "7674847483767735053",
      "postedDate": "2026-08-17T04:08:37.000Z",
      "postUrl": "https://www.tiktok.com/@looooooooch/video/7332342275151760642",
      "commenterAvatar": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/9a3dfd75949105cca0f8e07eb0443cfd~tplv-tiktokx-cropcenter:100:100.jpg?dr=9640&refresh_token=e...",
      "likedByCreator": false,
      "likes": 2,
      "replies": 0,
      "mentions": []
    }
  ]
}
```

## Related APIs

For the video itself use [`tiktok/posts`](https://docs.mindcase.co/apis/tiktok/posts); for a video's 14-day growth curve use [`tiktok/video-analytics`](https://docs.mindcase.co/apis/tiktok/video-analytics).


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