# TikTok Scraper (`automly/tiktok-scraper`) Actor

Scrape TikTok videos, profiles and comments from creators, hashtags, search keywords, video links and sounds in one run: views, likes, shares, captions, hashtags, author and sound details, with date filters. No login.

- **URL**: https://apify.com/automly/tiktok-scraper.md
- **Developed by:** [Automly](https://apify.com/automly) (community)
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 videos

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

### What is TikTok Scraper?

**TikTok Scraper** is an all-in-one tool to **scrape TikTok videos, profiles and comments** in one run. Give it creators, hashtags, search keywords, video links or sound links, and get every video's views, likes, comments, shares, saves, caption, hashtags, creator details and sound details, plus comments and profile rows if you want them. Click **Start** and download the data as Excel, CSV or JSON.

- 🧩 **All in one:** profiles, hashtags, keywords, video links and sounds in a single run
- 🎬 **Videos:** full stats, caption, hashtags, mentions, cover, duration and location
- 👤 **Creators:** followers, likes, bio, avatar and verified badge on every video, or as profile rows
- 💬 **Comments:** as many comments and replies per video as you choose
- 💾 **Files:** save video files without the watermark, covers, avatars and sound covers, plus subtitles
- 📅 **Date filters:** only videos posted between two dates, or within the last few days
- 🔓 **No login:** no TikTok account, cookies or API key needed
- 💸 **Free to try:** every Apify account gets $5 of free usage each month

### What can TikTok Scraper do?

- Get the **latest, most popular or oldest videos** of any public creator, plus their **reposts**, live **stories**, **followers** and **following**
- Get the videos TikTok shows for **any hashtag** or **search keyword** (Top or Videos tab), with the **related searches** TikTok suggests
- Keep only videos with **at least or at most** a number of likes, views, shares or comments
- See TikTok **as people in another country** see it
- **Save the video files** (no watermark), covers, avatars and sound covers, and get **subtitles** with their text
- Get **full details of videos** from their links, with up to 15 related videos each
- Get the **videos that use a sound**
- Get **comments and replies** of every video it saves
- Find **profiles by keyword** and get their follower counts
- Mix all of these in one run and cap the whole run with **Max results**
- Export to Excel, CSV, JSON, HTML or XML, or send the data to Google Sheets, Make, Zapier and more

### What data can you extract from TikTok?

| | | |
|---|---|---|
| 👀 Views | ❤️ Likes | 💬 Comments count |
| 🔁 Shares and saves | 📝 Caption | #️⃣ Hashtags and mentions |
| 👤 Creator name and handle | 👥 Creator followers and likes | ✅ Verified badge |
| 🎵 Sound name, author and audio link | ⏱️ Duration and resolution | 🖼️ Cover and slideshow images |
| 📍 Location | 📌 Pinned and ad flags | 🗨️ Comments and replies |
| 🎞️ Video files (no watermark) | 📝 Subtitles and their text | 🔍 Related searches |

### How to scrape TikTok

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **TikTok Scraper**.
3. Add **profiles, hashtags, search keywords, video links or sound links** (any mix).
4. Choose how many videos you want per input, and comments per video if you want them, then click **Start**.
5. When the run finishes, download your data as Excel, CSV, JSON, HTML or XML.

### How much does it cost to scrape TikTok?

You pay only for the results you get: one price per video, one per profile row (creators, followers and following) and one per comment, plus one per file saved when you ask for files. See the **Pricing** tab for the current prices. Every Apify account gets **$5 of free usage each month**, so you can try it at no cost. **Max results** (1,000 by default) caps how many results one run saves, so you always know the most a run can cost.

### ⬇️ Input

| Setting | What it does |
|---|---|
| Profiles | Usernames or profile links (`khaby.lame`, `@khaby.lame`, `https://www.tiktok.com/@khaby.lame`) |
| Hashtags | Hashtags, with or without `#` |
| Search keywords | Keywords to search, like `iphone review` |
| Video links | Video or photo post links, short links or video IDs |
| Sound links | Sound links or sound IDs |
| Profile sections | Videos, reposts and/or live stories of each profile |
| Profile video order | Latest (default), popular or oldest first |
| Followers / Following per profile | How many of each creator's followers and followed accounts to get |
| Videos per input | How many videos per profile, hashtag, keyword and sound (default 20) |
| Max results | The most results the whole run saves, all inputs together (default 1,000; 0 = no limit) |
| Videos published after / before | Only videos from this date range; "after" also takes a period like `7 days` |
| Skip pinned videos | Leave out videos creators pinned to their profile |
| At least / At most likes, views, shares, comments | Only videos within these counts |
| Search results | Top tab (default), Videos tab or profiles for search keywords |
| Search results posted within | Only search results from the past day, week, month, 3 or 6 months |
| Related search words | Add the searches TikTok suggests next to each keyword |
| Related videos | For video links, also get up to 15 related videos each |
| Author data / Sound data | Creator and sound details on every video (on by default) |
| Profile rows | One row per creator in Profiles with their full profile |
| Comments per video / Replies per comment | How many comments (and replies) to get from every video saved |
| Save videos / covers / avatars / sound covers | Save these files to the run's storage, with links in each row |
| Subtitles | Caption links only (default) or links and full text |
| Max size of saved files | The most all saved files may take up in one run (default 500 MB) |
| Language | Language for the results (default English) |
| Country | See TikTok as people in this country see it |

Example: two creators' videos from the last 30 days, a hashtag and a keyword, with 20 comments per video.

```json
{
  "profiles": ["khaby.lame", "@scout2015"],
  "hashtags": ["cooking"],
  "searchQueries": ["iphone review"],
  "resultsPerPage": 20,
  "oldestPostDateUnified": "30 days",
  "commentsPerPost": 20,
  "maxResults": 2000
}
```

Example: full details of a few videos with their related videos.

```json
{
  "postURLs": [
    "https://www.tiktok.com/@scout2015/video/6718335390845095173",
    "https://www.tiktok.com/@khaby.lame/video/7688786985896381727"
  ],
  "scrapeRelatedVideos": true
}
```

### ⬆️ Output

Every row has a `type`: `"video"`, `"profile"` or `"comment"`. Follower and following rows are profile rows with `relation` and `connectedTo`. In Apify Console, the **Videos**, **Profiles** and **Comments** tables show each kind with its own columns. Video rows also say how each video was found: `searchQuery` and `searchRank` for keywords, `searchHashtag` for hashtags, `searchMusic` for sounds, `relatedTo` for related videos, and `source` for the input it came from. A video found by two of your inputs is saved once.

A video row (found by the hashtag `cooking`, with files and subtitles on):

```json
{
  "type": "video",
  "id": "7688864693892467981",
  "url": "https://www.tiktok.com/@recipesecrets0/video/7688864693892467981",
  "text": "This steak-loaded baked potato is absolutely insane 🤯🔥 Crispy grilled potato, juicy seasoned steak bites, sour cream, melted cheese, chives, and garlic herb butter all packed into one loaded bite. If you love steak and potatoes, this might become your new favorite dinner. Save this recipe and send it to someone who needs to make it ASAP. #steakandpotatoes #americanfood #steakrecipe #easyrecipe #usa ",
  "createdAt": "2026-09-23T22:42:15Z",
  "authorUsername": "recipesecrets0",
  "authorNickname": "Recipe Secrets🇺🇸",
  "authorId": "7669058467911402509",
  "authorVerified": false,
  "authorFollowers": 33000,
  "views": 970500,
  "likes": 27600,
  "comments": 255,
  "shares": 21900,
  "saves": 15327,
  "reposts": 0,
  "hashtags": [
    {
      "name": "steakandpotatoes"
    },
    {
      "name": "americanfood"
    },
    {
      "name": "steakrecipe"
    },
    {
      "name": "easyrecipe"
    },
    {
      "name": "usa"
    }
  ],
  "mentions": [],
  "durationSeconds": 61,
  "coverUrl": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/oMMNHqeGkIehjAVILqeAFakKoErApIqALAAzQA~tplv-tiktokx-origin.image?...",
  "isSlideshow": false,
  "slideshowImages": [],
  "soundId": "7688864664385637133",
  "soundTitle": "original sound",
  "soundAuthor": "Recipe Secrets🇺🇸",
  "soundOriginal": true,
  "isAd": false,
  "isPinned": false,
  "language": "en",
  "location": "New York",
  "isAiGenerated": false,
  "source": "cooking",
  "fetchedAt": "2026-10-03T16:35:07Z",
  "hashtagNames": [
    "steakandpotatoes",
    "americanfood",
    "steakrecipe",
    "easyrecipe",
    "usa"
  ],
  "webVideoUrl": "https://www.tiktok.com/@recipesecrets0/video/7688864693892467981",
  "createTime": 1790203335,
  "createTimeISO": "2026-09-23T22:42:15Z",
  "playCount": 970500,
  "diggCount": 27600,
  "shareCount": 21900,
  "commentCount": 255,
  "collectCount": 15327,
  "repostCount": 0,
  "textLanguage": "en",
  "authorMeta": {
    "id": "7669058467911402509",
    "name": "recipesecrets0",
    "profileUrl": "https://www.tiktok.com/@recipesecrets0",
    "nickName": "Recipe Secrets🇺🇸",
    "verified": false,
    "privateAccount": false,
    "signature": "🍳 Stop wasting time on boring meals.\n💯 Only recipes worth trying.\n👇 Follow now and never run out of meal ideas again.",
    "avatar": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/925d0719e45caa3e8b590391e41a852a~tplv-tiktokx-cropcenter:720:720.jpeg?...",
    "originalAvatarUrl": "https://p19-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/925d0719e45caa3e8b590391e41a852a~tplv-tiktokx-cropcenter:1080:1080.jpeg?...",
    "ttSeller": false,
    "fans": 33000,
    "following": 1,
    "heart": 190600,
    "video": 101,
    "digg": 236,
    "friends": 0,
    "storedAvatarUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/avatar-7669058467911402509.jpg"
  },
  "musicMeta": {
    "musicId": "7688864664385637133",
    "musicName": "original sound",
    "musicAuthor": "Recipe Secrets🇺🇸",
    "musicOriginal": true,
    "musicAlbum": null,
    "playUrl": "https://v16m.tiktokcdn-us.com/709c15a300eb4b97ec787ce72327d19c/6ac18379/video/tos/useast5/tos-useast5-v-27dcd7-tx/oAIUoFqkFBAlDzDdIffNASAgEBqNmtiLgFXCJ5/?...",
    "coverMediumUrl": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/925d0719e45caa3e8b590391e41a852a~tplv-tiktokx-cropcenter:720:720.jpeg?...",
    "storedCoverUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/music-cover-7688864664385637133.jpg"
  },
  "videoMeta": {
    "height": 1280,
    "width": 720,
    "duration": 61,
    "coverUrl": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/oMMNHqeGkIehjAVILqeAFakKoErApIqALAAzQA~tplv-tiktokx-origin.image?...",
    "originalCoverUrl": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/oQf1ZEIOC2BWN0pimViqnIIcBSAIIwA3iICp4A~tplv-tiktokx-origin.image?...",
    "definition": "720p",
    "format": "mp4",
    "subtitleLinks": [
      {
        "language": "eng-US",
        "languageCode": "en",
        "format": "webvtt",
        "isAutoGenerated": true,
        "tiktokLink": "https://v16m-webapp.tiktokcdn-us.com/22821ccb6919754ec698d7c88818c68b/6ac3d219/video/tos/useast5/tos-useast5-v-0068-tx/a132b2f422d246abbcc61b4623bc7c61/?..."
      }
    ],
    "downloadAddr": "https://api.apify.com/v2/key-value-stores/<store>/records/video-7688864693892467981.mp4",
    "storedCoverUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/cover-7688864693892467981.jpg"
  },
  "searchQuery": null,
  "searchRank": null,
  "searchHashtag": {
    "name": "cooking",
    "views": 552516391837
  },
  "searchMusic": null,
  "relatedTo": null,
  "fromProfileSection": null,
  "relatedSearchWords": null,
  "subtitles": [
    {
      "language": "eng-US",
      "languageCode": "en",
      "format": "webvtt",
      "isAutoGenerated": true,
      "text": "WEBVTT\n\n\n00:00:00.020 --> 00:00:02.300\nyou'll never eat steak and potatoes the same way again\n\n00:00:02.301 --> 00:00:04..."
    }
  ],
  "mediaUrls": [
    "https://api.apify.com/v2/key-value-stores/<store>/records/video-7688864693892467981.mp4",
    "https://api.apify.com/v2/key-value-stores/<store>/records/cover-7688864693892467981.jpg"
  ]
}
```

A comment row:

```json
{
  "type": "comment",
  "videoId": "6718335390845095173",
  "videoUrl": "https://www.tiktok.com/@scout2015/video/6718335390845095173",
  "commentId": "6718336105873702917",
  "parentCommentId": null,
  "authorUsername": "pretzelsticks0",
  "authorNickname": "Quit",
  "authorId": "6627564337508761605",
  "text": "Well it’s pretty easy...and obvious 😂 hlysa",
  "likeCount": 345,
  "replyCount": 20,
  "publishedAt": "2019-07-27T13:35:22Z",
  "isPinned": false,
  "isAuthorLiked": true,
  "language": "un",
  "fetchedAt": "2026-10-03T15:32:56Z"
}
```

Profile rows have the creator's `username`, `nickname`, `bio`, `bioLink`, `followers`, `following`, `likes`, `videos`, `verified`, `privateAccount` and `avatarUrl`.

Each run also saves a short report with how many videos, profiles and comments it saved, and any input it could not scrape with the reason (for example, a username that does not exist).

### How can I use TikTok data?

- **Trend research:** see which videos, hashtags and sounds take off, and when
- **Influencer research:** compare creators by followers, likes and how their recent videos perform
- **Competitor tracking:** follow what brands and competitors post and how it lands
- **Audience research:** read what people say in the comments
- **Content planning:** find the formats, captions and sounds that work in your niche

### Use TikTok Scraper from your code

Run it from your own code with the [Apify API](https://docs.apify.com/api/v2) or the Python and JavaScript clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("automly/tiktok-scraper").call(run_input={
    "profiles": ["khaby.lame"],
    "hashtags": ["cooking"],
    "resultsPerPage": 50,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["type"] == "video":
        print(row["authorUsername"], row["views"], row["url"])
```

### 🤖 Use with AI agents (MCP)

This actor works as a tool for AI agents. Connect any MCP-compatible AI assistant or agent to the Apify MCP server at https://mcp.apify.com (sign in with your Apify account), and it can find this actor, fill in the input and read the results by itself. Ask in plain words, for example *"Get the 20 latest TikTok videos for #cooking and their top comments"*, and the agent runs `automly/tiktok-scraper` with an input like `{"hashtags": ["cooking"], "resultsPerPage": 20, "commentsPerPost": 10}`. Every input and output field has a plain description, so the agent knows what to type and what each column means. Agent runs cost the same as runs you start yourself.

### ❓FAQ

#### How much does it cost?

You pay only for the results you get: videos, profile rows and comments each have their own price per 1,000. See the **Pricing** tab for the current prices. Every Apify account gets $5 of free usage each month.

#### How many videos can I get?

Up to 10,000 per profile, hashtag, keyword or sound. TikTok itself shows only part of a hashtag or search to visitors, so very large numbers there can come back shorter; a creator's own videos can be read much further back.

#### Why do big numbers look rounded?

TikTok shows some large counts rounded (for example 1.0M views), and gives them to everyone that way. Follower and like counts on profile rows are exact.

#### Can I download the video files?

Yes. Turn on **Save videos** and each video file, without the TikTok watermark, is saved to the run's storage with its link in `videoMeta.downloadAddr`. Covers, avatars and sound covers work the same way. **Max size of saved files** keeps a run from growing too big: once it is reached, rows keep coming without files. Video files are larger than you might expect (often 5 to 20 MB each), so allow for that.

#### Can I use the same field names as other TikTok scrapers?

Yes. Video rows also carry the counts under the names other popular TikTok scrapers use (`playCount`, `diggCount`, `shareCount`, `commentCount`, `collectCount`, `webVideoUrl`, `createTimeISO`), `hashtags` as objects with a `name`, and the nested `authorMeta`, `musicMeta` and `videoMeta`, so existing code keeps working.

#### Do I need a TikTok account?

No. You don't need a TikTok account, cookies or an API key.

#### Can I scrape private accounts?

No. Only public profiles, videos and comments. Inputs that don't exist are skipped and listed in the run report.

#### Can I connect TikTok Scraper to other tools?

Yes. Start runs and download results with the Apify API or the Python and JavaScript clients, send results to Make, Zapier, n8n, Google Sheets or Slack with Apify integrations and webhooks, or let AI assistants run it through the Apify MCP server at [mcp.apify.com](https://mcp.apify.com).

#### Is it legal to scrape TikTok?

This scraper only collects information that people chose to make public. It does not collect private data such as email addresses or phone numbers. Profiles, captions and comments can still contain personal data, which may be protected by laws such as GDPR, so only scrape it for a legitimate reason and ask a lawyer if you are unsure. You can read more in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

TikTok Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by TikTok.

#### Something isn't working. What should I do?

Open the **Issues** tab and tell us the input and what you expected. We usually reply within a day.

### ⭐ Your feedback

Ideas, missing fields or problems: open the **Issues** tab and we'll take a look. If TikTok Scraper saved you time, a short review on the **Reviews** tab helps other people find it.

# Actor input Schema

## `profiles` (type: `array`):

TikTok usernames or profile links, e.g. khaby.lame, @khaby.lame or https://www.tiktok.com/@khaby.lame. You get each creator's latest videos.

## `hashtags` (type: `array`):

Hashtags, with or without #, e.g. cooking or #booktok. You get videos TikTok shows for each hashtag.

## `searchQueries` (type: `array`):

Keywords to search on TikTok, e.g. iphone review. You get the videos (or profiles, see Search results) TikTok shows for each keyword, in TikTok's order.

## `postURLs` (type: `array`):

Links to TikTok videos or photo posts, e.g. https://www.tiktok.com/@scout2015/video/6718335390845095173. Short links (vm.tiktok.com/...) and numeric video IDs work too.

## `musicURLs` (type: `array`):

Links to TikTok sounds or their numeric IDs, e.g. https://www.tiktok.com/music/original-sound-6745161928949106690. You get videos that use each sound.

## `profileScrapeSections` (type: `array`):

Which lists to read from each profile: their videos, the videos they reposted, and their stories that are live now. Each section gets up to Videos per input.

## `profileSorting` (type: `string`):

Which of each creator's videos come first: latest, most popular or oldest.

## `maxFollowersPerProfile` (type: `integer`):

How many of each creator's followers to get, newest first, e.g. 100. Each follower is a profile row. 0 means none.

## `maxFollowingPerProfile` (type: `integer`):

How many of the accounts each creator follows to get, e.g. 100. Each one is a profile row. 0 means none.

## `resultsPerPage` (type: `integer`):

How many videos to get for each profile, hashtag, keyword and sound, e.g. 20. With Search results set to Profiles, how many profiles per keyword.

## `maxResults` (type: `integer`):

The most rows this run saves in total, across all inputs, e.g. 500. Videos, profiles and comments all count. Set 0 for no limit.

## `oldestPostDateUnified` (type: `string`):

Only videos published on or after this date, e.g. 2026-09-01, or within a recent period, e.g. 7 days. Times are UTC. Does not apply to video links.

## `newestPostDate` (type: `string`):

Only videos published on or before this date, e.g. 2026-09-30 (the whole day counts). Times are UTC. Does not apply to video links.

## `excludePinnedPosts` (type: `boolean`):

Skip the videos creators pinned to the top of their profile.

## `leastDiggs` (type: `integer`):

Only videos with at least this many likes, e.g. 1000. Does not apply to video links.

## `mostDiggs` (type: `integer`):

Only videos with at most this many likes, e.g. 1000. Does not apply to video links.

## `leastShares` (type: `integer`):

Only videos with at least this many shares, e.g. 50. Does not apply to video links.

## `mostShares` (type: `integer`):

Only videos with at most this many shares, e.g. 50. Does not apply to video links.

## `leastComments` (type: `integer`):

Only videos with at least this many comments, e.g. 20. Does not apply to video links.

## `mostComments` (type: `integer`):

Only videos with at most this many comments, e.g. 20. Does not apply to video links.

## `leastPlays` (type: `integer`):

Only videos with at least this many views, e.g. 10000. Does not apply to video links.

## `mostPlays` (type: `integer`):

Only videos with at most this many views, e.g. 10000. Does not apply to video links.

## `searchSection` (type: `string`):

Which search tab to read: Top (what TikTok shows first), Videos, or Profiles.

## `videoSearchDateFilter` (type: `string`):

Only search results posted within this period, e.g. Past week. Results keep TikTok's order.

## `scrapeRelatedSearchWords` (type: `boolean`):

Add the searches TikTok suggests next to each keyword ("Others searched for") to its results.

## `scrapeRelatedVideos` (type: `boolean`):

For each video link, also get up to 15 videos TikTok recommends next to it.

## `includeAuthorData` (type: `boolean`):

Add the creator's details to every video (authorMeta): followers, following, total likes, video count, bio, avatar, verified badge.

## `includeMusicData` (type: `boolean`):

Add the sound's details to every video (musicMeta): name, author, original or not, album, audio link, cover.

## `includeProfileDetails` (type: `boolean`):

Add one row per creator in Profiles with their profile: bio, bio link, followers, following, total likes, video count, verified badge. Each counts as a profile result.

## `commentsPerPost` (type: `integer`):

How many comments to get from every video saved, e.g. 50. Each comment is its own row. 0 means no comments.

## `maxRepliesPerComment` (type: `integer`):

How many replies to get under each comment, e.g. 10. 0 means no replies.

## `shouldDownloadVideos` (type: `boolean`):

Save each video file (without the TikTok watermark) to the run's storage and add its link to the row (videoMeta.downloadAddr).

## `shouldDownloadCovers` (type: `boolean`):

Save each video's cover image and add its link (videoMeta.storedCoverUrl).

## `shouldDownloadAvatars` (type: `boolean`):

Save each creator's profile picture once and add its link (authorMeta.storedAvatarUrl). Needs Author data on.

## `shouldDownloadMusicCovers` (type: `boolean`):

Save each sound's cover image once and add its link (musicMeta.storedCoverUrl). Needs Sound data on.

## `downloadSubtitlesOptions` (type: `string`):

Videos with captions always list their caption tracks (videoMeta.subtitleLinks). Choose Links and full text to also get each track's text (WebVTT) in subtitles.

## `maxDownloadSizeMb` (type: `integer`):

The most the saved files may take up in one run, all together, e.g. 500. When it is reached, rows keep coming without files. A single video over 100 MB is not saved.

## `language` (type: `string`):

Two-letter language code for the results, e.g. en, es, fr, de or ja.

## `proxyCountryCode` (type: `string`):

Read TikTok as people in this country see it: hashtags, searches and some videos differ by country. None uses the default.

## `proxyConfiguration` (type: `object`):

Proxy settings. The default works for most runs.

## Actor input object example

```json
{
  "profiles": [
    "khaby.lame"
  ],
  "profileScrapeSections": [
    "videos"
  ],
  "profileSorting": "latest",
  "maxFollowersPerProfile": 0,
  "maxFollowingPerProfile": 0,
  "resultsPerPage": 20,
  "maxResults": 1000,
  "excludePinnedPosts": false,
  "searchSection": "",
  "videoSearchDateFilter": "ALL_TIME",
  "scrapeRelatedSearchWords": false,
  "scrapeRelatedVideos": false,
  "includeAuthorData": true,
  "includeMusicData": true,
  "includeProfileDetails": false,
  "commentsPerPost": 0,
  "maxRepliesPerComment": 0,
  "shouldDownloadVideos": false,
  "shouldDownloadCovers": false,
  "shouldDownloadAvatars": false,
  "shouldDownloadMusicCovers": false,
  "downloadSubtitlesOptions": "NEVER_DOWNLOAD_SUBTITLES",
  "maxDownloadSizeMb": 500,
  "language": "en",
  "proxyCountryCode": "None",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `videos` (type: `string`):

No description

## `profiles` (type: `string`):

No description

## `comments` (type: `string`):

No description

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

No description

## `report` (type: `string`):

No description

# 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 = {
    "profiles": [
        "khaby.lame"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/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 = {
    "profiles": ["khaby.lame"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automly/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 '{
  "profiles": [
    "khaby.lame"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automly/tiktok-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automly/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/cp35Lk5LuEBlKOiNp/builds/4vItyijlbFAjKyECE/openapi.json
