# TikTok Scraper: Videos, Profiles, Comments, Search & Trends (`scrapysocial/tiktok-scraper`) Actor

Scrape TikTok profiles, videos, reposts, followers, comments and replies, search (videos, photos, users, lives, music), hashtags, sounds, places and Creator trends. Real-time, no login, clean JSON. Pay only for results.

- **URL**: https://apify.com/scrapysocial/tiktok-scraper.md
- **Developed by:** [Scrapy Social](https://apify.com/scrapysocial) (community)
- **Categories:** Social media, Videos, Lead generation
- **Features:** Limited permissions
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## TikTok Scraper: Videos, Profiles, Comments, Search & Trends

Every public TikTok surface (profiles, videos, comments, search tabs, hashtags, sounds, places, lives and Creator trends) as the same clean JSON, with automatic pagination.

**33 endpoints** · real-time data · no TikTok account or cookies needed · automatic pagination · batch input · pay only for results ($2.50 / 1,000 results, down to $1.40 on higher Apify plans).

### What can this scraper do?

- **User**: Get user info, Get user posts, Get user reposts, Get user followers, Get user followings, Get similar users, Get user playlists, Get user collections, Get user stories
- **Post**: Get post detail, Get post comments, Get comment replies
- **Search**: Search top results, Search videos, Search photo posts, Search users, Search live streams, Search autocomplete, Related keywords, Search music
- **Hashtag**: Search hashtags, Get hashtag info, Get hashtag posts
- **Music**: Get music info, Get music posts
- **Place**: Get place info, Search places, Get place posts
- **Live**: Get user live room
- **Trending**: Get trending topics, Get trending topic detail, Get trending videos, Get trending creators

### Use cases

- Trend discovery: trending videos, creators and topics by region and category.
- Keyword research: video, photo, user, live and music search plus autocomplete and related keywords.
- Creator analytics: profile stats, posts, reposts, playlists, followers and similar creators.
- Comment mining: comments and replies for any video.
- Sound and hashtag tracking: all videos using a sound or a hashtag.

### Why this scraper

- **Clean, consistent JSON.** The same fields (`id`, `author`, `stats`, `createdAt` …) across endpoints, so you write your parser once.
- **Real-time.** Every run fetches live data; nothing is served from a stale database.
- **No login, no blocking headaches.** Sessions, proxies, signatures and retries are handled for you.
- **Pagination built in.** Set *Max results per query*; the actor follows cursors for you and de-duplicates.
- **Batch mode.** Many usernames / posts / keywords in one run.
- **Fair billing.** Not-found lookups and failed calls are never charged.

### How to use it

1. Pick **What to scrape** (for example *Search videos*).
2. Fill the fields that endpoint uses (each field lists the endpoints that use it). Leave the others empty.
3. Set **Max results per query**, then click **Start**.
4. Download the results as JSON, CSV, Excel or HTML, or read them through the Apify API.

#### Input examples

**Search videos by keyword**

```json
{
  "endpoint": "search-videos",
  "keyword": "street food",
  "maxItems": 100
}
```

**A creator's latest videos**

```json
{
  "endpoint": "user-posts",
  "username": "khaby.lame",
  "maxItems": 100
}
```

**Comments on a video**

```json
{
  "endpoint": "post-comments",
  "postId": "7704895406249053448",
  "maxItems": 200
}
```

**Trending videos**

```json
{
  "endpoint": "trending-videos",
  "region": "All",
  "maxItems": 50
}
```

**Several profiles in one run (batch)**

```json
{
  "endpoint": "user-info",
  "batch": [
    {
      "username": "khaby.lame"
    },
    {
      "username": "mrbeast"
    },
    {
      "username": "akuratco"
    }
  ],
  "maxItems": 50
}
```

### Output

Each result is one dataset row. List endpoints produce one row per item; lookups produce one row. Every row has a `_meta` object (endpoint, query, page, scrapedAt). Trend lists and similar responses also carry the list's own fields under `_context`. Example row from **Search videos**:

```json
{
  "id": "7704895406249053448",
  "description": "Roy Suryo tertawa saat Presiden ke-7 RI, Joko Widodo atau Jokowi, menunjukkan kumpulan ijazahnya sejak SD hingga S1 ke hadapan pengunjung sidang di Pengadila...",
  "createTime": 1793935774,
  "isAd": false,
  "language": "id",
  "author": {
    "id": "6784257336300258305",
    "username": "akuratco",
    "nickname": "Akurat.co",
    "secUid": "MS4wLjABAAAAB3EX4Laova1w729kR_iMJIWjylkbcoA3knfEQqOMI0yohXeh7UxJs-MaHiD1qFNN",
    "avatar": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e436ca27e79769c87dd5efa322af8cff?…",
    "verified": true,
    "privateAccount": false
  },
  "stats": {
    "plays": 1500000,
    "likes": 43700,
    "comments": 2256,
    "shares": 3131,
    "saves": 2820
  },
  "video": {
    "duration": 44,
    "width": 576,
    "height": 1024,
    "definition": "540p",
    "cover": "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0037/ocuBsjogiXaCIZiw19pAaSqfzT5IAHCdtIA?…",
    "originCover": "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0037/ooatHpwdfAI8NTrqBBI1bZAsSiAuiCWRzqD?…",
    "dynamicCover": "https://p16-common-sign.tiktokcdn.com/tos-alisg-p-0037/o8fHRpZ7q1bSIwi8SaRizCtBAwxsdIItT5u?…",
    "playUrl": "https://v16-webapp-prime.tiktok.com/video/tos/alisg/tos-alisg-pve-0037c001/ocdAsAiqakBBITw?…",
    "downloadUrl": "https://v16-webapp-prime.tiktok.com/video/tos/alisg/tos-alisg-pve-0037c001/o8ItEQAkIaadAWB?…"
  },
  "music": {
    "id": "7704895539206785812",
    "title": "suara asli - Akurat.co",
    "author": "Akurat.co",
    "duration": 44,
    "original": true,
    "cover": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e436ca27e79769c87dd5efa322af8cff?…",
    "playUrl": "https://v16-webapp-prime.tiktok.com/video/tos/alisg/tos-alisg-v-27dcd7/oACu6iATNtcavAABDEs?…"
  },
  "hashtags": [
    "viral",
    "jokowi"
  ],
  "_meta": {
    "endpoint": "search-videos",
    "query": {
      "keyword": "street food"
    },
    "page": 1,
    "scrapedAt": "2026-11-11T08:00:00.000Z"
  }
}
```

A run summary (results, pages, not found, failed, stop reason) is saved to the key-value store as `OUTPUT`.

### Endpoints

| Group | Endpoint (`endpoint` value) | What you get | Paginated |
|---|---|---|---|
| User | Get user info (`user-info`) | Profile and statistics of a TikTok user by username or secUid. |  |
| User | Get user posts (`user-posts`) | Videos and photo posts published by a user, newest first, with pagination. | yes |
| User | Get user reposts (`user-reposts`) | Posts a user has reposted, with pagination. | yes |
| User | Get user followers (`user-followers`) | Accounts following a user, with pagination. | yes |
| User | Get user followings (`user-followings`) | Accounts a user follows, with pagination. | yes |
| User | Get similar users (`user-similar`) | Accounts TikTok suggests as similar to a user. |  |
| User | Get user playlists (`user-playlists`) | Public playlists (mixes) created by a user. | yes |
| User | Get user collections (`user-collections`) | Public favorite collections of a user. | yes |
| User | Get user stories (`user-stories`) | Active stories of a user (last 24 hours). | yes |
| Post | Get post detail (`post-detail`) | Full detail of one video or photo post by id. |  |
| Post | Get post comments (`post-comments`) | Top-level comments of a post, with pagination. | yes |
| Post | Get comment replies (`post-comment-replies`) | Replies to one comment, with pagination. | yes |
| Search | Search top results (`search-top`) | TikTok "Top" search: best-matching posts for a keyword. | yes |
| Search | Search videos (`search-videos`) | Search TikTok videos by keyword. | yes |
| Search | Search photo posts (`search-photos`) | Search TikTok photo carousels by keyword. | yes |
| Search | Search users (`search-users`) | Search TikTok accounts by keyword. | yes |
| Search | Search live streams (`search-lives`) | Live streams currently on air for a keyword. |  |
| Search | Search autocomplete (`search-autocomplete`) | Keyword autocomplete suggestions as the user types. |  |
| Search | Related keywords (`search-related-keywords`) | Keywords TikTok suggests next to a search ("Others searched for"). |  |
| Search | Search music (`search-music`) | Search TikTok sounds by keyword. | yes |
| Hashtag | Search hashtags (`hashtag-search`) | Search TikTok hashtags by keyword. |  |
| Hashtag | Get hashtag info (`hashtag-info`) | Details and total views / video count of a TikTok hashtag. |  |
| Hashtag | Get hashtag posts (`hashtag-posts`) | Top posts that use a hashtag, with pagination. | yes |
| Music | Get music info (`music-info`) | Details of a TikTok sound: title, artist, duration, audio URL and number of videos. |  |
| Music | Get music posts (`music-posts`) | Posts that use a given sound, with pagination. | yes |
| Place | Get place info (`place-info`) | Details of a TikTok place (POI): name, address, category and video count. |  |
| Place | Search places (`place-search`) | Search TikTok places (POI) by keyword. | yes |
| Place | Get place posts (`place-posts`) | Posts tagged at a TikTok place, with pagination. | yes |
| Live | Get user live room (`user-live`) | Get a user's current live room, or 404 if they are offline. |  |
| Trending | Get trending topics (`trending-topics`) | Topics trending on TikTok right now by country and category, with trend score history. | yes |
| Trending | Get trending topic detail (`trending-topic-detail`) | One trending topic with its score history and the videos driving it. | yes |
| Trending | Get trending videos (`trending-videos`) | Videos trending on TikTok by country and category. | yes |
| Trending | Get trending creators (`trending-creators`) | Fast-growing TikTok creators by country and category, with recent videos. | yes |

#### Endpoint reference

##### User

###### Get user info · `user-info`

Returns the public profile of a TikTok account: ids (`id`, `secUid`), nickname, bio, avatar, verification, privacy flag, TikTok Shop seller flag and counters (followers, following, likes, videos). Send either `username` (handle without @) or `secUid`. The returned `secUid` is required by every other user endpoint.

| Field | Required | Description |
|---|---|---|
| `username` |  | TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`. |
| `secUid` |  | TikTok secure user id (`MS4wLjABAAAA…`). Optional — send `username` instead if you do not have it. |

###### Get user posts · `user-posts`

Lists the posts of a user (videos and photo carousels) with caption, stats, video/cover URLs, music and hashtags. Pagination: pass `cursor` from the previous response while `hasMore` is true. Media URLs are signed by TikTok and expire after a few hours. Identify the user with `username` (easiest) or `secUid`. When only `username` is sent, the API resolves the internal id for you (cached for 24 h).

| Field | Required | Description |
|---|---|---|
| `username` |  | TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`. |
| `secUid` |  | TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster). |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

