# TikTok Data Extractor (`excitable_pickle/free-tiktok-scraper`) Actor

Extract data about videos, users, and channels based on hashtags or scrape full user profiles including posts, total likes, name, nickname, numbers of comments, shares, followers, following, and more.

- **URL**: https://apify.com/excitable\_pickle/free-tiktok-scraper.md
- **Developed by:** [Pavan](https://apify.com/excitable_pickle) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

### What does TikTok Data Extractor do?

This TikTok Data Extractor allows you to extract data about videos from the [TikTok](https://www.tiktok.com/) social media site. It gives you detailed TikTok information in structured formats such as *Excel, XML, HTML, JSON,* and *CSV*, which you can use in your own reports, spreadsheets, and applications. TikTok Data Extractor allows you to scrape:

- Results from a TikTok **hashtag search**
- **Number** of comments and shares, followers and following, total likes
- **Individual posts** and **full user profiles** - by using a URL for a specific profile or video
- Information about posts from **keyword search queries**
- **Download** scraped videos directly
- Export scraped data in multiple formats: **JSON, CSV, Excel, or HTML**
- Export via SDKs (Python & Node.js), use **API Endpoints**, **webhooks**, or integrate with workflows

### What data can you get with TikTok Data Extractor?

TikTok Data Extractor can gather any kind of data from the social media app, such as:

<table>
<tr>
<td>👤 Profile name</td>
<td>❤️ Likes</td>
<td>🔁 Shares</td>
</tr>
<tr>
<td>▶️ Plays</td>
<td>🔗 Video URL</td>
<td>🌐 Profile URL</td>
</tr>
<tr>
<td>📝 Video description</td>
<td>💬 Video subtitles</td>
<td>🈹 Text language</td>
</tr>
<tr>
<td>📜 Bio</td>
<td>🏷️ Hashtags used</td>
<td>📢 Ad post?</td>
</tr>
<tr>
<td>📌 Pinned post?</td>
<td>💰 Sponsored?</td>
<td>📍 Location of creation</td>
</tr>
</table>

### How to scrape TikTok with TikTok Data Extractor

If you've never done any web scraping before, don’t worry. TikTok Data Scraper is easy to use. Here’s how:

1. [Create](https://console.apify.com/actors/OtzYfK1ndEGdwWFKQ?addFromActorId=OtzYfK1ndEGdwWFKQ) a free Apify account using your email.
2. Open [TikTok Data Extractor](https://apify.com/clockworks/free-tiktok-scraper).
3. Add one or more hashtags to scrape TikTok followers, videos and creators.
4. Click the “Start” button and wait for the data to be extracted.
5. Download your data in JSON, XML, CSV, Excel, or HTML.

If you feel like you’d enjoy more comprehensive explanation, try this [step-by-step guide](https://blog.apify.com/how-to-scrape-tiktok-tutorial/) or simply watch a quick [video tutorial](https://www.youtube.com/watch?v=WwdmQzv_w54) on YouTube:

https://www.youtube.com/watch?v=WwdmQzv\_w54

### Input

To start scraping TikTok, fill in the input form. TikTok Data Extractor recognizes the following input parameters:

- **hashtags** - scrapes TikTok for hashtags
- **profiles** - scrapes TikTok profiles
- **search** - scrapes specific keywords and extract videos and profiles that contain it
- **video URLs** - scrapes specific TikTok videos

Here’s a screenshot of scraping #funny from TikTok.

<a href="https://console.apify.com/actors/OtzYfK1ndEGdwWFKQ/">
<img src="https://github.com/apify-projects/actor-readme-images/blob/master/tiktok-data-extractor-input.png?raw=true" alt="TikTok Data Extractor input" style="width:70%;">
</a>

And here’s the same, just in JSON.

```json
{
    "hashtags": ["funny"],
    "resultsPerPage": 100,
    "shouldDownloadCovers": false,
    "shouldDownloadSlideshowImages": false,
    "shouldDownloadSubtitles": false,
    "shouldDownloadVideos": false
}
```

### Output

You get the output from TikTok Data Extractor stored in a tab. Here's an example of some of the output from the previous #funny Actor run.

<a href="https://console.apify.com/actors/OtzYfK1ndEGdwWFKQ/">
<img src="https://github.com/apify-projects/actor-readme-images/blob/master/tiktok-data-extractor-output.png?raw=true" alt="TikTok Data Extractor output" style="width:70%;">
</a>

By clicking on the green Export button, you can download the dataset in XML, CSV, Excel, HTML, or JSON.

#### Scraped TikTok hashtags

```json
{
    "authorMeta.avatar": "<https://p16-sign-sg.tiktokcdn.com/aweme/720x720/tos-alisg-avt-0068/bc3a20fbab0d67915fa082152d96449e.jpeg?lk3s=a5d48078&nonce=12322&refresh_token=3045197dca8797ac15f26bd1d8d2c859&x-expires=1723143600&x-signature=bnKkJ%2FGVCg7v%2BDqd%2B5val9VDd0U%3D&shp=a5d48078&shcp=b59d6b55>",
    "authorMeta.name": "tom.cashman",
    "text": "Breaking up via Wordle #wordle #fyp #foryou #foryoupage #fy #breakups",
    "diggCount": 465100,
    "shareCount": 8397,
    "playCount": 3500000,
    "commentCount": 1072,
    "videoMeta.duration": 26,
    "musicMeta.musicName": "original sound",
    "musicMeta.musicAuthor": "cashman.tom",
    "musicMeta.musicOriginal": true,
    "createTimeISO": "2022-01-27T03:45:41.000Z",
    "webVideoUrl": "<https://www.tiktok.com/@tom.cashman/video/7057727079848103169>"
}
```

#### Scraped TikTok Profiles

```json
[
    {
        "authorMeta.avatar": "https://p16-common-sign.tiktokcdn-us.com/tos-useast2a-avt-0068-euttp/e755d298d36b3175a2ca87d603b5dc2d~tplv-tiktokx-cropcenter:720:720.jpeg?dr=9640&refresh_token=ad1b4c7e&x-expires=1764493200&x-signature=PCx9if1hscJ1KXJVZUio%2B2BLlS0%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast5",
        "authorMeta.name": "khaby.lame",
        "text": "Here’s my new vase, I hope you like it #learnfromkhaby #comedy ",
        "diggCount": 58500,
        "shareCount": 949,
        "playCount": 801800,
        "commentCount": 1391,
        "videoMeta.duration": 33,
        "musicMeta.musicName": "original sound",
        "musicMeta.musicAuthor": "Khabane lame",
        "musicMeta.musicOriginal": true,
        "createTimeISO": "2025-11-26T16:06:05.000Z",
        "webVideoUrl": "https://www.tiktok.com/@khaby.lame/video/7577066025573813526"
    }
]
```

#### Scraped TikTok search queries

```json
[
    {
        "authorMeta.avatar": "https://p16-sign-sg.tiktokcdn.com/tos-alisg-avt-0068/f1f2fefde64a184a4969b9355f388de4~tplv-tiktokx-cropcenter:720:720.jpeg?dr=10399&refresh_token=f08a3504&x-expires=1764493200&x-signature=kwAkYDhDusD2bozDp3WhhdDQ07Q%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=no1a",
        "authorMeta.name": "afu0831",
        "text": "#粉丝一千万 #cat #funny #foryou #fyp ",
        "diggCount": 1478,
        "shareCount": 857,
        "playCount": 116400,
        "commentCount": 49,
        "videoMeta.duration": 5,
        "musicMeta.musicName": "suara asli - Kang Guru",
        "musicMeta.musicAuthor": "Kang Guru",
        "musicMeta.musicOriginal": true,
        "createTimeISO": "2025-11-27T16:44:18.000Z",
        "webVideoUrl": "https://www.tiktok.com/@afu0831/video/7577446618987777281"
    },
    {
        "authorMeta.avatar": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/2a47aafe313f23dfb9444ed868788506~tplv-tiktokx-cropcenter:720:720.jpeg?dr=10399&refresh_token=396464a3&x-expires=1764493200&x-signature=09bdU9SBF7Tb0qa0Cnvixz8xtfE%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=no1a",
        "authorMeta.name": "done15222",
        "text": "wait wait 😂 funny moments 😂 #funnymoments #funnyvideos #funnytiktok #funny ",
        "diggCount": 16800,
        "shareCount": 4961,
        "playCount": 625800,
        "commentCount": 679,
        "videoMeta.duration": 10,
        "musicMeta.musicName": "laugh",
        "musicMeta.musicAuthor": "بو حسن",
        "musicMeta.musicOriginal": true,
        "createTimeISO": "2025-11-26T12:14:12.000Z",
        "webVideoUrl": "https://www.tiktok.com/@done15222/video/7577006237489827127"
    },
    {
        "authorMeta.avatar": "https://p16-sign-sg.tiktokcdn.com/tos-alisg-avt-0068/f1f2fefde64a184a4969b9355f388de4~tplv-tiktokx-cropcenter:720:720.jpeg?dr=10399&refresh_token=f08a3504&x-expires=1764493200&x-signature=kwAkYDhDusD2bozDp3WhhdDQ07Q%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=no1a",
        "authorMeta.name": "afu0831",
        "text": "#粉丝一千万 #cat #funny #foryou #fyp ",
        "diggCount": 353,
        "shareCount": 145,
        "playCount": 18200,
        "commentCount": 48,
        "videoMeta.duration": 15,
        "musicMeta.musicName": "Originalton",
        "musicMeta.musicAuthor": "funnyvideos",
        "musicMeta.musicOriginal": true,
        "createTimeISO": "2025-11-28T01:08:02.000Z",
        "webVideoUrl": "https://www.tiktok.com/@afu0831/video/7577576300840258833"
    }
]
```

#### Scraped TikTok Video URLs

```json
[
    {
        "url": "https://www.tiktok.com/@shaiie_foeva/video/7533731959172861206",
        "error": "Post not found or private."
    },
    {
        "id": "7553309587378539831",
        "text": "Unexpected prank#funny#prank#foryou#funnyvideo#fyp ",
        "textLanguage": "en",
        "createTime": 1758641970,
        "createTimeISO": "2025-09-23T15:39:30.000Z",
        "isAd": false,
        "authorMeta": {
            "id": "7522438923319657527",
            "name": "chunniuc",
            "profileUrl": "https://www.tiktok.com/@chunniuc",
            "nickName": "chunniuc",
            "verified": false,
            "signature": "",
            "bioLink": null,
            "originalAvatarUrl": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/f9090639eaf88d6d19302acc0f3c2c90~tplv-tiktokx-cropcenter:720:720.jpeg?dr=9640&refresh_token=f915efaa&x-expires=1765533600&x-signature=Etgb%2Fp8BjOZDW1N8Nh1qtrbFCuw%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast8",
            "avatar": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/f9090639eaf88d6d19302acc0f3c2c90~tplv-tiktokx-cropcenter:720:720.jpeg?dr=9640&refresh_token=f915efaa&x-expires=1765533600&x-signature=Etgb%2Fp8BjOZDW1N8Nh1qtrbFCuw%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast8",
            "privateAccount": false,
            "followDatasetUrl": null,
            "following": 2,
            "friends": 0,
            "fans": 508700,
            "heart": 6400000,
            "video": 40,
            "digg": 13
        },
        "musicMeta": {
            "musicName": "original sound",
            "musicAuthor": "chunniuc",
            "musicOriginal": true,
            "playUrl": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast5/tos-useast5-v-27dcd7-tx/o4vroDM8eQB1goCaIhDUBipSSSizJ0BiNBXQfF/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=0&dr=0&er=0&lr=default&cd=0%7C0%7C0%7C0&br=250&bt=125&ft=GcAInInz7ThwX-MPXq8Zmo&mime_type=audio_mpeg&qs=6&rc=OmZpNjs0OTU7NWlpaGk3Z0BpMzQ2ZHY5cmdlNjMzZzU8NEAxMTI1Ni4tNjAxYTRiY15hYSM2XmE1MmRjcjZhLS1kMS9zcw%3D%3D&btag=e00090000&expire=1765385182&l=20251210104511BBB68D0351632A021252&ply_type=3&policy=3&signature=f1b0279540256080ab35149fced9013f&tk=0",
            "coverMediumUrl": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/f9090639eaf88d6d19302acc0f3c2c90~tplv-tiktokx-cropcenter:720:720.jpeg?dr=9640&refresh_token=f915efaa&x-expires=1765533600&x-signature=Etgb%2Fp8BjOZDW1N8Nh1qtrbFCuw%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast8",
            "originalCoverMediumUrl": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/f9090639eaf88d6d19302acc0f3c2c90~tplv-tiktokx-cropcenter:720:720.jpeg?dr=9640&refresh_token=f915efaa&x-expires=1765533600&x-signature=Etgb%2Fp8BjOZDW1N8Nh1qtrbFCuw%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=useast8",
            "musicId": "7553309743813643063"
        },
        "webVideoUrl": "https://www.tiktok.com/@chunniuc/video/7553309587378539831",
        "mediaUrls": [],
        "videoMeta": {
            "height": 768,
            "width": 576,
            "duration": 70,
            "coverUrl": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/o8fTvrPPDQbzUS97AyFESxR2jBfioQDQEvg8E0~tplv-tiktokx-origin.image?dr=9636&x-expires=1765533600&x-signature=EAfGHi%2FFtspgSd69yc24x6V%2Fq2E%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast8",
            "originalCoverUrl": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/o8fTvrPPDQbzUS97AyFESxR2jBfioQDQEvg8E0~tplv-tiktokx-origin.image?dr=9636&x-expires=1765533600&x-signature=EAfGHi%2FFtspgSd69yc24x6V%2Fq2E%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast8",
            "definition": "540p",
            "format": "mp4"
        },
        "diggCount": 1500000,
        "shareCount": 94900,
        "playCount": 147200000,
        "collectCount": 102300,
        "commentCount": 17300,
        "mentions": [],
        "detailedMentions": [],
        "hashtags": [
            {
                "id": "5424",
                "name": "funny",
                "title": "What's so #Funny?",
                "cover": ""
            },
            {
                "id": "9122",
                "name": "prank",
                "title": "",
                "cover": ""
            },
            {
                "id": "42164",
                "name": "foryou",
                "title": "",
                "cover": ""
            },
            {
                "id": "56948",
                "name": "funnyvideo",
                "title": "",
                "cover": ""
            },
            {
                "id": "229207",
                "name": "fyp",
                "title": "",
                "cover": ""
            }
        ],
        "effectStickers": [],
        "isSlideshow": false,
        "isPinned": false,
        "searchQuery": "funny"
    }
]
```

### How can I use the data extracted from TikTok with TikTok Data Extractor?

- 💙 Boost **brand awareness** or spread the message about social issues and causes.
- 📈 Forecast **upcoming trends** and influences on social media across the new generation.
- 🔬 Get **data for research** and social listening experiments.
- ⭐ Get authentic **reviews** and back up sentiment analysis with real data.
- 🪧Plan **commercial campaigns** on TikTok or other social media platforms.
- 📚 Simplify **market research** for hashtag challenges and marketing campaigns.
- 📋 Get a list of [perfect-fit marketing leads](https://blog.apify.com/marketing-leads-scraping-with-apify/).

Get in-depth information about how can TikTok Data Extractor help you and how to use it in this webinar we held.

https://www.youtube.com/watch?v=p\_\_yZvTJB3I

### Scrape any TikTok data you need with dedicated scrapers

Use dedicated Actors if you want to **scrape specific TikTok data**.

<table>
<tr>
<td>🎵 <a href="https://apify.com/clockworks/tiktok-scraper">TikTok Scraper</a></td>
<td>🗣 <a href="https://apify.com/clockworks/tiktok-profile-scraper">TikTok Profile Scraper</a></td>
<td>💬 <a href="https://apify.com/clockworks/tiktok-comments-scraper">TikTok Comments Scraper</a></td>
</tr>
<tr>
<td>📝 <a href="https://apify.com/clockworks/tiktok-transcript-extractor">TikTok Transcript Extractor</a></td>
<td>#️⃣ <a href="https://apify.com/clockworks/tiktok-hashtag-scraper">TikTok Hashtag Scraper</a></td>
<td>🎸 <a href="https://apify.com/clockworks/tiktok-sound-scraper">TikTok Sound Scraper</a></td>
</tr>
<tr>
<td>🔍 <a href="https://apify.com/clockworks/tiktok-discover-scraper">TikTok Discover Scraper</a></td>
<td>🕵️ <a href="https://apify.com/clockworks/tiktok-user-search-scraper">TikTok User Search Scraper</a></td>
<td>🛒 <a href="https://apify.com/clockworks/tiktok-shop-scraper">TikTok Shop Scraper</a></td>
</tr>
<tr>
<td>👥 <a href="https://apify.com/clockworks/tiktok-followers-scraper">TikTok Followers Scraper</a></td>
<td>🧭 <a href="https://apify.com/clockworks/tiktok-explore-scraper">TikTok Explore Scraper</a></td>
<td>📊 <a href="https://apify.com/clockworks/tiktok-ads-scraper">TikTok Hashtag Analytics</a></td>
</tr>
<tr>
<td>📈 <a href="https://apify.com/clockworks/tiktok-trends-scraper">TikTok Trends Scraper</a></td>
<td>📹 <a href="https://apify.com/clockworks/tiktok-video-scraper">TikTok Video Scraper</a></td>
<td></td>
</tr>
</table>

We also have put together a few AI agents that will help you extract data from social media and turn it into actionable information:

- [Comments Analyzer Agent](https://apify.com/apify/comments-analyzer-agent)
- [Influencer Discovery Agent](https://apify.com/apify/influencer-discovery-agent)

### Frequently asked questions

#### How much does TikTok Data Extractor cost?

TikTok Data Extractor uses the pay-per-result (PPR) pricing model, so your costs can be easily calculated: it will cost you **$5 to scrape 1,000 results**, so $0.005 per item. Apify provides you with $5 free usage credits every month on the [Apify free plan](https://apify.com/pricing), so you can **get 1,000 results from TikTok Data Extractor for free**.

If you need to extract data regularly, we recommend you get an Apify subscription. Not only do you get a greater amount of prepaid credits, you get a discount on your usage costs, as well. Check out the [pricing tab](https://apify.com/clockworks/free-tiktok-scraper/pricing) for more details.

#### Can I use integrations with TikTok Data Extractor?

You can integrate TikTok Data Extractor with almost any cloud service or web app. We offer integrations with **Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive**, [and plenty more](https://docs.apify.com/integrations).

Alternatively, you could use [webhooks](https://docs.apify.com/integrations/webhooks) to carry out an action whenever an event occurs, such as getting a notification whenever TikTok Data Extractor successfully finishes a run.

#### Can I use TikTok Data Extractor with the Apify API?

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify Actors. The API also lets you access any datasets, monitor Actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the `apify-client` [NPM package](https://apify.com/clockworks/free-tiktok-scraper/api/javascript). To access the API using Python, use the `apify-client` [PyPI package](https://apify.com/clockworks/free-tiktok-scraper/api/python).

Click on the [API tab](https://apify.com/clockworks/free-tiktok-scraper/api/python) for code examples, or check out the [Apify API reference](https://docs.apify.com/api/v2) docs for all the details.

#### Can I use TikTok Data Extractor through an MCP Server?

With Apify API, you can use almost any Actor in conjunction with an MCP server. You can connect to the MCP server using clients like ClaudeDesktop and LibreChat, or even build your own. Read all about how you can [set up Apify Actors with MCP](https://blog.apify.com/how-to-use-mcp/).

For TikTok Data Extractor, go to the [MCP tab](https://apify.com/clockworks/free-tiktok-scraper/api/mcp) and then go through the following steps:

1. Start a Server-Sent Events (SSE) session to receive a `sessionId`
2. Send API messages using that `sessionId` to trigger the scraper
3. The message starts the TikTok Data Extractor with the provided input
4. The response should be: `Accepted`

#### Is it legal to scrape TikTok?

Our scrapers do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly.

However, you should be aware that your results could contain personal data. Personal data is protected by the [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation) in the European Union and by other regulations around the world. You
should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

#### Your feedback

We’re always working on improving the performance of our Actors. If you have any technical feedback for TikTok Data Extractor or found a bug, please create an issue in the [Issues tab](https://apify.com/clockworks/free-tiktok-scraper/issues/open).

### Error items

When the scraper cannot retrieve data for a given input — for example a profile is private or a post has been deleted — it pushes an **error item** to the dataset instead of silently skipping it. Normal output items are never affected; you can tell them apart by the presence of an `errorCode` field.

#### Error item structure

```json
{
    "url": "https://www.tiktok.com/@someuser",
    "input": "someuser",
    "error": "Profile is private",
    "errorCode": "PROFILE_PRIVATE"
}
```

#### Error codes reference

| `errorCode`                      | Meaning                                                        |
| -------------------------------- | -------------------------------------------------------------- |
| `NOT_FOUND`                      | Profile or hashtag does not exist                              |
| `POST_NOT_FOUND_OR_PRIVATE`      | Post URL is gone or private                                    |
| `POST_SENSITIVE`                 | Post is flagged as sensitive content                           |
| `NO_TRENDING_FOR_HASHTAG`        | No ads found for this hashtag                                  |
| `MUSIC_NOT_FOUND`                | No videos found for the music tag                              |
| `SEARCH_QUERY_NOT_FOUND`         | No videos found for the search query                           |
| `SEARCH_QUERY_PROFILE_NOT_FOUND` | No profiles found for the search query                         |
| `FILTER_NO_PASS`                 | Videos exist but none match the active date/popularity filters |
| `PROFILE_EMPTY`                  | Profile has no videos (or is behind a login wall)              |
| `PROFILE_REPOSTS_EMPTY`          | Profile has no reposts (or is behind a login wall)             |
| `PROFILE_STORIES_EMPTY`          | Profile has no active story right now                          |
| `PROFILE_FOLLOWING_EMPTY`        | Profile is not following anyone                                |
| `PROFILE_FOLLOWERS_EMPTY`        | Profile has no followers                                       |
| `PROFILE_PRIVATE`                | Profile is private                                             |
| `GOOGLE_RUN_NO_RESULTS`          | Google-assisted run returned no results                        |
| `TRENDING_EMPTY`                 | Trending page returned no results                              |
| `INVALID_INPUT`                  | Actor failed due to bad configuration (run is also terminated) |
| `INVALID_URLS`                   | One or more start URLs were malformed                          |

# Actor input Schema

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

Just add one or more TikTok hashtags and the scraper will collect data about videos containing this hashtag: likes, users, followers and more. <br> You can enter the hashtags one by one, or use the <strong>Bulk edit</strong> section to add a prepared list.

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

Add the number of tiktoks you want to scrape per hashtag, profile, or search query. This field is applicable to <strong>#️⃣ Hashtags</strong>, <strong>😎 Profiles</strong>, and <strong>🔍 Search</strong>.

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

Add one or multiple TikTok usernames or user IDs you want to scrape. You can enter the usernames one by one, or use the <strong>Bulk edit</strong> section to add a prepared list.

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

If a profile has reposted videos, you can scrape them by selecting 'Reposts'. If a profile currently has an active story, you can scrape it by selecting 'Stories'

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

Select Latest to scrape the most recent videos first, Oldest - the oldest videos first, Popular - the most popular videos first. Date filters only work with Latest and Oldest. Only supported for Videos section. Note: Popular sorting is limited by TikTok to approximately 400–500 videos per profile and may return significantly fewer results than Latest or Oldest.

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

Tick to exclude pinned posts from profiles. Pinned posts are usually the first videos on a profile's page.

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

Optional charged filter. Only videos uploaded after or on this date will be scraped. Alternatively, specify how old the scraped videos should be in days. Putting <code>1</code> will get you only today's posts, <code>2</code> - yesterday's and today's, and so on.

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

Optional charged filter. Only videos uploaded before or on this date will be scraped.

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

Optional charged filter. Scrapes only videos with less hearts than the number you add. Doesn't work with date filters

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

Optional charged filter. Scrapes only videos with no less hearts than the number you add. Doesn't work with date filters

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

Scrapes number of 'Followers' profiles requested from the inputted profiles. You can find the link to the dataset under the followDatasetUrl field in the output. If you want to scrape only Followers/Following profiles, go to our TikTok Followers Scraper.

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

Scrapes number of 'Following' profiles requested from the inputted profiles. You can find the link to the dataset under the followDatasetUrl field in the output. If you want to scrape only Followers/Following profiles, go to our TikTok Followers Scraper.

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

Your keyword will apply to both videos <strong>and</strong> profiles. Use the <strong>Search sorting</strong> field below to specify whether you want your search to apply to top content, videos or users. <br> As for your query's format, you can use any query that works on TikTok.

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

By default, this scraper will sort the search results by whatever shows up in the <strong>Top</strong> section of TikTok search. <br> But you can narrow it down: if you want to apply your search query to just videos, use <strong>Video</strong>, just profiles - <strong>Profile</strong>.

## `maxProfilesPerQuery` (type: `integer`):

Only applies to profile searches. In this case ignore the <strong> 💯 Number of videos </strong> section and choose the number of profiles you want to scrape here.

## `videoSearchSorting` (type: `string`):

Optional charged filter. Select how you want the search results to be sorted when searching for videos. Only valid with `/video` search section.

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

Optional charged filter. Select a date range in which to search for videos. Only valid with `/video` search section.

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

Add the URLs of tiktok videos you want to scrape. You can paste video URLs one by one, or use the <strong>Bulk edit</strong> section to add a prepared list.

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

Tick to scrape related videos for the post URLs you provide.

- The maximum number of scraped related videos is set by the `resultsPerPage` count.
- Note that this only works for direct video URLs from the `postURLs` field.

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

This is a charged add-on. Tick to download TikTok videos.

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

Tick to download TikTok video cover images (thumbnails).

## `shouldDownloadSlideshowImages` (type: `boolean`):

Tick to download TikTok slideshow images.

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

Tick to download authors' profile pictures.

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

Tick to download cover images of sounds used in posts.

## `videoKvStoreIdOrName` (type: `string`):

Name (or ID) of the Key Value Store where the videos and other media like thumbnails will be stored. Omit to store in the default one. Using this option will provide a named Key-Value store can help bypass data retention and store the content forever until the store is manually deleted.<br><br>The Key-Value store's name can consist of a versatile combination of uppercase letters, lowercase letters, digits, or hyphens, all without any spaces.

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

Choose how to handle subtitles and audio transcription for input videos. Subtitles are provided by TikTok for some videos, and transcription means that this Actor will use speech-to-text AI to generate video transcript. Transcripts are charged as an extra event according to your plan.

## `aiVideoDescription` (type: `boolean`):

Use AI to generate a time-segmented description of each video (what is seen and heard, per scene). Provided inline under `videoMeta.aiVideoDescription`. Charged per video-second, only when the description is produced successfully.

## `aiVideoSummary` (type: `boolean`):

Use AI to generate a high-level summary of each video as a piece of content. Provided inline under `videoMeta.aiVideoSummary`. Charged per video-second, only when the summary is produced successfully.

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

The number of comments extracted from every result. Due to TikTok API limitations, the actual number of scraped comments may differ, especially for posts with thousands of comments. The link to the dataset will be under a field commentsDatasetURL in the output.

## `topLevelCommentsPerPost` (type: `integer`):

The maximum number of top-level (non-reply) comments you want from a single post.

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

The maximum number of replies you want from a single comment.

Note: Successful extraction of all desired replies is currently not guaranteed.

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

Country to use with proxy. Use it in case you want to scrape posts only available for some country.

## Actor input object example

```json
{
  "hashtags": [
    "fyp"
  ],
  "resultsPerPage": 100,
  "profileScrapeSections": [
    "videos"
  ],
  "profileSorting": "latest",
  "excludePinnedPosts": false,
  "searchSection": "",
  "maxProfilesPerQuery": 10,
  "videoSearchSorting": "MOST_RELEVANT",
  "videoSearchDateFilter": "ALL_TIME",
  "scrapeRelatedVideos": false,
  "shouldDownloadVideos": false,
  "shouldDownloadCovers": false,
  "shouldDownloadSlideshowImages": false,
  "shouldDownloadAvatars": false,
  "shouldDownloadMusicCovers": false,
  "downloadSubtitlesOptions": "NEVER_DOWNLOAD_SUBTITLES",
  "aiVideoDescription": false,
  "aiVideoSummary": false,
  "proxyCountryCode": "None"
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "hashtags": [
        "fyp"
    ],
    "resultsPerPage": 100,
    "maxFollowersPerProfile": 0,
    "maxFollowingPerProfile": 0,
    "commentsPerPost": 0,
    "topLevelCommentsPerPost": 0,
    "maxRepliesPerComment": 0,
    "proxyCountryCode": "None"
};

// Run the Actor and wait for it to finish
const run = await client.actor("excitable_pickle/free-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 = {
    "hashtags": ["fyp"],
    "resultsPerPage": 100,
    "maxFollowersPerProfile": 0,
    "maxFollowingPerProfile": 0,
    "commentsPerPost": 0,
    "topLevelCommentsPerPost": 0,
    "maxRepliesPerComment": 0,
    "proxyCountryCode": "None",
}

# Run the Actor and wait for it to finish
run = client.actor("excitable_pickle/free-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 '{
  "hashtags": [
    "fyp"
  ],
  "resultsPerPage": 100,
  "maxFollowersPerProfile": 0,
  "maxFollowingPerProfile": 0,
  "commentsPerPost": 0,
  "topLevelCommentsPerPost": 0,
  "maxRepliesPerComment": 0,
  "proxyCountryCode": "None"
}' |
apify call excitable_pickle/free-tiktok-scraper --silent --output-dataset

```

## MCP server setup

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