# TikTok Scraper - Profiles, Videos, Stats & Creator Leads (`scrapesage/tiktok-scraper`) Actor

Scrape TikTok creator profiles and video details with no login: follower & engagement stats, bios, music, download URLs, plus emails & social handles for creator lead-gen with a 0-100 lead score. Hashtags, search & comments with your login cookie. Export CSV/JSON, pay per result.

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

## Pricing

from $4.00 / 1,000 profile scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## TikTok Scraper - Profiles, Videos, Stats & Creator Leads

Scrape **TikTok** creator **profiles** and **video** details with **no login** - follower and engagement stats, bios, music, download URLs, and a creator **lead-gen** layer (e-mails and social handles). Hashtag, search and comment scraping are supported with **your own login cookie**. Export to JSON, CSV or Excel, run on a schedule, or call from the API / an AI agent.

### What you can scrape

| Input | Needs login? | You get |
|---|---|---|
| **Profiles** (`@tiktok`, `tiktok`, profile URL) | **No** | Username, name, bio, verified & private flags, region, avatar, **follower / following / likes / video counts**, business-account & seller signals, **bio link**, plus **e-mail & social handles** parsed from the bio, and a **0-100 lead score**. |
| **Video URLs** | **No** | Full video detail: description, hashtags, create time, **play / like / comment / share / save counts**, duration, cover, **download URL**, music title & author, author username. |
| **Profile video feeds** (videos per profile) | Cookie | Each profile's recent videos. |
| **Hashtags** | Cookie | A hashtag's videos + view/video counts. |
| **Search** (keywords) | Cookie | Videos or users matching each query. |
| **Comments** (per video) | Cookie | Top comments with like/reply counts and commenter info. |

> **Why some modes need a cookie:** TikTok serves an **empty response** to its feed / hashtag / search / comment APIs for logged-out sessions. Profile and single-video pages are server-rendered and need no login. To unlock the rest, paste your own TikTok `sessionid` into the **TikTok login cookie** input (see below). This scraper is honest about the gate rather than returning silently empty results.

### Why this scraper