###### Get user reposts · `user-reposts`

Lists posts that the user reposted to their profile. Same post object as **Get user posts**. Paginate with `cursor` while `hasMore` is true. Identify the user with `username` (easiest) or `secUid`. When only `username` is sent, the API resolves the internal id for you (cached for 24 h).

| Field | Required | Description |
|---|---|---|
| `username` |  | TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`. |
| `secUid` |  | TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster). |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

###### Get user followers · `user-followers`

Lists followers of a user with profile summary and counters. Only available when the account's follower list is public. Paginate with `minCursor` while `hasMore` is true. Identify the user with `username` (easiest) or `secUid`. When only `username` is sent, the API resolves the internal id for you (cached for 24 h).

| Field | Required | Description |
|---|---|---|
| `username` |  | TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`. |
| `secUid` |  | TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster). |
| `count` |  | Items per page. |
| `minCursor` |  | Pagination cursor. Use `minCursor` from the previous response; omit for the first page. |

###### Get user followings · `user-followings`

Lists the accounts a user follows with profile summary and counters. Only available when the following list is public. Paginate with `minCursor` while `hasMore` is true. Identify the user with `username` (easiest) or `secUid`. When only `username` is sent, the API resolves the internal id for you (cached for 24 h).

| Field | Required | Description |
|---|---|---|
| `username` |  | TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`. |
| `secUid` |  | TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster). |
| `count` |  | Items per page. |
| `minCursor` |  | Pagination cursor. Use `minCursor` from the previous response; omit for the first page. |

###### Get similar users · `user-similar`

Returns the "You may like" accounts TikTok shows on a profile — useful for creator discovery and look-alike audiences. Identify the user with `username` (easiest), `secUid` or `userId`. When only `username` is sent, the API resolves the internal id for you (cached for 24 h).

| Field | Required | Description |
|---|---|---|
| `username` |  | TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`. |
| `secUid` |  | TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster). |
| `userId` |  | Numeric TikTok user id (`id` in **User Info**). Optional — leave empty and send `username` or `secUid`; it is looked up automatically. |
| `count` |  | Items per page. |

