> Documentation index: https://docs.scrapier.io/llms.txt
> Auth: header `X-API-Key: <key>` · Base: https://api.scrapier.io/api/v2 · Synchronous; paginate with `cursor` ← `data.next_cursor`.

# TikTok Comments

Structured TikTok data: every input is optional. Cursor-paginated, 1 credit per successful call.

`GET|POST https://api.scrapier.io/api/v2/tiktok-comments/` · 1 credit per successful call · Cursor-paginated

## Overview

Call `GET /api/v2/tiktok-comments/`. The results are in `data.comments`; send `data.next_cursor` back as `cursor` to get the next page. 11 optional parameters refine the call (see Parameters).

## Request

```bash
curl -G "https://api.scrapier.io/api/v2/tiktok-comments/" \
  -H "X-API-Key: YOUR_API_KEY" \
  --max-time 210
```

```python
import requests

resp = requests.get(
    "https://api.scrapier.io/api/v2/tiktok-comments/",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={},
    timeout=210,
)
body = resp.json()
if not resp.ok:
    raise RuntimeError(body.get("error") or body.get("detail"))

print(body["data"]["comments"])
```

POST with a JSON body works too (same parameters; the body is merged over the query string).

## Parameters

> **Note:** No parameter is strictly required, but send at least the inputs shown in the example.

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `X-API-Key` (header) | string | yes | — | Your API key. |
| `usernames` | string | no | `mrbeast` | TikTok username (@ optional). Required on first call when `manual_video_urls` is not supplied; ignored when `cursor` is supplied. |
| `manual_video_urls` | string | no | — | TikTok video: full URL, vm.tiktok.com / vt.tiktok.com short link, or numeric video id. Takes precedence over `usernames`. Ignored when `cursor` is supplied. |
| `cursor` | string | no | — | Pagination cursor returned in the previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When `next_cursor` is null, you have reached the last page. |
| `results_per_profile` | integer | no | `30` | Max videos discovered per profile. Locked into the cursor. |
| `comments_per_post` | integer | no | `100` | Max top-level comments per video. Video input: empty = walk all comments. Usernames input: default 100 per video. Locked into the cursor. |
| `max_replies_per_comment` | integer | no | `2` | Max replies fetched per comment (capped at 500; 0 = skip reply threads, fastest). Reply threads are fetched in parallel within a ~5s window per call; threads not fetched in time keep reply_comment_total and are listed in `warning`. Locked into the cursor. |
| `profile_sections` | string | no | `videos` | Profile section: videos or reposts (first one is used). Locked into the cursor. |
| `profile_sorting` | string | no | `latest` | Sort: latest, oldest, or popular. Locked into the cursor. |
| `oldest_post_date` | string | no | — | YYYY-MM-DD or days ago (e.g. 30). Locked into the cursor. |
| `newest_post_date` | string | no | — | YYYY-MM-DD. Locked into the cursor. |
| `exclude_pinned` | boolean | no | `false` | Exclude pinned posts when scraping profiles. Locked into the cursor. |
| `use_proxy` | boolean | no | `true` | Route the request through Scrapier's residential proxy pool. Default: `true`. Leave as is unless support tells you otherwise. |
| `raw_data` | boolean | no | `false` | When true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under `raw_responses`, in place of the formatted items. When false (default) you get the formatted output. Pagination (`cursor` / `next_cursor`) works the same in both modes. |

## Response

HTTP 200. Results are in `data.comments`. Sample from the live catalog, arrays trimmed to 3 items.

```json
{
  "success": true,
  "data": {
    "manual_video_urls": "https://www.tiktok.com/@mrbeast/video/7606031409408478495",
    "page": 1,
    "page_size": 50,
    "video_id": "7606031409408478495",
    "total_comments": 41922,
    "comments": [
      {
        "video_web_url": "https://www.tiktok.com/@mrbeast/video/7606031409408478495",
        "submitted_video_url": "https://www.tiktok.com/@mrbeast/video/7606031409408478495",
        "input": "https://www.tiktok.com/@mrbeast/video/7606031409408478495",
        "video_id": "7606031409408478495",
        "cid": "7606047946819388182",
        "create_time": 1770921048,
        "create_time_iso": "2026-02-12T18:30:48.000Z",
        "text": "Mr beast should start a YouTube channel",
        "digg_count": 47954,
        "liked_by_author": false,
        "pinned_by_author": false,
        "replies_to_id": null,
        "reply_comment_total": 340,
        "uid": "7496601188525212704",
        "unique_id": "bethel_slayys",
        "nickname": "Bethel",
        "avatar_thumbnail": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/ff59b62dbc0f46b34639e408f841b02b~tplv-tiktokx-cropcenter:100:100.jpg",
        "mentions": [],
        "detailed_mentions": [],
        "replies": [
          {
            "video_web_url": "https://www.tiktok.com/@mrbeast/video/7606031409408478495",
            "submitted_video_url": "https://www.tiktok.com/@mrbeast/video/7606031409408478495",
            "input": "https://www.tiktok.com/@mrbeast/video/7606031409408478495",
            "video_id": "7606031409408478495",
            "cid": "7606097511056720661",
            "create_time": 1770932595,
            "create_time_iso": "2026-02-12T21:43:15.000Z",
            "text": "re u telling me u don't know his YouTube channel???",
            "digg_count": 2136,
            "liked_by_author": false,
            "pinned_by_author": false,
            "replies_to_id": "7606047946819388182",
            "reply_comment_total": 0,
            "uid": "7569614956049581112",
            "unique_id": "zha_bob",
            "nickname": "Bob",
            "avatar_thumbnail": "https://p16-common-sign.tiktokcdn.com/tos-alisg-avt-0068/3cb7c1199759fbe31a2d25e6ba0befc3~tplv-tiktokx-cropcenter:100:100.jpg",
            "mentions": [],
            "detailed_mentions": []
          }
        ]
      }
    ],
    "next_cursor": "tc1.eNqlkN1ugjAARt-ltyOjKIKQLJlWJ06ZA0GnN4afDiuWYql2YHz39QF2t7svOfnOxbkDClxwAxq4kVwt24IW7BsmdEw4NO2h6QwUk4ochagbV9ellM-ClIKVzxmj-ivlKU4aoas_Zvrff1L9U5ABdwA1oDSmpYEauIYGGuVkO3uyOEU57PFUz6fzL1S0R6ce0uxKxlFpT7dxMg4DIv0ya8ZPSKS3NJ5sK-Jt0H4ZMHz1MG93HeKTERkthIcRii6VXgx3pzS2kiambShaOvIvTL6v51EsR2wdhscUBcaKB3YqM_vcrc7ZD5HO_BsWSbRwSM0tiIrgRp4G_Tzj_VWMzI-u6BZc_5yHYlYVV-j333YV9XiWG3sCcdw57ZpFpTGFpc9RsN9Siy0Npzni2cnfDLz3GcSb1K--r8XLi0pyLoF7BzT5OXBcnwluDjXmB1WU4kqoNAZ4aEAN03B6vccvSnCZqA"
  }
}
```

