# TikTok Scraper Pro (`badr_xba/tiktok-scraper-pro`) Actor

Scrape TikTok videos from keyword searches, hashtags, profiles and video URLs: views, likes, shares, saves, comments, captions, music, author stats, with optional comments, video downloads and subtitles. No login. Pay per result.

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

## Pricing

from $1.70 / 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 Pro – Search, Profiles, Followers & Videos

Scrape **TikTok without an account or API key**: videos from **keyword searches**, **hashtags**, **profiles** and **video URLs**, with views, likes, shares, saves, comments count, captions, hashtags, music and author stats. Add **profile search**, **reposts**, **stories**, **followers and following lists**, **MP4 downloads** and **subtitles** when you need them. **Pay only for results** — failed inputs are never billed.

### What can it do?

- 🔍 **Search** TikTok by keyword: videos ranked by TikTok, or matching **profiles**
- \#️⃣ **Hashtags**: hashtag views plus its videos
- 😎 **Profiles**: followers, following, likes, bio, bio link, verification — plus the profile's **videos**, **reposts** and live **story**
- 👥 **Followers / following lists** of a profile (add-on), each account with its own stats
- 🔗 **Video URLs**: every field of a video, plus **related videos**
- 📅 Date filter, ⭐ popularity filter (minimum views or likes, maximum likes), 📌 exclude pinned posts
- ⬇️ Download **videos**, covers, avatars, sound covers, **subtitles** and slideshow images to the run's storage
- 🌍 **Scrape as in a country**: read TikTok from addresses in a chosen country
- Export to JSON, CSV, Excel, XML or HTML, or read through the API, webhooks, Make, Zapier, n8n and the Apify MCP server

### Data you get per video

`id`, `text` (caption), `textLanguage`, `createTimeISO`, `webVideoUrl`, `playCount`, `diggCount` (likes), `shareCount`, `collectCount` (saves), `commentCount`, `repostCount`, `hashtags`, `mentions`, `isAd`, `isSponsored`, `isPinned`, `isSlideshow`, `locationCreated`, `effectStickers`, `authorMeta` (name, nickname, verified, bio, bio link, followers, following, likes, videos), `musicMeta` (sound name, author, original, cover, play URL), `videoMeta` (duration, size, definition, cover, subtitle links) — plus `searchQuery`, `searchHashtag`, `searchProfile` or `fromProfileSection` telling you where it came from.

Followers / following rows carry the account's own stats plus `connectionType` and `connectedTo` (the profile they are linked to).

### How to use it in 3 steps

1. **Fill in** any of **Search queries**, **Hashtags**, **Profiles** or **Post URLs**.
2. **Set** **Videos per hashtag or profile** (it also caps each search), and optionally profile sections, followers / following, filters and downloads.
3. **Click Start**, then open the **Posts overview** table or export JSON, CSV or Excel.