###### Get user playlists · `user-playlists`

Lists the public playlists of a user. Each playlist is returned as TikTok provides it (id, name, cover, video count). Paginate with `cursor` while `hasMore` is true. Identify the user with `username` (easiest) or `secUid`. When only `username` is sent, the API resolves the internal id for you (cached for 24 h).

| Field | Required | Description |
|---|---|---|
| `username` |  | TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`. |
| `secUid` |  | TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster). |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

###### Get user collections · `user-collections`

Lists the public favorite collections of a user (as returned by TikTok). Empty when the user keeps collections private. Paginate with `cursor` while `hasMore` is true. Identify the user with `username` (easiest) or `secUid`. When only `username` is sent, the API resolves the internal id for you (cached for 24 h).

| Field | Required | Description |
|---|---|---|
| `username` |  | TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`. |
| `secUid` |  | TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster). |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

###### Get user stories · `user-stories`

Returns the user's active stories exactly as TikTok provides them (`ItemList`, cursors and counters). Empty when the user has no active story. Identify the user with `username` (easiest), `secUid` or `userId`. When only `username` is sent, the API resolves the internal id for you (cached for 24 h).

| Field | Required | Description |
|---|---|---|
| `username` |  | TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`. |
| `secUid` |  | TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster). |
| `userId` |  | Numeric TikTok user id (`id` in **User Info**). Optional — leave empty and send `username` or `secUid`; it is looked up automatically. |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

##### Post

###### Get post detail · `post-detail`

Returns one post: caption, author, statistics (plays, likes, comments, shares, saves), video metadata with play/download URLs, photo-carousel image URLs, music and hashtags. Responds 404 when the post is deleted or private.

| Field | Required | Description |
|---|---|---|
| `postId` | yes | Video / photo post id (the number in `tiktok.com/@user/video/<postId>`). |

###### Get post comments · `post-comments`

Lists comments of a video or photo post with text, likes, reply count, attached images and the commenter. Paginate with `cursor` while `hasMore` is 1. `total` is TikTok's comment count.

| Field | Required | Description |
|---|---|---|
| `postId` | yes | Video / photo post id (the number in `tiktok.com/@user/video/<postId>`). |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

###### Get comment replies · `post-comment-replies`

Lists replies under a comment. Use `id` of a comment from **Get post comments** as `commentId`. Paginate with `cursor` while `hasMore` is 1.

| Field | Required | Description |
|---|---|---|
| `postId` | yes | Video / photo post id (the number in `tiktok.com/@user/video/<postId>`). |
| `commentId` | yes | Comment id (`comments[].id` from **Get post comments**). |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

##### Search

###### Search top results · `search-top`

Returns the posts shown in TikTok's **Top** search tab (live-room cards are skipped). Paginate with `cursor` (offset) while `hasMore` is 1 and send back `searchId` for stable ordering.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Search keyword. |
| `count` |  | Items per page. |
| `cursor` |  | Result offset. Use `cursor` from the previous response; omit for the first page. |
| `searchId` |  | `searchId` returned by the previous page. Optional — send it together with `cursor` for consistent pagination; leave empty on the first page. |

###### Search videos · `search-videos`

Returns posts from TikTok's **Videos** search tab with caption, author, stats, media URLs, music and hashtags. Paginate with `cursor` (offset) while `hasMore` is 1 and send back `searchId` for stable ordering.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Search keyword. |
| `count` |  | Items per page. |
| `cursor` |  | Result offset. Use `cursor` from the previous response; omit for the first page. |
| `searchId` |  | `searchId` returned by the previous page. Optional — send it together with `cursor` for consistent pagination; leave empty on the first page. |

###### Search photo posts · `search-photos`

Returns photo (carousel) posts from TikTok's **Photos** search tab; `images` holds the image URLs. Paginate with `cursor` (offset) while `hasMore` is 1 and send back `searchId` for stable ordering.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Search keyword. |
| `count` |  | Items per page. |
| `cursor` |  | Result offset. Use `cursor` from the previous response; omit for the first page. |
| `searchId` |  | `searchId` returned by the previous page. Optional — send it together with `cursor` for consistent pagination; leave empty on the first page. |

###### Search users · `search-users`

Returns accounts from TikTok's **Users** search tab with handle, nickname, bio, avatar, followers and total likes. Paginate with `cursor` (offset) while `hasMore` is 1 and send back `searchId` for stable ordering.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Search keyword. |
| `count` |  | Items per page. |
| `cursor` |  | Result offset. Use `cursor` from the previous response; omit for the first page. |
| `searchId` |  | `searchId` returned by the previous page. Optional — send it together with `cursor` for consistent pagination; leave empty on the first page. |

###### Search live streams · `search-lives`

Returns live rooms matching the keyword with title, viewer count, likes, start time, host and pull URLs (FLV / HLS). Single page.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Search keyword. |

###### Search autocomplete · `search-autocomplete`

Returns TikTok's search-box suggestions for a partial keyword — great for keyword research and SEO tools.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Partial keyword typed by the user. |

###### Related keywords · `search-related-keywords`

Returns related search terms TikTok recommends for a keyword. Useful for trend and keyword discovery.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Search keyword. |
| `count` |  | Items per page. |

###### Search music · `search-music`

Returns sounds from TikTok's **Sounds** search tab with title, artist, duration, cover, play URL and video count. Paginate with `cursor` while `hasMore` is true.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Search keyword. |
| `count` |  | Items per page. |
| `cursor` |  | Result offset. Use `cursor` from the previous response; omit for the first page. |

##### Hashtag

###### Search hashtags · `hashtag-search`

Suggests hashtags matching a keyword with view count and use count. The returned `id` (`cid`) is the `hashtagId` for `/hashtag/info` and `/hashtag/posts`; `name` is the hashtag without #.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Hashtag search keyword (with or without #). |

###### Get hashtag info · `hashtag-info`

Returns the hashtag id, name, description, cover and statistics (total videos and views, as exact strings because they exceed 32-bit integers). The returned `id` can be passed as `hashtagId` to **Hashtag → Get hashtag posts**.

| Field | Required | Description |
|---|---|---|
| `hashtag` |  | Hashtag name without # (e.g. `fyp`). Send this **or** `hashtagId`. |

###### Get hashtag posts · `hashtag-posts`

Lists posts tagged with a hashtag (videos and photo carousels) in TikTok's ranking order, using the same post object as every other endpoint. Identify the hashtag with `hashtag` (name) or `hashtagId`. When only the name is sent, the id is looked up automatically (cached for 24 h). Pagination: pass `cursor` from the previous response while `hasMore` is true.

| Field | Required | Description |
|---|---|---|
| `hashtag` |  | Hashtag name without # (e.g. `fyp`). Send this **or** `hashtagId`. |
| `hashtagId` |  | Numeric hashtag id (`id` from **Get hashtag info**). Optional — leave empty and send `hashtag`. |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

##### Music

###### Get music info · `music-info`

Returns a sound (music) with title, author, album, duration, original/copyright flags, cover, audio URL, the number of videos using it and the linked artist accounts.

| Field | Required | Description |
|---|---|---|
| `musicId` | yes | TikTok sound id — the number at the end of a sound URL (`tiktok.com/music/Glow-7467591415728801793`) or `music.id` of any post. |

###### Get music posts · `music-posts`

Lists posts that use a sound, with the same post object as every other endpoint. Pagination: pass `cursor` from the previous response while `hasMore` is true.

| Field | Required | Description |
|---|---|---|
| `musicId` | yes | TikTok sound id — the number at the end of a sound URL (`tiktok.com/music/Glow-7467591415728801793`) or `music.id` of any post. |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

##### Place

###### Get place info · `place-info`

Returns a place of interest used in TikTok location tags: id, name, address, city, category hierarchy, rating summary and number of videos tagged there. Identify the place with `placeId` (the numeric id from a place URL or from `place.id` on a post).

| Field | Required | Description |
|---|---|---|
| `placeId` | yes | TikTok place (POI) id — numeric string from a place URL or from `place.id` on a post. |

###### Search places · `place-search`

Search places of interest used as TikTok location tags. Returns id, name, address, category, latitude and longitude. Paginate with `page` while `hasMore` is true. The returned `id` is the `placeId` for `/place/info` and `/place/posts`.

| Field | Required | Description |
|---|---|---|
| `keyword` | yes | Place search keyword (city, venue, address fragment). |
| `count` |  | Results per page. |
| `page` |  | Page number (1-based). Use the next page while `hasMore` is true. |

###### Get place posts · `place-posts`

Lists videos and photo posts tagged at a place (POI), using the same post object as every other endpoint. Pagination: pass `cursor` from the previous response while `hasMore` is true.

| Field | Required | Description |
|---|---|---|
| `placeId` | yes | TikTok place (POI) id. |
| `count` |  | Items per page. |
| `cursor` |  | Pagination cursor. Use `cursor` from the previous response; omit for the first page. |

##### Live

###### Get user live room · `user-live`

Returns the live room for a TikTok user identified by `username` (uniqueId), including host profile, room title, cover, start time and viewer counts. Responds with 404 NOT_FOUND when the user does not exist or is not currently live.

| Field | Required | Description |
|---|---|---|
| `username` | yes | TikTok handle without @. |

##### Trending

###### Get trending topics · `trending-topics`

Returns the trending topics TikTok shows creators in **TikTok Studio → Inspiration**, ranked, with plays, cover, score time-series and top videos per topic. Filter by `region` and `category`. Use a topic `id` (plus the returned `version`) with **Trending → Get trending topic detail**.

| Field | Required | Description |
|---|---|---|
| `region` |  | Market to read trends from (ISO country code) or `All`.Allowed: `All`, `US`, `JP`, `GB`, `DE`, `MX`, `CA`, `FR`, `KR`, `ID`, `BR`, `PH`, `AU`, `IT`, `ES`. |
| `category` |  | Content category.Allowed: `All`, `Entertainment`, `Beauty_Style`, `Performance`, `Sport & Outdoor`, `Society`, `Lifestyle`, `Auto_Vehicle`, `Talents`, `Nature`, `Culture_Education_Technology`, `Family_Relationship`, `Supernatural_Horror`. |
| `count` |  | Items per page. |
| `cursor` |  | Offset. Use `cursor` from the previous response. |

###### Get trending topic detail · `trending-topic-detail`

Returns a trending topic (title, rank, plays, score time-series) and the videos behind it, with pagination. Get `topicId`, `version`, `region` and `category` from **Trending → Get trending topics**.

| Field | Required | Description |
|---|---|---|
| `topicId` | yes | Topic `id` from **Get trending topics**. |
| `region` |  | Region of the topic (`region` used in **Get trending topics**, a country code).Allowed: `All`, `US`, `JP`, `GB`, `DE`, `MX`, `CA`, `FR`, `KR`, `ID`, `BR`, `PH`, `AU`, `IT`, `ES`. |
| `category` |  | Category of the topic.Allowed: `All`, `Entertainment`, `Beauty_Style`, `Performance`, `Sport & Outdoor`, `Society`, `Lifestyle`, `Auto_Vehicle`, `Talents`, `Nature`, `Culture_Education_Technology`, `Family_Relationship`, `Supernatural_Horror`. |
| `version` |  | `version` returned by **Get trending topics** (snapshot id). Optional. |
| `count` |  | Items per page. |
| `cursor` |  | Offset. Use `cursor` from the previous response. |

###### Get trending videos · `trending-videos`

Returns the trending videos list from **TikTok Studio → Inspiration** with plays, likes, cover, play URL and author. Filter by `region` and `category`; paginate with `page`.

| Field | Required | Description |
|---|---|---|
| `region` |  | Market to read trends from (ISO country code) or `All`.Allowed: `All`, `US`, `JP`, `GB`, `DE`, `MX`, `CA`, `FR`, `KR`, `ID`, `BR`, `PH`, `AU`, `IT`, `ES`. |
| `category` |  | Content category.Allowed: `All`, `Entertainment`, `Beauty_Style`, `Performance`, `Sport & Outdoor`, `Society`, `Lifestyle`, `Auto_Vehicle`, `Talents`, `Nature`, `Culture_Education_Technology`, `Family_Relationship`, `Supernatural_Horror`. |
| `page` |  | Page number, starting at 0. Keep increasing while `hasMore` is true. |
| `count` |  | Items per page. |

###### Get trending creators · `trending-creators`

Returns trending creators from **TikTok Studio → Inspiration**: profile, follower count, verification and their latest videos. Filter by `region` and `category`; paginate with `page`.

| Field | Required | Description |
|---|---|---|
| `region` |  | Market to read trends from (ISO country code) or `All`.Allowed: `All`, `US`, `JP`, `GB`, `DE`, `MX`, `CA`, `FR`, `KR`, `ID`, `BR`, `PH`, `AU`, `IT`, `ES`. |
| `category` |  | Content category.Allowed: `All`, `Entertainment`, `Beauty_Style`, `Performance`, `Sport & Outdoor`, `Society`, `Lifestyle`, `Auto_Vehicle`, `Talents`, `Nature`, `Culture_Education_Technology`, `Family_Relationship`, `Supernatural_Horror`. |
| `page` |  | Page number, starting at 0. Keep increasing while `hasMore` is true. |
| `count` |  | Items per page. |

### Pagination, limits and batch

- **Max results per query** (`maxItems`) and **Max pages per query** (`maxPages`) bound each query; the actor stops at whichever comes first or when the source has no more pages.
- **Batch** (`batch`) runs the selected endpoint once per object, e.g. `[{"username":"a"},{"username":"b"}]`. Form fields act as defaults for every batch entry.
- **Parallel queries** (`concurrency`) controls how many batch entries run at once.
- To continue a previous run manually, pass the last `cursor` from the response (with *One row per result* off) as the `cursor` field.

### Pricing

This actor uses **pay per event** pricing: you pay for the results you get, not for compute time.

Higher Apify plans get an automatic Store discount:

| Apify plan | Per 1,000 results | Actor start |
|---|---|---|
| Free | $2.50 | $0.005 |
| Bronze | $2.10 | $0.004 |
| Silver | $1.80 | $0.003 |
| Gold | $1.40 | $0.0025 |
| Platinum | $1.40 | $0.0025 |
| Diamond | $1.40 | $0.0025 |

Example on the Free plan: 1,000 results in one run cost $2.505. Platform usage (compute, proxy, storage) is included; you pay only the events above. The start event is charged once per run at the default 512 MB memory.

Not-found lookups and failed calls are free. With *One row per result* off, a row holding a page of N items counts as N results.

Set **Maximum cost per run** in the run options to cap spending; the actor stops cleanly at that limit and keeps everything it already saved.

### Integrations and API

Run it from code with the Apify API or clients and get results as JSON:

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('<username>/tiktok-scraper').call({"endpoint":"search-videos","keyword":"street food","maxItems":100});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

It also works with schedules, webhooks, Make, Zapier, n8n, Google Sheets and every other Apify integration.

### FAQ

**Do I need a TikTok account, cookies or an API key?** No. Just pick an endpoint and run.

**Is scraping TikTok legal?** This actor only returns publicly available data. You are responsible for how you use it: respect privacy laws (GDPR, CCPA), the platform's terms, and do not collect personal data without a legitimate reason.

**Why did a query return nothing?** The account, post or keyword may not exist, may be private, or may have no public results. Those queries are reported in the `OUTPUT` summary as *not found* and are not charged.

**Can I get more than the maximum?** Raise *Max results per query* and *Max pages per query*. Very large pulls are best split with *Batch*.

**How fresh is the data?** Real time: each run reads the platform at that moment.

### Changelog and support

See the **Changelog** tab. Found a bug or need a field or endpoint? Open an issue in the **Issues** tab; we usually reply within a day.

# Changelog

This Actor's version history is a separate document: https://apify.com/scrapysocial/tiktok-scraper/changelog.md

# Actor input Schema

## `endpoint` (type: `string`):

Pick the TikTok data you want. Then fill only the fields that endpoint uses (each field says which endpoints use it). Full list with descriptions: see the README tab.

## `username` (type: `string`):

TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`.<br><br><b>Used by:</b> Get user info, Get user posts, Get user reposts, Get user followers, Get user followings, Get similar users +4 more. <b>Required by:</b> Get user live room. <b>Example:</b> <code>akuratco</code>

