# TikTok Profile Scraper (`datapilot/tiktok-profile-scraper`) Actor

Extract usernames, display names, bios, followers, following, likes, video counts, profile photos, verification status, and privacy status from profile URLs or usernames. Supports , Apify Proxy, and batch exports.

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

## Pricing

from $2.00 / 1,000 scraped 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 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 Profile** Scraper is a powerful Apify Actor designed to discover, track, and collect public **TikTok Profile** data directly from TikTok's own profile pages using a full browser engine. This tool provides comprehensive **TikTok Profile** intelligence including nickname, bio, follower count, following count, likes, video count, verification status, and profile picture for any accessible **TikTok Profile**. Whether you're building a creator dashboard, tracking competitor accounts, or conducting social media research, the TikTok Profile Scraper delivers actionable **TikTok Profile** insights efficiently.

With direct  browser automation, embedded JSON state extraction, HTML metadata fallback, and reliable Apify Dataset delivery, the TikTok Profile Scraper ensures comprehensive **TikTok Profile** coverage across any list of usernames or profile links. It focuses on key **TikTok Profile** signals including followers, following, likes, and video count, making it an essential tool for social media research and creator intelligence.

***

### 📋 Table of Contents

- [Features](#-features)
- [Data Source](#-data-source)
- [How It Works](#-how-it-works)
- [Input](#-input)
- [Output](#-output)
- [Technical Stack](#-technical-stack)
- [Data Fields](#-data-fields-explained)
- [Use Cases](#-use-cases)
- [Quick Start](#-quick-start)
- [Configuration](#-configuration)
- [Performance](#-performance)
- [Important Notes](#-important-notes)
- [License & Legal](#-license--legal)

***

### 🔥 Features

- **Real Browser Rendering** – Uses  with headless Chromium to load each **TikTok Profile** exactly as a real visitor would.
- **Flexible Input Handling** – Accepts plain usernames, `@handles`, or full **TikTok Profile** URLs and normalizes them automatically.
- **Embedded JSON State Extraction** – Reads TikTok's own `__UNIVERSAL_DATA_FOR_REHYDRATION__` script tag for accurate, structured **TikTok Profile** data.
- **HTML Metadata Fallback** – Falls back to OpenGraph meta tags when the embedded JSON state isn't available on a **TikTok Profile** page.
- **Full Engagement Metrics** – Captures followers, following, likes, and video count for each **TikTok Profile**.
- **404 Detection** – Automatically detects and skips **TikTok Profile** pages that no longer exist.
- **Residential Proxy Support** – Apify residential proxy routed through  for reliable **TikTok Profile** access.
- **Realistic Browser Fingerprint** – Custom user agent and viewport to reduce detection while loading each **TikTok Profile**.
- **Batch Processing** – Scrape any number of **TikTok Profile** entries in a single run.
- **Human-Like Pacing** – Built-in delay between **TikTok Profile** page loads to reduce blocking.
- **Real-Time Dataset Push** – Pushes all collected **TikTok Profile** records to Apify Dataset in a single batch.
- **Graceful Error Handling** – Skips a failing **TikTok Profile** without stopping the whole run.

***

### 📊 Data Source

#### **TikTok Public Profile Pages**

- **Authority**: TikTok's own public-facing profile pages
- **Access Method**: Headless Chromium browser via , rendering `tiktok.com/@{username}`
- **Coverage**: Any public **TikTok Profile** reachable without login
- **Data**: Embedded JSON user/stats state, with OpenGraph metadata as fallback
- **Access**: Public pages, no API key required
- **Update Frequency**: Reflects each **TikTok Profile**'s current live state at time of run

***

### ⚙️ How It Works

The TikTok Profile Scraper accepts a list of usernames or profile URLs, normalizes each into a clean handle, and drives a real headless Chromium browser to each **TikTok Profile** page. Once the page loads, the Actor evaluates JavaScript in the browser context to read TikTok's `__UNIVERSAL_DATA_FOR_REHYDRATION__` script tag, extracting the structured `userInfo` object with full user and stats details. If that embedded state isn't available, the Actor falls back to parsing OpenGraph meta tags with BeautifulSoup. Every successfully scraped **TikTok Profile** record is collected and pushed to the Apify Dataset in a single batch at the end of the run.

**Key Processing Steps:**

1. **Input Parsing** – Accept a list of usernames, handles, or full **TikTok Profile** URLs
2. **Username Normalization** – Strip `@` symbols and extract the username from full URLs
3. **Proxy Setup** – Configure Apify residential proxy and pass credentials into
4. **Browser Launch** – Start headless Chromium with a realistic user agent and viewport
5. **Profile Loop** – Iterate through each normalized **TikTok Profile** username
6. **Page Navigation** – Load `tiktok.com/@{username}` and wait for DOM content
7. **404 Check** – Detect and skip missing **TikTok Profile** pages
8. **JSON State Extraction** – Read the embedded `userInfo` object via in-page JavaScript
9. **HTML Fallback** – Parse OpenGraph metadata if the JSON state is unavailable
10. **Timestamp Tagging** – Record scrape time per entry
11. **Rate Limiting** – Apply a short delay between **TikTok Profile** loads
12. **Dataset Push** – Push all collected records from the run in a single batch

**Key Benefits:**

- Pull **TikTok Profile** data for any public account without manual visits
- Detect missing or deactivated **TikTok Profile** pages automatically
- Monitor creator and brand accounts' **TikTok Profile** metrics over time
- Feed social media dashboards, research pipelines, or influencer-tracking tools
- Automate recurring **TikTok Profile** checks as follower or like counts change

***

### 📥 Input

The Actor accepts the following input parameters:

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `profiles` | array | *(required)* | List of **TikTok Profile** usernames, `@handles`, or full profile URLs. |
| `useApifyProxy` | boolean | `true` | Enable Apify residential proxies. |
| `apifyProxyGroups` | array | `["RESIDENTIAL"]` | Proxy group configuration. |

**Example Input:**

```json
{
  "profiles": [
    "tiktok",
    "@nasa",
    "https://www.tiktok.com/@natgeo"
  ],
  "useApifyProxy": true,
  "apifyProxyGroups": ["RESIDENTIAL"]
}
```

**Scrape a Single TikTok Profile:**

```json
{
  "profiles": ["natgeo"]
}
```

**Scrape from Full Profile URLs:**

```json
{
  "profiles": [
    "https://www.tiktok.com/@nasa",
    "https://www.tiktok.com/@natgeo"
  ]
}
```

***

### 📤 Output

The Actor pushes **TikTok Profile** records with the following structure:

| Field | Type | Description |
|-------|------|-------------|
| `username` | string | The normalized **TikTok Profile** username used for the request |
| `full_name` | string | Nickname (or unique ID) extracted from the **TikTok Profile** |
| `profile_url` | string | The full **TikTok Profile** URL |
| `description` | string | Bio/signature text on the **TikTok Profile** |
| `followers` | integer/null | Follower count for the **TikTok Profile** |
| `following` | integer/null | Following count for the **TikTok Profile** |
| `likes` | integer/null | Total likes (hearts) received on the **TikTok Profile** |
| `video_count` | integer/null | Number of videos posted on the **TikTok Profile** |
| `profile_pic` | string | URL of the **TikTok Profile** picture |
| `is_verified` | boolean | Whether the **TikTok Profile** has a verified badge |
| `is_private` | boolean | Whether the **TikTok Profile** is private |
| `scraped_at` | string | ISO 8601 timestamp of when the record was scraped |

**Example TikTok Profile Record:**

```json
{
  "username": "natgeo",
  "full_name": "National Geographic",
  "profile_url": "https://www.tiktok.com/@natgeo",
  "description": "Experience the world through the eyes of National Geographic.",
  "followers": 5200000,
  "following": 120,
  "likes": 48000000,
  "video_count": 1450,
  "profile_pic": "https://p16-sign-va.tiktokcdn.com/...",
  "is_verified": true,
  "is_private": false,
  "scraped_at": "2026-08-05T09:00:00+00:00"
}
```

***

### 🧰 Technical Stack

- **Browser Automation:** Playwright with headless Chromium for real **TikTok Profile** rendering
- **State Extraction:** In-page JavaScript evaluation of TikTok's `__UNIVERSAL_DATA_FOR_REHYDRATION__` state
- **HTML Parsing:** BeautifulSoup for OpenGraph metadata fallback
- **Date Handling:** `datetime` with timezone-aware UTC timestamps
- **Async:** `asyncio` for non-blocking, multi-profile processing
- **Proxy:** Apify Proxy with `RESIDENTIAL` configuration, wired into Playwright's proxy settings
- **Logging:** Apify Actor logging system
- **Platform:** Apify Actor serverless environment

***

### 📊 Data Fields Explained

#### **Identity**

- **username**: The normalized handle used to build the **TikTok Profile** URL
- **full\_name**: The nickname or unique ID shown on the **TikTok Profile**

#### **Engagement Metrics**

- **followers / following / likes / video\_count**: Core **TikTok Profile** growth and activity metrics pulled from the embedded stats object

#### **Profile Details**

- **description**: The bio/signature text on the **TikTok Profile**
- **profile\_pic**: Direct link to the **TikTok Profile** picture
- **is\_verified / is\_private**: Account verification and privacy status

***

### 🎯 Use Cases

- **Creator Research** – Evaluate follower and engagement metrics before an influencer partnership
- **Competitor Tracking** – Monitor a competitor's **TikTok Profile** growth over time
- **Social Media Auditing** – Verify account authenticity, verification, and privacy status
- **Marketing Analytics** – Feed **TikTok Profile** metrics into campaign dashboards
- **Trend Research** – Study public **TikTok Profile** activity across a niche
- **Brand Monitoring** – Track how partner or affiliate accounts present themselves
- **OSINT Research** – Gather publicly available **TikTok Profile** metadata for investigations

***

### 🚀 Quick Start

#### **1. Prepare Input**

Go to Apify Console and enter:

```json
{
  "profiles": ["nasa", "natgeo"]
}
```

#### **2. Run the Actor**

Click **Start**. The Actor will:

- Normalize each username or URL into a clean **TikTok Profile** handle
- Launch a headless browser and visit each **TikTok Profile** page
- Extract embedded JSON state or fall back to OpenGraph metadata
- Push all results to the Dataset

#### **3. Monitor Progress**

Console shows:

```
Initializing TikTok Scraper for 2 account(s)...
[TikTok Scraper] Navigating to profile: '@nasa'
 -> Successfully extracted JS state for @nasa
[TikTok Scraper] Navigating to profile: '@natgeo'
 -> Successfully extracted JS state for @natgeo
Done! Successfully saved 2 TikTok profile(s) to Dataset.
```

#### **4. View & Download Results**

- **Results Tab**: All **TikTok Profile** records
- **Export**: JSON, CSV, Excel, or HTML
- **Filter**: By follower count, verification, or privacy status
- **API Access**: Available via the Apify API

***

### ⚙️ Configuration

Single TikTok Profile:

```json
{
  "profiles": ["natgeo"]
}
```

Mixed usernames and URLs:

```json
{
  "profiles": [
    "@nasa",
    "https://www.tiktok.com/@natgeo"
  ]
}
```

Run without proxy:

```json
{
  "profiles": ["natgeo"],
  "useApifyProxy": True 
}
```

***

### 📈 Performance

#### **Processing Speed**

- One full browser page load per **TikTok Profile**
- Fixed ~4 second settle time per page load plus a 2 second delay between profiles
- Scales linearly with the number of usernames/URLs submitted

#### **Resource Usage**

- Memory: Moderate, due to running a real Chromium browser instance
- Network: One page navigation per **TikTok Profile**, plus associated page assets
- Proxy: One residential proxy session shared across the browser context for the run

***

### ⚠️ Important Notes

#### **Legal & Compliance**

- **Fair Use**: Respects TikTok's public pages and applies pacing delays between requests
- **Public Data Only**: Retrieves only publicly visible **TikTok Profile** data exposed on the rendered page
- **Privacy**: Collecting profile data may be subject to privacy regulations and TikTok's Terms of Service — use only for legitimate purposes
- **Legal**: Not legal advice — consult qualified professionals before using this data for compliance-sensitive decisions

#### **Data Quality**

- **Freshness**: Reflects each **TikTok Profile**'s live state at time of run
- **Completeness**: Follower/likes/video counts depend on the embedded JSON state being available; the HTML fallback returns fewer fields
- **Accuracy**: Sourced directly from TikTok's own rendered pages
- **Verification**: Cross-check high-stakes figures against the live TikTok app or website

#### **Best Practices**

- Always configure a residential proxy for the most reliable **TikTok Profile** access
- Use full profile URLs when a username alone is ambiguous
- Keep batch sizes reasonable, since each **TikTok Profile** requires a full browser page load
- Re-run periodically to track changes in engagement metrics
- Expect `followers`, `following`, and `likes` to be `null` when the run falls back to HTML parsing

***

### 📄 License & Legal

**Terms of Use:**

- Use for legitimate research, marketing, and analytics purposes
- Respect TikTok's Terms of Service
- Do not use for unsolicited contact, harassment, or unlawful surveillance
- Use **TikTok Profile** data responsibly and in compliance with applicable privacy laws

**Disclaimer:**
TikTok Profile Scraper is provided as-is for research and analytics purposes. Users are responsible for compliance with TikTok's ToS and all applicable laws. This is not legal advice.

***

### ⚖️ TikTok Profile Excellence

This Actor is optimized for **TikTok Profile** research with:

- ✅ Real browser rendering for accurate data
- ✅ Flexible username/URL input handling
- ✅ Embedded JSON state extraction with HTML fallback
- ✅ 404 and missing-profile detection
- ✅ Real-time Dataset push
- ✅ Production-ready code

# Actor input Schema

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

Enter TikTok usernames or profile URLs (e.g. tiktok or https://www.tiktok.com/@tiktok).

## `useApifyProxy` (type: `boolean`):

Recommended to bypass TikTok rate limits and blocks.

## `apifyProxyGroups` (type: `array`):

Select proxy networks (RESIDENTIAL is highly recommended).

## Actor input object example

```json
{
  "profiles": [
    "tiktok"
  ],
  "useApifyProxy": true,
  "apifyProxyGroups": [
    "RESIDENTIAL"
  ]
}
```

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datapilot/tiktok-profile-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"] }

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

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "profiles": [
    "tiktok"
  ]
}' |
apify call datapilot/tiktok-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datapilot/tiktok-profile-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/5xedkao0cf5zCmWyo/builds/SicOdkF7Rs76qpfGQ/openapi.json
