The TikTok connector pulls structured public data from TikTok across four verbs: **scrape** (videos), **comments**, **user search** (accounts), and **trending**. Every verb returns `{ "items": [...] }` and is billed per returned item; surfaced errors (an `errorCode` field, e.g. a withheld feed) are never charged.
Give it URLs (a video, a profile, a hashtag, or a search page) and/or profiles, hashtags, or search terms; returns videos (caption, author, play/like/comment/share counts, music, hashtags, timestamps, and the web URL). At least one of `urls`, `profiles`, `hashtags`, or `search_queries` is required.
Video and hashtag targets are the reliable video paths. A `profiles` target returns the account's **metadata** (name, followers, bio, verification) reliably, but TikTok often withholds its **video list** from automated clients — so a profile can return metadata with no videos. Keyword **video** search is login-walled and returns a surfaced error; to find accounts by keyword use **user search** below.
POST /api/v1/workspaces/{workspace_id}/scrapers/tiktok/comments
```
Given TikTok video URLs, returns each video's public comment thread: comment text, author, like count, and reply count (replies carry `repliesToId`, the parent comment id).
| Field | Default | Description |
|-------|---------|-------------|
| `video_urls` | — | TikTok video URLs (`/@<user>/video/<id>`), max 20 per call |
| `comments_per_video` | `20` | Max comments per video |
| `max_items` | `20` | Max total comments returned (hard cap 100) |
```bash
curl -X POST "$BASE_URL/api/v1/workspaces/1/scrapers/tiktok/comments" \
POST /api/v1/workspaces/{workspace_id}/scrapers/tiktok/trending
```
Returns the current trending videos from TikTok's Explore feed — no input needed beyond how many to return. Items use the same video shape as **scrape** and bill on the same per-video meter.
| Field | Default | Description |
|-------|---------|-------------|
| `max_items` | `20` | Max trending videos returned (hard cap 100) |
```bash
curl -X POST "$BASE_URL/api/v1/workspaces/1/scrapers/tiktok/trending" \
-H "Authorization: Bearer $SURFSENSE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "max_items": 30 }'
```
For the full input and output JSON schemas and generated code snippets in your language, open **API Playground → TikTok** in your workspace.