## `secUid` (type: `string`):

TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster).<br><br><b>Used by:</b> Get user info, Get user posts, Get user reposts, Get user followers, Get user followings, Get similar users +3 more.

## `count` (type: `integer`):

Results per page.<br><br><b>Used by:</b> Get user posts, Get user reposts, Get user followers, Get user followings, Get similar users, Get user playlists +18 more. <b>Example:</b> <code>12</code>

## `cursor` (type: `string`):

Pagination cursor. Use `cursor` from the previous response; omit for the first page.<br><br><b>Used by:</b> Get user posts, Get user reposts, Get user playlists, Get user collections, Get user stories, Get post comments +11 more. <b>Example:</b> <code>0</code>

## `minCursor` (type: `string`):

Pagination cursor. Use `minCursor` from the previous response; omit for the first page.<br><br><b>Used by:</b> Get user followers, Get user followings. <b>Example:</b> <code>0</code>

## `userId` (type: `string`):

Numeric TikTok user id (`id` in **User Info**). Optional — leave empty and send `username` or `secUid`; it is looked up automatically.<br><br><b>Used by:</b> Get similar users, Get user stories.

## `postId` (type: `string`):

Video / photo post id (the number in `tiktok.com/@user/video/<postId>`).<br><br><b>Used by:</b> Get post detail, Get post comments, Get comment replies. <b>Required by:</b> Get post detail, Get post comments, Get comment replies. <b>Example:</b> <code>7704895406249053448</code>

