# TikTok comments viewer API

Read available public TikTok comments and export the current batch as CSV or JSON.

Canonical: https://fetchfox.net/docs/tiktok-comments-api

## Request

GET /tiktok/comments (query parameters) or POST /tiktok/comments (JSON). Authenticate with x-access-key. Keep keys server-side.

Credits: 1 credit per 50 returned comments, minimum 1 including verified empty results. Balance pre-check: 1 per 20 requested comments.

### curl

```
curl --fail-with-body --get 'https://api.fetchfox.net/tiktok/comments' \
  -H 'x-access-key: YOUR_KEY' \
  --data-urlencode 'url=https://www.tiktok.com/@creator/video/VIDEO_ID' \
  --data-urlencode 'limit=20'
```

### JavaScript

```
// Run on your server with FETCHFOX_API_KEY set.
const url = new URL('https://api.fetchfox.net/tiktok/comments');
url.searchParams.set('url', 'https://www.tiktok.com/@creator/video/VIDEO_ID');
url.searchParams.set('limit', '20');
const response = await fetch(url, {
  headers: { 'x-access-key': process.env.FETCHFOX_API_KEY },
  signal: AbortSignal.timeout(130000)
});
if (!response.ok) throw new Error('HTTP ' + response.status);
const result = await response.json();
if (!result.success) throw new Error('Request unsuccessful');
console.log(result.data);
```

### Python

```
import json, os
from urllib.parse import urlencode
from urllib.request import Request, urlopen

query = urlencode({"url":"https://www.tiktok.com/@creator/video/VIDEO_ID","limit":20})
request = Request('https://api.fetchfox.net/tiktok/comments?' + query,
    headers={'x-access-key': os.environ['FETCHFOX_API_KEY']})
with urlopen(request, timeout=130) as response:
    result = json.load(response)
if not result.get('success'):
    raise RuntimeError('Request unsuccessful')
print(result['data'])
```

## Inputs and limits

Requests up to 20 comments for 1 credit on success. Coverage can be partial; hidden comments and all replies are not included. Use REST or MCP with the returned cursor for further pages.

REST and MCP accept limits from 1 to 100, default 20. Browser viewers request 20. Each new request is billed separately; downloading a current browser result does not make another request.

## Interpret source fields

data.comments returns available text and author fields. Numeric IDs stay strings; do not coerce them to spreadsheet numbers. Unknown likes, reply counts and dates stay null. Collection status describes the available sample, not complete coverage.

TikTok dates are UTC ISO timestamps when the source supplies a creation time. Continue only when hasMore=true with its unchanged opaque cursor and the same video. Reordered source pages or stale cursors can fail rather than skip unseen comments.

## Related pages

- https://fetchfox.net/tools/tiktok-comments-viewer

- https://fetchfox.net/docs

- https://fetchfox.net/pricing