## Response fields

| Field | Type | Example | Description |
|---|---|---|---|
| `manual_video_urls` | string | `https://www.tiktok.com/@mrbeast/video/7606031…` |  |
| `page` | integer | `1` |  |
| `page_size` | integer | `50` |  |
| `video_id` | string | `7606031409408478495` |  |
| `total_comments` | integer | `41922` |  |
| `comments` | array | `[1 item]` | The results. |
| `next_cursor` | string | `tc1.eNqlkN1ugjAARt-ltyOjKIKQLJlWJ06ZA0GnN4afD…` | Pass back as `cursor` for the next page. `null` on the last page. |
| `comments[].video_web_url` | string | `https://www.tiktok.com/@mrbeast/video/7606031…` |  |
| `comments[].submitted_video_url` | string | `https://www.tiktok.com/@mrbeast/video/7606031…` |  |
| `comments[].input` | string | `https://www.tiktok.com/@mrbeast/video/7606031…` |  |
| `comments[].video_id` | string | `7606031409408478495` |  |
| `comments[].cid` | string | `7606047946819388182` |  |
| `comments[].create_time` | integer | `1770921048` |  |
| `comments[].create_time_iso` | string | `2026-02-12T18:30:48.000Z` |  |
| `comments[].text` | string | `Mr beast should start a YouTube channel` |  |
| `comments[].digg_count` | integer | `47954` |  |
| `comments[].liked_by_author` | boolean | `false` |  |
| `comments[].pinned_by_author` | boolean | `false` |  |
| `comments[].replies_to_id` | null | `null` |  |
| `comments[].reply_comment_total` | integer | `340` |  |
| `comments[].uid` | string | `7496601188525212704` |  |
| `comments[].unique_id` | string | `bethel_slayys` |  |
| `comments[].nickname` | string | `Bethel` |  |
| `comments[].avatar_thumbnail` | string | `https://p16-common-sign.tiktokcdn.com/tos-mal…` |  |
| `comments[].mentions` | array | `[]` |  |
| `comments[].detailed_mentions` | array | `[]` |  |
| `comments[].replies` | array | `[1 item]` |  |

## Pagination

Pass `data.next_cursor` back as `cursor` until it is `null`. Required inputs are ignored once a cursor is sent. Each page is one billed call.

```python
import requests

URL = "https://api.scrapier.io/api/v2/tiktok-comments/"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
params = {}
items = []

for _ in range(10):  # each page is one billed call
    resp = requests.get(URL, headers=HEADERS, params=params, timeout=210)
    resp.raise_for_status()
    data = resp.json()["data"]
    items.extend(data.get("comments") or [])
    if not data.get("next_cursor"):  # None = last page
        break
    params = {"cursor": data["next_cursor"]}
```

## Errors

Failed calls are free. Branch on HTTP status; the message is in `error` (or `detail`). See https://docs.scrapier.io/errors.md

- **400** Bad input. The exact message varies by endpoint. `{"success":false,"error":"…"}`
- **402** Balance below the endpoint's price. `{"error":"Insufficient credits. Buy more to scrape more.","balance":1,"required":2}`
- **403** Invalid or unknown API key. `{"detail":"Authentication service unavailable or invalid API key."}`
- **429** Throttled — wait for Retry-After. `{"detail":"Request was throttled. Expected available in N seconds."}`
- **404** unknown slug · **503** busy (retry after `Retry-After`) · **5xx** upstream failure or timeout (retry with backoff).

## Notes

- Nothing special: send the inputs, read the result.

## Related

- [TikTok Ad Library Leads](https://docs.scrapier.io/api-reference/tiktok/tiktok-ad-library-leads.md): Structured TikTok data: every input is optional. Single lookup, 3 credits per successful call.
- [TikTok Ad Library](https://docs.scrapier.io/api-reference/tiktok/tiktok-ads.md): Structured TikTok data: send `urls`. Cursor-paginated, 1 credit per successful call.
- [TikTok Ads Top](https://docs.scrapier.io/api-reference/tiktok/tiktok-ads-top.md): Structured TikTok data: every input is optional. Cursor-paginated, 1 credit per successful call.
- [TikTok Collection Videos](https://docs.scrapier.io/api-reference/tiktok/tiktok-collection-videos.md): Structured TikTok data: send `urls`. Cursor-paginated, 1 credit per successful call.