## `commentId` (type: `string`):

Comment id (`comments[].id` from **Get post comments**).<br><br><b>Used by:</b> Get comment replies. <b>Required by:</b> Get comment replies. <b>Example:</b> <code>7704905156580066055</code>

## `keyword` (type: `string`):

Place search keyword (city, venue, address fragment).<br><br><b>Used by:</b> Search top results, Search videos, Search photo posts, Search users, Search live streams, Search autocomplete +4 more. <b>Required by:</b> Search top results, Search videos, Search photo posts, Search users, Search live streams, Search autocomplete …. <b>Example:</b> <code>street food</code>

## `searchId` (type: `string`):

`searchId` returned by the previous page. Optional — send it together with `cursor` for consistent pagination; leave empty on the first page.<br><br><b>Used by:</b> Search top results, Search videos, Search photo posts, Search users.

## `hashtag` (type: `string`):

Hashtag name without # (e.g. `fyp`). Send this **or** `hashtagId`.<br><br><b>Used by:</b> Get hashtag info, Get hashtag posts. <b>Example:</b> <code>fyppp</code>

## `hashtagId` (type: `string`):

Numeric hashtag id (`id` from **Get hashtag info**). Optional — leave empty and send `hashtag`.<br><br><b>Used by:</b> Get hashtag posts.