- **Creator lead-gen built in.** Most TikTok scrapers stop at content metrics. This one turns a creator into an outreach-ready lead: bio link, e-mail (incl. `name (at) brand (dot) com` de-obfuscation), Instagram / YouTube / X / Snapchat / Facebook handles, and - with **Enrich bio link** - a crawl of their Linktree / Beacons / business site for e-mails, phones and socials, scored 0-100.
- **Complete video records.** Every engagement count (incl. saves), duration, cover, the **direct download URL**, and the full music object - not just a thin subset.
- **Reliable by design.** A dual-lane transport (fast HTTP for detail pages + an anti-detect browser that clears the "Please wait" WAF) means a transient block degrades to a slower lane, never to a failed run. Runs self-stop before the platform time limit and always finish cleanly - accurate counts too (TikTok's legacy 32-bit like counts that overflow negative for mega-creators are corrected).
- **No login for the core, no start fee, pay per result.**

### Input

```json
{
  "profiles": ["tiktok", "https://www.tiktok.com/@spacex"],
  "videoUrls": ["https://www.tiktok.com/@nasa.etw/video/7633321198176210190"],
  "enrichBioLink": true,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

With **no input** the actor runs a tiny sample (`@tiktok`) so a first "Try it" always returns data. The default (standard Apify proxy) cleared TikTok's WAF in all our tests; if a run ever comes back empty with a "Please wait" challenge note, switch the proxy input to **RESIDENTIAL (US)**.

#### Unlocking hashtags / search / feeds / comments

Paste your own TikTok login cookie into **`sessionCookie`** - either the bare `sessionid` value or a full cookie string (`sessionid=...; tt_csrf_token=...`). Get it from your browser's DevTools → Application → Cookies on `tiktok.com` while logged in. Treat it like a password (it's a secret input). Then set `maxVideosPerProfile`, `hashtags`, `searchQueries` or `commentsPerVideo`.

#### Key options

- **maxItems** - cap on list items (videos / users / comments) per source. `0` = no limit (still self-stops before the time limit).
- **maxVideosPerProfile** - `0` = profile record only (no cookie needed); `>0` also pulls recent videos (needs cookie).
- **includeVideoDetails** - open each listed video for the richest record.
- **enrichBioLink** - crawl each creator's bio link for e-mails/phones/socials (billed per profile).
- **monitorMode** / **monitorStoreName** - only-new-items tracking.

### Output (shapes)

**Profile**

```json
{
  "type": "profile", "username": "tiktok", "nickname": "TikTok",
  "url": "https://www.tiktok.com/@tiktok", "verified": true, "businessAccount": true,
  "region": "US", "followerCount": 94800000, "heartCount": 461600000, "videoCount": 1466,
  "bioLink": "linktr.ee/tiktok", "email": "...", "socialHandles": { "instagram": "..." }, "leadScore": 67
}
```

**Video**

```json
{
  "type": "video", "videoId": "744811...", "url": "https://www.tiktok.com/@user/video/744811...",
  "authorUsername": "user", "description": "...", "playCount": 9000000, "diggCount": 500000,
  "commentCount": 8000, "shareCount": 12000, "collectCount": 40000, "durationSec": 30,
  "downloadUrl": "https://...", "musicTitle": "Original sound", "hashtags": ["space"]
}
```

### Use with AI assistants (MCP)

This actor works as a tool in any MCP-compatible assistant (Claude, Cursor, VS Code). Point your client at Apify's MCP server (`https://mcp.apify.com`) and call `scrapesage/tiktok-scraper` like any other tool - great for "pull this creator's stats and contact info" or "get the details for this TikTok video" agent workflows.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** - AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** - an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) - no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** - agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### Pricing (pay per event)

| Event | Price |
|---|---|
| Profile scraped | $0.004 |
| Video scraped | $0.002 |
| Comment scraped | $0.001 |
| Enriched creator lead (bio-link crawl) | $0.005 |

No monthly fee and no per-run start fee - you pay only for the records you receive.

### FAQ

**Do I need to log in?** Not for profiles or video URLs - those are the core, no-login modes. Hashtags, search, profile feeds and comments require your own TikTok login cookie because TikTok gates those APIs for logged-out sessions.

**Proxy notes.** TikTok shows a "Please wait" WAF challenge to flagged IPs. The bundled anti-detect browser clears it from Apify's standard proxy pool in our testing (the default, and the cheaper option). If your specific targets still hit the challenge, select RESIDENTIAL (US) proxies in the input - residential IPs get the real page reliably.

**Is scraping TikTok legal?** The actor collects only publicly available data. You are responsible for using the output in line with TikTok's terms and applicable law (e.g. GDPR/CCPA for any personal data), and for how you obtain and use any login cookie you supply.

**A hashtag/search run returned 0 records.** Those modes need a login cookie (`sessionCookie`). Add one, or use profile / video-URL scraping which needs none. Empty runs aren't billed on pay-per-event.

# Actor input Schema

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

TikTok usernames or profile URLs. Accepts '@tiktok', 'tiktok' or 'https://www.tiktok.com/@tiktok'. Each yields one rich profile/creator record: follower/like/video counts, bio, region, verified & business flags, bio link, e-mail & social handles extracted from the bio, and a 0-100 lead score. Works without any login.

## `videoUrls` (type: `array`):

Specific TikTok video URLs (or IDs) for full detail: description, hashtags, play/like/comment/share/save counts, duration, cover image, download URL, and music title & author. Accepts 'https://www.tiktok.com/@user/video/123...' or a bare numeric video ID. Works without any login.

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

Hashtag names or URLs. Accepts 'space', '#space' or 'https://www.tiktok.com/tag/space'. Returns the hashtag's videos (and view/video counts). NOTE: TikTok gates hashtag feeds for logged-out sessions - this mode returns data only when you provide a 'TikTok login cookie' below. Profile and video-URL scraping do NOT need a cookie.

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

Keywords to search TikTok. Returns videos (or users, see 'Search type'), up to 'Max items' per query. NOTE: TikTok gates search for logged-out sessions - this mode returns data only when you provide a 'TikTok login cookie' below.

## `searchType` (type: `string`):

What each search query returns: videos or user profiles.

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

Maximum number of list items (videos, search results or comments) to return per input source. Profile and single-video-URL records are always returned and do not count against this. Set 0 for no limit (the run still self-stops before the platform time limit and returns what it has).

## `maxVideosPerProfile` (type: `integer`):

For each profile, how many of its recent videos to also scrape. 0 = scrape the profile record only (fastest, no cookie needed). NOTE: TikTok gates profile FEEDS for logged-out sessions, so a value > 0 returns videos only when you provide a 'TikTok login cookie' below. The profile record itself always works without one.

## `includeVideoDetails` (type: `boolean`):

When listing videos (profile feeds, hashtags, search), open each video page for the richest record (exact save/collect count, full music object, sticker/subtitle info). Slower and costlier. Off by default because the feed already carries description, all engagement counts, duration, cover, music and hashtags.

## `commentsPerVideo` (type: `integer`):

How many top comments to scrape per video (for videos in 'Video URLs'). 0 = no comments. NOTE: TikTok gates comments for logged-out sessions, so this returns data only with a 'TikTok login cookie' below. Video details themselves need no cookie. Each comment is billed separately.

## `sessionCookie` (type: `string`):

Optional. Paste your own TikTok 'sessionid' cookie value (or a full cookie string like 'sessionid=...; tt\_csrf\_token=...') to unlock the login-gated modes: profile video feeds, hashtag feeds, search and comments. TikTok returns empty data on these for logged-out sessions. Profile and video-URL scraping never need this. Get it from your browser's DevTools > Application > Cookies on tiktok.com while logged in. Treat it like a password.

## `enrichBioLink` (type: `boolean`):

For each profile, crawl the creator's bio link (Linktree, Beacons, business site, etc.) for publicly listed e-mail addresses, phone numbers and social profiles - turning a creator into an outreach-ready lead. Billed as an 'Enriched creator lead' add-on per profile.

## `monitorMode` (type: `boolean`):

Remember items seen on previous runs (in a named key-value store) and emit only NEW videos/profiles on later runs. Ideal for scheduled tracking of a creator, hashtag or search.

## `monitorStoreName` (type: `string`):

Named key-value store that holds the 'seen' fingerprints for monitor mode. Leave blank to use a default store per run source.

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

Defaults to Apify's standard proxy pool - the bundled anti-detect browser clears TikTok's WAF from it in our testing, at a lower cost than residential. If your runs come back empty with a 'Please wait' challenge message, switch to RESIDENTIAL proxies (US) here. You may also bring your own proxy URLs.

## `headful` (type: `boolean`):

Run the anti-detect browser headful (recommended - clears the WAF more reliably). Advanced users can disable.

## `debugMode` (type: `boolean`):

Dump raw rendered pages / API payloads to the key-value store for troubleshooting. Leave off for normal runs.

## Actor input object example

```json
{
  "profiles": [
    "tiktok",
    "https://www.tiktok.com/@spacex"
  ],
  "videoUrls": [
    "https://www.tiktok.com/@nasa.etw/video/7633321198176210190"
  ],
  "hashtags": [
    "space",
    "nasa"
  ],
  "searchQueries": [
    "mars rover",
    "space launch"
  ],
  "searchType": "video",
  "maxItems": 100,
  "maxVideosPerProfile": 0,
  "includeVideoDetails": false,
  "commentsPerVideo": 0,
  "enrichBioLink": false,
  "monitorMode": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "headful": true,
  "debugMode": false
}
```

# Actor output Schema

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

All scraped TikTok records (profiles, videos, comments, hashtags) as JSON items in the default dataset.

# 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": [
        "tiktok"
    ],
    "maxItems": 100,
    "maxVideosPerProfile": 0,
    "commentsPerVideo": 0,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/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": ["tiktok"],
    "maxItems": 100,
    "maxVideosPerProfile": 0,
    "commentsPerVideo": 0,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "tiktok"
  ],
  "maxItems": 100,
  "maxVideosPerProfile": 0,
  "commentsPerVideo": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapesage/tiktok-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/tiktok-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/or3pf3HFzGhKwnzUv/builds/P3znkUSylxBxUBoWv/openapi.json
