# TikTok Profile Scraper (Private & Public) (`scraper-engine/tiktok-profile-scraper-private-and-public`) Actor

- **URL**: https://apify.com/scraper-engine/tiktok-profile-scraper-private-and-public.md
- **Developed by:** [Scraper Engine](https://apify.com/scraper-engine) (community)
- **Categories:** Automation, Lead generation, Social media
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Profile Scraper (Private & Public)

Scrape **any TikTok profile** — public *or* private — in seconds. Hand the actor a list of URLs or `@handles` and get back a tidy dataset row per profile: followers, following, likes, video count, bio, avatar, verification, and more.

> ⚡ Built for **speed**. 🛡️ Built for **survival**. 🎯 Built for **accuracy**.

---

### 💡 Why this Actor?

- **🚀 Lightning fast** — concurrent requests, real-time results streamed straight into your dataset.
- **🛡️ Self-healing proxy ladder** — starts on a direct connection, automatically escalates to a 🛰️ datacenter proxy, then a 🏠 residential proxy if TikTok pushes back.
- **🤖 Browser-grade fingerprinting** — powered by [`impit`](https://github.com/apify/impit) for TLS/HTTP fingerprints that look like a real Chrome.
- **🔄 Dual-source extraction** — tries the full TikTok profile page first, transparently falls back to the embed endpoint when TikTok serves a stripped shell.
- **🛟 Overflow-safe counts** — recovers 32-bit wrapped counts so creators with billions of likes still report correctly.
- **🪶 Clean output** — one dataset row per profile, ready for CSV / JSON / Excel export.

---

### 🔑 Key features

- 📥 **Bulk input** — paste hundreds of profiles at once.
- 🌐 **Smart proxy escalation** — sticky once it kicks in, so you never bounce between tiers.
- 🧵 **Concurrency control** — tune how aggressive the scraper is.
- 🔁 **Retries with backoff** — 3 retries on residential by default, exponential cooldown.
- 📡 **Live progress** — engaging real-time status messages and per-profile result lines.
- 🛟 **Partial success** — one bad URL never kills the run; failed rows are surfaced with an `error` field.

---

### 🧩 Input

| Field | Type | Description |
|---|---|---|
| `urls` | array | TikTok profile URLs, `@handles`, or plain handles. **Required.** |
| `tiktokSource` | enum | `user` (recommended) or `embed`. Defaults to `user`. |
| `proxyConfiguration` | object | Defaults to **no proxy**. The actor escalates automatically when blocked. |
| `concurrency` | integer | Profiles in parallel (1–20). Default `5`. |
| `maxRetries` | integer | Retries per profile on residential tier (1–10). Default `3`. |
| `requestTimeoutSecs` | integer | Per-request timeout (5–120s). Default `30`. |

```json
{
  "urls": [
    { "url": "https://www.tiktok.com/@mrbeast" },
    { "url": "https://www.tiktok.com/@charlidamelio" }
  ],
  "tiktokSource": "user",
  "proxyConfiguration": { "useApifyProxy": false },
  "concurrency": 5,
  "maxRetries": 3,
  "requestTimeoutSecs": 30
}
````

***

### 📤 Output

One row per profile, pushed to the **default dataset** live as the run progresses.

```json
{
  "url": "https://www.tiktok.com/@mrbeast",
  "username": "mrbeast",
  "tagline": "MrBeast",
  "following": { "raw": 351, "formatted": 351 },
  "followers": { "raw": 127615276, "formatted": "127.6M" },
  "likes":     { "raw": 1303707890, "formatted": "1.3B" },
  "videos":    { "raw": 460, "formatted": 460 },
  "bio": "Watch my latest video! 👇",
  "image": "https://p16-common-sign.tiktokcdn.com/...jpeg",
  "public_profile": true,
  "requestUrl": "https://www.tiktok.com/@mrbeast"
}
```

| Field | Meaning |
|---|---|
| `url` | Canonical TikTok profile URL. |
| `username` | Resolved TikTok handle (without the `@`). |
| `tagline` | Display name shown on the profile. |
| `following` / `followers` / `likes` / `videos` | `{raw, formatted}` pair for every stat. |
| `bio` | Profile signature / bio text. |
| `image` | Highest-resolution avatar URL available. |
| `public_profile` | `true` for open accounts, `false` for private ones. |
| `requestUrl` | The exact endpoint that finally produced the data. |

If a profile cannot be retrieved, the row contains `username`, `url`, and `error` instead — so partial success is preserved.

***

### 🛡️ How the proxy ladder works

By default the actor sends requests with **no proxy**. If TikTok rejects the request:

1. **🛰️ Datacenter proxy** — the actor switches to Apify's datacenter group and retries.
2. **🏠 Residential proxy** — if datacenter is still blocked, the actor escalates to residential proxies with up to **3 retries** and exponential backoff.
3. **🔒 Sticky tier** — once a tier escalation happens, **every remaining request** uses the higher tier. You never bounce back to a lower tier mid-run.

Every escalation is logged clearly so you can see exactly when and why the connection upgraded.

***

### 🚀 How to use the Actor (via Apify Console)

1. 🔑 Log in at [console.apify.com](https://console.apify.com) → **Actors**.
2. 🔎 Find **TikTok Profile Scraper (Private & Public)** and click it.
3. ⚙️ Configure inputs — paste your URLs / handles, tweak proxy and concurrency if needed.
4. ▶️ Click **Start**.
5. 📡 Watch the live log — you'll see each profile resolved as it lands.
6. 📊 Open the **Output** tab for results.
7. 📦 Export to JSON / CSV / Excel / XML / HTML.

***

### 🎯 Best use cases

- 📈 **Creator analytics** — track follower / like growth across a portfolio.
- 🤝 **Influencer marketing** — vet profiles in bulk before outreach.
- 🛒 **E-commerce / DTC research** — find creators in your niche.
- 🧪 **Trend research & data journalism** — gather public profile snapshots at scale.

***

### ❓ Frequently asked questions

**Does it work for private profiles?**
It returns the same metadata TikTok shows on the profile shell (username, display name, follower / like / video counts when public, avatar, `public_profile: false`). Posts inside private accounts are not exposed.

**Why are some counts shown as 1.3B instead of the exact number?**
Each stat has both `raw` (exact integer) and `formatted` (human-readable). Use whichever fits your workflow.

**TikTok blocked my IP — what do I do?**
Nothing — the actor automatically escalates to a datacenter, then a residential proxy. You'll see a `🔁 Connection escalated → ...` line in the log.

**Can I plug this into n8n / Make / Zapier?**
Yes — Apify integrates with all of them. Run the actor on a schedule and pipe the dataset wherever you need it.

***

### 🛟 Support & feedback

Found a bug or want a new field? File an issue on the Actor's Issues tab in Apify Console. Pull requests welcome.

***

### ⚖️ Legal & ethical use

This actor only collects **publicly available** profile metadata that TikTok itself displays to anyone who visits the page. You are responsible for complying with TikTok's Terms of Service and any applicable data-protection laws (GDPR / CCPA / etc.) when using the output.

# Actor input Schema

## `urls` (type: `array`):

📥 One entry per line. Accepts any of the following formats:
• https://www.tiktok.com/@mrbeast
• @mrbeast
• mrbeast

💡 Tip: paste hundreds of profiles at once — they will be processed concurrently.

## `tiktokSource` (type: `string`):

🎯 **user** — try the full profile page first, automatically fall back to the embed endpoint when TikTok serves a stripped shell (recommended).
🚀 **embed** — go straight to the embed endpoint, fastest and most reliable for public profiles.

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

Apify proxy settings for TikTok requests. Leave disabled to let the actor auto-escalate through datacenter and residential proxies on blocks.

## Actor input object example

```json
{
  "urls": [
    "https://www.tiktok.com/@mrbeast",
    "https://www.tiktok.com/@charlidamelio"
  ],
  "tiktokSource": "user",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "urls": [
        "https://www.tiktok.com/@mrbeast",
        "https://www.tiktok.com/@charlidamelio"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraper-engine/tiktok-profile-scraper-private-and-public").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 = {
    "urls": [
        "https://www.tiktok.com/@mrbeast",
        "https://www.tiktok.com/@charlidamelio",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scraper-engine/tiktok-profile-scraper-private-and-public").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 '{
  "urls": [
    "https://www.tiktok.com/@mrbeast",
    "https://www.tiktok.com/@charlidamelio"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scraper-engine/tiktok-profile-scraper-private-and-public --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Profile Scraper (Private & Public)",
        "description": null,
        "version": "0.1",
        "x-build-id": "Rqon58iQdPViCvVFI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraper-engine~tiktok-profile-scraper-private-and-public/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraper-engine-tiktok-profile-scraper-private-and-public",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scraper-engine~tiktok-profile-scraper-private-and-public/runs": {
            "post": {
                "operationId": "runs-sync-scraper-engine-tiktok-profile-scraper-private-and-public",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scraper-engine~tiktok-profile-scraper-private-and-public/run-sync": {
            "post": {
                "operationId": "run-sync-scraper-engine-tiktok-profile-scraper-private-and-public",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "🔗 TikTok Profile URLs or @usernames",
                        "type": "array",
                        "description": "📥 One entry per line. Accepts any of the following formats:\n• https://www.tiktok.com/@mrbeast\n• @mrbeast\n• mrbeast\n\n💡 Tip: paste hundreds of profiles at once — they will be processed concurrently.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "tiktokSource": {
                        "title": "⚙️ Scrape mode",
                        "enum": [
                            "user",
                            "embed"
                        ],
                        "type": "string",
                        "description": "🎯 **user** — try the full profile page first, automatically fall back to the embed endpoint when TikTok serves a stripped shell (recommended).\n🚀 **embed** — go straight to the embed endpoint, fastest and most reliable for public profiles.",
                        "default": "user"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Apify proxy settings for TikTok requests. Leave disabled to let the actor auto-escalate through datacenter and residential proxies on blocks.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