## `musicId` (type: `string`):

TikTok sound id — the number at the end of a sound URL (`tiktok.com/music/Glow-7467591415728801793`) or `music.id` of any post.<br><br><b>Used by:</b> Get music info, Get music posts. <b>Required by:</b> Get music info, Get music posts. <b>Example:</b> <code>7467591415728801793</code>

## `placeId` (type: `string`):

TikTok place (POI) id — numeric string from a place URL or from `place.id` on a post.<br><br><b>Used by:</b> Get place info, Get place posts. <b>Required by:</b> Get place info, Get place posts. <b>Example:</b> <code>21568226335370744</code>

## `page` (type: `integer`):

Page number, starting at 0. Keep increasing while `hasMore` is true.<br><br><b>Used by:</b> Search places, Get trending videos, Get trending creators. <b>Example:</b> <code>1</code>

## `region` (type: `string`):

Region of the topic (`region` used in **Get trending topics**, a country code).<br><br><b>Used by:</b> Get trending topics, Get trending topic detail, Get trending videos, Get trending creators.

## `category` (type: `string`):

Category of the topic.<br><br><b>Used by:</b> Get trending topics, Get trending topic detail, Get trending videos, Get trending creators.

## `topicId` (type: `string`):

Topic `id` from **Get trending topics**.<br><br><b>Used by:</b> Get trending topic detail. <b>Required by:</b> Get trending topic detail.