The prefilled run (one post, #cooking and @nasa, 10 videos each) finishes in about a minute and costs about nine cents on the Free plan.

Paste inputs the way you have them: links with `?is_from_webapp=…` tracking, `vm.tiktok.com` or `tiktok.com/t/` short links, mobile and embed links, bare video IDs, `@handles`, `#tags`, or a comma-separated list on one line. A profile or hashtag link put in the wrong list (even in **Search queries**) is moved to the right one; the same video, profile or hashtag given twice is read (and billed) once. A line that is none of these is listed in `FAILED_INPUTS` with the reason, never billed, and the run carries on.

### Input example

```json
{
  "searchQueries": ["pasta recipe"],
  "hashtags": ["cooking"],
  "profiles": ["nasa"],
  "profileScrapeSections": ["videos", "reposts"],
  "maxFollowersPerProfile": 50,
  "resultsPerPage": 20,
  "excludePinnedPosts": true
}
```

### Output example

```json
{
  "resultType": "post",
  "id": "7534061113365859586",
  "text": "🤣🤣🤣 #comeramabanana",
  "createTimeISO": "2025-08-02T18:45:03.000Z",
  "webVideoUrl": "https://www.tiktok.com/@bruniela_/video/7534061113365859586",
  "playCount": 55700,
  "diggCount": 5344,
  "shareCount": 701,
  "collectCount": 291,
  "commentCount": 24,
  "authorMeta": { "name": "bruniela_", "fans": 51200, "verified": false },
  "musicMeta": { "musicName": "som original", "musicAuthor": "fox_rus0", "musicOriginal": true },
  "videoMeta": { "duration": 16, "definition": "540p" },
  "searchQuery": "banana"
}
```

Every run also writes **RUN_SUMMARY** and **FAILED_INPUTS**. Inputs that give nothing are listed there with a code — `NOT_FOUND`, `PRIVATE_ACCOUNT`, `SEARCH_QUERY_NOT_FOUND`, `SEARCH_QUERY_PROFILE_NOT_FOUND`, `PROFILE_REPOSTS_EMPTY`, `PROFILE_STORIES_EMPTY`, `PROFILE_FOLLOWERS_EMPTY`, `PROFILE_FOLLOWING_EMPTY`, `INVALID_INPUT` — and are **never billed**.

### Pricing

Pay per event. Platform usage is included. Add-ons are billed only when you turn them on.

| Event | Free | Starter | Scale | Business |
|---|---|---|---|---|
| **Result** (one video, profile, hashtag, follower or following row) | $3.70 / 1,000 | $3.00 / 1,000 | $2.30 / 1,000 | $1.70 / 1,000 |
| Add-on: **Date filter** (per video kept) | $1.30 / 1,000 | $1.00 / 1,000 | $0.80 / 1,000 | $0.60 / 1,000 |
| Add-on: **Popularity filter** (per video kept) | $1.30 / 1,000 | $1.00 / 1,000 | $0.80 / 1,000 | $0.60 / 1,000 |
| Add-on: **Follower / Following** (per account) | $4.00 / 1,000 | $3.00 / 1,000 | $2.00 / 1,000 | $1.50 / 1,000 |
| Add-on: **Video download** (per MP4 saved) | $1.30 / 1,000 | $1.00 / 1,000 | $0.80 / 1,000 | $0.60 / 1,000 |
| Add-on: **Scrape as in country** (per video) | $1.30 / 1,000 | $1.00 / 1,000 | $0.80 / 1,000 | $0.60 / 1,000 |
| Actor start (per GB of run memory, once per run) | $0.001 | $0.001 | $0.001 | $0.001 |

Example: 100 videos from a search on the Free plan = $0.37, plus a start fee of a few tenths of a cent. Cap any run with **Maximum posts in total** or a maximum cost per run.

### What it does not do

TikTok keeps some data for signed-in users, and some features need a paid AI service. Not included, never billed:

- **Comments** of videos (`commentsPerPost` is accepted and ignored);
- **AI transcription**, **AI video description** and **AI summary** — TikTok's own subtitles are available with **Download the subtitles**;
- video search **sorting and date range** (search returns TikTok's ranking) — use the date and popularity filters instead;
- profile sorting by popularity / oldest (profiles are read newest first).

Follower and following lists are only served to residential addresses: the Actor switches to them automatically for that add-on. Private accounts return their counters but no videos or lists.

### Use it via API

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("badr_xba/tiktok-scraper-pro").call(run_input={
    "searchQueries": ["pasta recipe"],
    "profiles": ["nasa"],
    "resultsPerPage": 20,
    "scrapeProfileVideos": True,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["resultType"], item.get("webVideoUrl"), item.get("playCount"))
```

**JavaScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('badr_xba/tiktok-scraper-pro').call({
    searchQueries: ['pasta recipe'],
    searchSection: '/user',
    maxProfilesPerQuery: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**cURL** (runs the Actor and returns the rows in one call):

```bash
curl -X POST "https://api.apify.com/v2/acts/badr_xba~tiktok-scraper-pro/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries": ["pasta recipe"], "resultsPerPage": 10}'
```

### Integrations

- **Make**, **Zapier** and **n8n**: use the Apify app or node with `badr_xba/tiktok-scraper-pro` and send each row to Google Sheets, Airtable, a CRM or Slack.
- **AI agents (MCP)**: add `https://mcp.apify.com/?actors=badr_xba/tiktok-scraper-pro` to Claude, Cursor or any MCP client ("find 20 TikTok videos about pasta recipes with over 100k views").
- **Schedules and webhooks**: monitor keywords, hashtags and creators daily. A run ends as *Failed* only when TikTok refused every request and nothing was saved; wrong inputs end normally, with their reasons in `FAILED_INPUTS`.

### Troubleshooting

| What you see | What to do |
|---|---|
| `BLOCKED`, `RATE_LIMITED` or `FEED_UNAVAILABLE` in FAILED_INPUTS | TikTok throttled the address. Switch **Apify Proxy** on and run again: every retry then leaves from a new address. |
| `SEARCH_QUERY_NOT_FOUND` | TikTok returned nothing for that keyword: try a broader one, or the matching hashtag. |
| A profile row but no videos | Private account (`PRIVATE_ACCOUNT`), no videos, or **Collect the videos of each profile** is off. |
| `PROFILE_FOLLOWERS_EMPTY` / `PROFILE_FOLLOWING_EMPTY` | The owner hid the list, or TikTok refused it to that session: run again. |
| Fewer posts than asked | Your date, popularity or pinned filters dropped the rest (see RUN_SUMMARY), or the source has fewer videos. |
| `INVALID_INPUT` | Read the reason next to it: usually a typo, a handle with spaces, or a link to another site. |

### FAQ

**Do I need a TikTok account?** No.

**Is it legal?** The Actor only reads public data. It can include personal data protected by laws such as the GDPR: collect it only for a legitimate purpose. TikTok's robots.txt disallows its search pages; use search responsibly, or rely on hashtags and profiles.

**Something does not work?** Open an issue on the **Issues** tab with the run ID and your input.

# Actor input Schema

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

TikTok post addresses, one per line: https://www.tiktok.com/@nasa/video/1234567890. A bare video ID, a vm.tiktok.com or tiktok.com/t/ short link, a mobile or embed link works too, with or without ?is_from_webapp=… tracking. This is the fastest and most reliable input — every field comes from the post's own page. Profile or hashtag links pasted here are moved to the right list for you.

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

Hashtags to follow, with or without the #: cooking, travel, smallbusiness, or a tiktok.com/tag/… link. A list pasted on one line (#food #travel or food, travel) is split for you. You get the hashtag's own figures (views) plus the posts published under it (switch off "Collect the videos under each hashtag" for the figures only).

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

TikTok accounts, as nasa, @nasa or a full profile URL (a comma-separated list on one line is split for you; duplicates are read once). You get the account figures — followers, likes, number of videos, bio — and, with "Collect the videos of each profile" on, its latest posts, newest first.

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

Which lists to read for each profile: its own videos, the videos it reposted, and its story if one is live right now.

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

Skip the videos a profile pinned at the top of its page (usually old, popular ones).

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

Paid add-on. Adds up to this many follower accounts of each profile, one row each, with the profile they follow in "connectedTo". 0 = off. Uses residential addresses.

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

Paid add-on. Adds up to this many accounts each profile follows. 0 = off.

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

Keywords, exactly as you would type them in TikTok search ("pasta recipe", "nike shoes"). Use the section below to get videos (default) or profiles.

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

Videos returns the videos TikTok ranks for the keyword; Profiles returns matching accounts (followers, likes, bio) — set how many with "Profiles per search".

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

Only for profile searches: how many accounts to return per keyword.

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

How many posts to collect under each hashtag, for each profile, for each video search query, and next to each post URL when related videos are on. Post URLs you list yourself are never limited by this.

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

A ceiling on the number of posts for the whole run, across every input. The run stops exactly there. Leave at 0 for no ceiling. Independently, the run also stops cleanly when your "Maximum cost per run" is reached.

## `scrapeProfileVideos` (type: `boolean`):

On, each profile also returns its latest posts (up to "Videos per hashtag or profile"), read from TikTok's creator feed without a browser. Off, you only get the account figures — one result per profile.

## `scrapeHashtagVideos` (type: `boolean`):

On, each hashtag also returns its posts; this opens a browser and takes about half a minute per hashtag. Off, you only get the hashtag's counters, which is much faster.

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

Adds the posts TikTok recommends next to each post URL you listed — about fifteen per post. A cheap way to widen a sample around a topic. TikTok serves these mostly to residential addresses.

## `oldestPostDate` (type: `string`):

Paid filter. Keep only posts published after this date: 2026-01-31, or a phrase such as 7 days, 3 weeks, 2 months. Leave empty for no limit. On profiles, reading stops as soon as posts get older than this date.

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

Paid filter. Keep only posts published before this date, same formats as above. Leave empty for no limit.

## `minPlayCount` (type: `integer`):

Paid filter. Drop posts watched fewer times than this. 0 keeps everything.

## `minDiggCount` (type: `integer`):

Paid filter. Drop posts with fewer likes than this. 0 keeps everything.

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

Paid filter. Keeps only videos with fewer likes than this (find rising, non-viral posts).

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

Paid add-on, billed per video file saved. Saves each MP4 in the run's storage and adds its address to the row (videoUrl). Expect a much longer, heavier run.

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

Saves the thumbnail of each post (coverUrl).

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

Saves the profile picture of each author, once per account (avatarUrl).

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

Saves the artwork of the sound used by each post (musicCoverUrl).

## `shouldDownloadSubtitles` (type: `boolean`):

Saves the subtitle tracks TikTok publishes for a post, when it has any (subtitleUrls).

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

Photo posts carry images instead of a video: this saves them, up to twenty per post (slideshowImageUrls).

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

Paid add-on. Reads TikTok from addresses in this country, for content available only there. Requires the Apify proxy (residential works best).

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

Apify Proxy is optional: post URLs, hashtags and profile figures work without it. Switch it on (datacenter group) if the FAILED_INPUTS record shows BLOCKED, RATE_LIMITED or FEED_UNAVAILABLE: every retry then leaves from a new address. The RESIDENTIAL group only helps related videos.

## Actor input object example

```json
{
  "postURLs": [
    "https://www.tiktok.com/@khaby.lame/video/7425321081298341152"
  ],
  "hashtags": [
    "cooking"
  ],
  "profiles": [
    "nasa"
  ],
  "profileScrapeSections": [
    "videos"
  ],
  "excludePinnedPosts": false,
  "maxFollowersPerProfile": 0,
  "maxFollowingPerProfile": 0,
  "searchSection": "",
  "maxProfilesPerQuery": 10,
  "resultsPerPage": 10,
  "maxItems": 0,
  "scrapeProfileVideos": true,
  "scrapeHashtagVideos": true,
  "scrapeRelatedVideos": false,
  "minPlayCount": 0,
  "minDiggCount": 0,
  "shouldDownloadVideos": false,
  "shouldDownloadCovers": false,
  "shouldDownloadAvatars": false,
  "shouldDownloadMusicCovers": false,
  "shouldDownloadSubtitles": false,
  "shouldDownloadSlideshowImages": false,
  "proxyCountryCode": "None",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Author, caption, views, likes, comments, shares and publication date.

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

Followers, likes, number of videos and bio of each account.

## `hashtags` (type: `string`):

Total views of each hashtag.

## `authors` (type: `string`):

Account figures and the sound behind each post.

## `media` (type: `string`):

Video dimensions and the files the run downloaded.

## `allFields` (type: `string`):

Every field, including hashtags, mentions, labels and video metadata.

## `runSummary` (type: `string`):

Results saved and billed, failures by code, filters applied, duration, and whether a limit stopped the run.

## `failedInputs` (type: `string`):

Every input the run could not read, with its error code. These are not billed.

# 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 = {
    "postURLs": [
        "https://www.tiktok.com/@khaby.lame/video/7425321081298341152"
    ],
    "hashtags": [
        "cooking"
    ],
    "profiles": [
        "nasa"
    ],
    "resultsPerPage": 10,
    "maxItems": 0,
    "scrapeProfileVideos": true,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("badr_xba/tiktok-scraper-pro").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 = {
    "postURLs": ["https://www.tiktok.com/@khaby.lame/video/7425321081298341152"],
    "hashtags": ["cooking"],
    "profiles": ["nasa"],
    "resultsPerPage": 10,
    "maxItems": 0,
    "scrapeProfileVideos": True,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("badr_xba/tiktok-scraper-pro").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 '{
  "postURLs": [
    "https://www.tiktok.com/@khaby.lame/video/7425321081298341152"
  ],
  "hashtags": [
    "cooking"
  ],
  "profiles": [
    "nasa"
  ],
  "resultsPerPage": 10,
  "maxItems": 0,
  "scrapeProfileVideos": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call badr_xba/tiktok-scraper-pro --silent --output-dataset

```

## MCP server setup

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

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/gea8hEP6HVUUzthI0/builds/ivLrVCr8PIS4h5EG9/openapi.json
