# Tiktok — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Retrieve detailed information about any public TikTok video including captions, media URLs, view counts, likes, and shares, plus access all comments posted on that video. Perfect for analyzing trending content, monitoring video performance, or building applications that need TikTok video data.

**Category:** Social Media | **Website:** [www.tiktok.com/@lilireinhart/video/7517409255914212638](https://www.tiktok.com/@lilireinhart/video/7517409255914212638) | **Docs:** [parse.bot/marketplace/2e2bd45f-cc23-45f4-a5e7-42b98de5d21c/tiktok-com-api](https://parse.bot/marketplace/2e2bd45f-cc23-45f4-a5e7-42b98de5d21c/tiktok-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-tiktok-com-api-2e2bd45f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_comment_replies

Get replies to a specific comment on a TikTok video with cursor-based pagination. Accepts a full TikTok video URL (or numeric video ID) and a comment_id from get_comments results. Returns replies sorted by relevance, each including reply_to_comment_id (the parent comment) and reply_to_reply_id (the specific reply being responded to, or '0' for direct replies to the parent). Use the returned cursor value to fetch subsequent pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `comment_id` | string | Yes | ID of the comment to fetch replies for, from get_comments results |
| `count` | integer | No | Number of replies to return per page, maximum 50. |
| `cursor` | integer | No | Pagination cursor. Use the cursor value from a previous response to fetch the next page of replies. |
| `url` | string | Yes | TikTok video URL (e.g. https://www.tiktok.com/@user/video/1234567890) or numeric video ID |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tiktok-com-api-2e2bd45f/get_comment_replies \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"comment_id":"<string>","count":"<integer>","cursor":"<integer>","url":"<string>"}'
```

### get_comments

Get comments for a TikTok video with cursor-based pagination. Accepts either a full TikTok video URL or a numeric video ID. Returns comments sorted by relevance with user info, like counts, reply counts, and creator-liked labels. Use the returned cursor value to fetch subsequent pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `count` | integer | No | Number of comments to return per page, maximum 50. |
| `cursor` | integer | No | Pagination cursor. Use the cursor value from a previous response to fetch the next page of comments. |
| `url` | string | Yes | TikTok video URL (e.g. https://www.tiktok.com/@user/video/1234567890) or numeric video ID |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tiktok-com-api-2e2bd45f/get_comments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"count":"<integer>","cursor":"<integer>","url":"<string>"}'
```

### get_post_details

Get video details including caption, media URL, author info, engagement stats, and metadata for a public TikTok video. Requires a full TikTok video URL including the username path (e.g. https://www.tiktok.com/@username/video/VIDEO_ID). Returns a single Video resource with nested author, stats, and music objects. The media_url is a time-limited signed playback URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full TikTok video URL in the format https://www.tiktok.com/@username/video/VIDEO_ID |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tiktok-com-api-2e2bd45f/get_post_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_profile_details

Get public profile information for a TikTok user by username. Returns display name, bio, avatar URL, follower/following/like/video counts, verified status, and bio link. Requires one page load per call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `username` | string | Yes | TikTok username (e.g. 'lilireinhart' or '@lilireinhart'). Leading @ is stripped automatically. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tiktok-com-api-2e2bd45f/get_profile_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"<string>"}'
```