## `version` (type: `string`):

`version` returned by **Get trending topics** (snapshot id). Optional.<br><br><b>Used by:</b> Get trending topic detail.

## `maxItems` (type: `integer`):

Stop paginating a query after this many results. Each saved result is one billable "result-item" event.

## `maxPages` (type: `integer`):

Upper bound on API pages fetched per query (a page is usually 10–50 results).

## `batch` (type: `array`):

Optional JSON array. Each object is one query for the selected endpoint; its keys override the form fields above. Example: <code>\[{"username":"khaby.lame"},{"username":"mrbeast"}]</code>

## `splitItems` (type: `boolean`):

On (recommended): every post/user/comment is its own dataset row. Off: one row per API page (the list stays nested). Billing is per result either way.

## `concurrency` (type: `integer`):

How many batch queries run at the same time.

## Actor input object example

```json
{
  "endpoint": "search-videos",
  "username": "akuratco",
  "postId": "7704895406249053448",
  "commentId": "7704905156580066055",
  "keyword": "street food",
  "musicId": "7467591415728801793",
  "placeId": "21568226335370744",
  "maxItems": 100,
  "maxPages": 10,
  "splitItems": true,
  "concurrency": 3
}
```

# Actor output Schema

## `results` (type: `string`):

Scraped TikTok items. One dataset row per result (post, user, comment, hotel …) with a `_meta` object.

## `overview` (type: `string`):

Summary of the run: results, pages, not found, failed queries and stop reason.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "username": "akuratco",
    "postId": "7704895406249053448",
    "commentId": "7704905156580066055",
    "keyword": "street food",
    "musicId": "7467591415728801793",
    "placeId": "21568226335370744"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapysocial/tiktok-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "username": "akuratco",
    "postId": "7704895406249053448",
    "commentId": "7704905156580066055",
    "keyword": "street food",
    "musicId": "7467591415728801793",
    "placeId": "21568226335370744",
}

# Run the Actor and wait for it to finish
run = client.actor("scrapysocial/tiktok-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "username": "akuratco",
  "postId": "7704895406249053448",
  "commentId": "7704905156580066055",
  "keyword": "street food",
  "musicId": "7467591415728801793",
  "placeId": "21568226335370744"
}' |
apify call scrapysocial/tiktok-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapysocial/tiktok-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/5wVLOdg1gChnd5Eq8/builds/3YzynS7LN8c95rFuU/openapi.json
