# TikTok Comments API

> Get the comments on a TikTok post and the replies to any comment, as JSON with author, text, time, like count and reply count. 1 credit per page.

**Get the comments on a TikTok post**, in TikTok's order, with author, text, time, like count and reply count, then **the replies to any comment**.

```
GET https://api.handlehaul.com/v1/tiktok/posts/{post}/comments
GET https://api.handlehaul.com/v1/tiktok/comments/{comment}/replies?post=
```

- `GET /v1/tiktok/posts/{post}/comments`: top-level comments (about 20 a page)
- `GET /v1/tiktok/comments/{comment}/replies?post=`: replies to one comment (about 3 a page; pass the post too)

**Cost:** 1 credit per page (free from cache). Failed calls are free. A post with comments turned off answers an empty page.

## Parameters

| Parameter | In | Description |
|---|---|---|
| `post` | path | comments: post id or URL-encoded tiktok.com post link. |
| `comment` | path | replies: the comment `id`. |
| `post` | query | replies: the post the comment belongs to (id or link). |
| `cursor` | query | `pagination.next_cursor` from the previous page. |
| `fresh` | query | `true` skips the cache. |
| `raw` | query | `true` returns TikTok's own JSON in `data`. |

## Response

```json
{
  "data": [
    {
      "id": "7300000000000010123",
      "text": "Sample comment 1",
      "created_at": "2026-11-30T00:53:20.000Z",
      "like_count": 50,
      "reply_count": 0,
      "author": {
        "id": "6801485827156468097",
        "sec_uid": "MS4wLjABAAAAv9cU4OWfsG8W8GpH25_ry1cATH53sVTiBeFOsovGJRQ",
        "handle": "aurora_cedar12",
        "nickname": "Aurora Cedar",
        "avatar_url": "https://p16-sign.tiktokcdn-us.com/…/avatar/6801485827156468097~c5_100x100.jpeg",
        "is_verified": false,
        "is_private": false,
        "url": "https://www.tiktok.com/@aurora_cedar12",
        "counts": null
      },
      "post_id": "7300000000000000123",
      "parent_id": null
    }
  ],
  "pagination": {
    "next_cursor": "eyJ2…sealed…",
    "has_more": true,
    "page_size": 20
  },
  "meta": {
    "request_id": "req_…",
    "cached": false,
    "cache_age_seconds": 0,
    "credits_charged": 1,
    "credits_remaining": 26943
  }
}
```

Only call replies when `reply_count` is above zero. On a reply, `parent_id` is the comment it answers. TikTok can repeat a few comments from one page on the next (we saw it in our checks): de-duplicate by `id` when you collect a whole thread.

## Examples

```bash
curl "https://api.handlehaul.com/v1/tiktok/posts/7300000000000000123/comments" -H "X-Api-Key: $HANDLEHAUL_API_KEY"
```

```python
import os, requests
r = requests.get("https://api.handlehaul.com/v1/tiktok/posts/7300000000000000123/comments",
                 headers={"X-Api-Key": os.environ["HANDLEHAUL_API_KEY"]}, timeout=60)
r.raise_for_status()
for c in r.json()["data"]:
    print(c["author"]["handle"], c["like_count"], c["text"])
```

```javascript
const res = await fetch("https://api.handlehaul.com/v1/tiktok/posts/7300000000000000123/comments", {
  headers: { "X-Api-Key": process.env.HANDLEHAUL_API_KEY },
});
const { data, meta } = await res.json();
```

```php
$ch = curl_init("https://api.handlehaul.com/v1/tiktok/posts/7300000000000000123/comments");
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["X-Api-Key: " . getenv("HANDLEHAUL_API_KEY")],
    CURLOPT_RETURNTRANSFER => true,
]);
$body = json_decode(curl_exec($ch), true);
print_r($body["data"]);
```

```go
req, _ := http.NewRequest("GET", "https://api.handlehaul.com/v1/tiktok/posts/7300000000000000123/comments", nil)
req.Header.Set("X-Api-Key", os.Getenv("HANDLEHAUL_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer res.Body.Close()
var body map[string]any
json.NewDecoder(res.Body).Decode(&body)
fmt.Println(body["data"])
```

## FAQ

### How do I scrape TikTok comments with an API?
Call `GET /v1/tiktok/posts/{post}/comments` and follow `pagination.next_cursor` while `has_more` is `true`.
