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

Extract TikTok profile metadata and exact stats — followers, likes, videos, bio, avatars, and account flags — from URLs or usernames. Fast HTTP scraping with proxy support.

- **URL**: https://apify.com/alien\_force/tiktok-profile-scraper.md
- **Developed by:** [Alien Force](https://apify.com/alien_force) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 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.
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 Profile Scraper

### Overview

The **TikTok Profile Scraper** extracts public profile metadata and statistics for TikTok accounts. Give it profile URLs or usernames and it returns one structured row per account: display name, bio, bio link, avatars, account flags, and follower / likes / video counts.

#### Key Features

- **Profile Metadata and Stats**: Username, user ID, display name, bio, bio link, avatars, account creation time, and follower / following / likes / video / friend counts.
- **Exact Counts**: Returns full integer counts (for example `79,731,015` followers) instead of abbreviated values like `79.7M`.
- **URLs or Usernames**: Accepts profile URLs, video URLs (the author's profile is scraped), bare handles, and `@handles`. Targets are deduplicated per username.
- **Account Flags**: Verified, private, organization, business (commerce), and TikTok Shop seller.
- **Proxy Support**: Configure Apify Proxy or your own proxies. Datacenter proxies are the default; residential is available if TikTok starts blocking.
- **Fast and Lightweight**: Built for quick, low-cost runs without a browser.

***

### Input Schema

#### Input Properties

1. **`startUrls`**

   - **Type**: `array`
   - **Description**: TikTok profile URLs to scrape. Video URLs are accepted too — the profile of the video author is scraped.
   - **Example**:
     ```json
     [
         { "url": "https://www.tiktok.com/@therock" },
         { "url": "https://www.tiktok.com/@khaby.lame" }
     ]
     ```

2. **`usernames`**

   - **Type**: `array` of `string`
   - **Description**: TikTok usernames, with or without the leading `@`. Merged with `startUrls` and deduplicated.
   - **Example**: `["therock", "@khaby.lame"]`

3. **`proxyConfiguration`**

   - **Type**: `object`
   - **Description**: Proxy settings for the run. Apify Proxy datacenter IPs are used by default. If TikTok starts returning challenge pages, switch to the `RESIDENTIAL` group.
   - **Example**:
     ```json
     { "useApifyProxy": true }
     ```

At least one of `startUrls` or `usernames` must contain a valid target, otherwise the run fails with an input error.

#### Input Example

```json
{
    "startUrls": [{ "url": "https://www.tiktok.com/@therock" }],
    "usernames": ["khaby.lame"],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

***

### Output

One dataset row per requested account.

| Field | Type | Description |
| --- | --- | --- |
| `inputUrl` | string | URL or username as given in the input |
| `profileUrl` | string | Canonical profile URL |
| `username` | string | Username |
| `id` | string | User ID |
| `secUid` | string | Stable account identifier |
| `nickname` | string | Display name |
| `bio` | string | Profile bio |
| `bioLink` | string | Link in bio |
| `avatar` / `avatarMedium` / `avatarThumb` | string | Avatar URLs, largest to smallest |
| `verified` | boolean | Verified account |
| `privateAccount` | boolean | Private account |
| `isOrganization` | boolean | Organization account |
| `commerceUser` | boolean | Business account |
| `ttSeller` | boolean | TikTok Shop seller |
| `language` | string | Profile language |
| `createdTime` | integer | Account creation time (Unix timestamp, seconds) |
| `followerCount` | integer | Followers |
| `followingCount` | integer | Following |
| `heartCount` | integer | Total likes received |
| `videoCount` | integer | Public videos |
| `diggCount` | integer | Likes given by the account |
| `friendCount` | integer | Mutual follows |
| `scrapedAt` | string | When the profile was scraped |

#### Output Example

```json
{
    "inputUrl": "https://www.tiktok.com/@therock",
    "profileUrl": "https://www.tiktok.com/@therock",
    "username": "therock",
    "id": "6745191554350760966",
    "secUid": "MS4wLjABAAAAM3R2BtjzVT-uAtstkl2iugMzC6AtnpkojJbjiOdDDrdsTiTR75-8lyWJCY5VvDrZ",
    "nickname": "The Rock",
    "bio": "CEO of #RockTok\nLife's so much sweeter when you're not an asshole",
    "bioLink": "therock.komi.io",
    "verified": true,
    "privateAccount": false,
    "followerCount": 79731015,
    "followingCount": 0,
    "heartCount": 685537318,
    "videoCount": 567,
    "diggCount": 0,
    "friendCount": 0,
    "createdTime": 1570487607,
    "scrapedAt": "2026-09-16T13:41:02.884Z"
}
```

#### Handling of missing and blocked accounts

Inputs that yield no profile are kept out of the dataset and reported in the **`RUN_REPORT`** record in the run's key-value store, alongside a warning in the log. Each entry lists the original `input`, the resolved `username` and `profileUrl`, a `reason` (`notFound`, `invalidInput`, or `requestFailed`), and a human-readable `message`:

```json
{
    "profilesScraped": 3,
    "skippedCount": 1,
    "skipped": [
        {
            "input": "zzz_no_such_user_98765_qa",
            "username": "zzz_no_such_user_98765_qa",
            "profileUrl": "https://www.tiktok.com/@zzz_no_such_user_98765_qa",
            "reason": "notFound",
            "message": "Account not found"
        }
    ],
    "finishedAt": "2026-09-16T15:34:45.021Z"
}
```

- **Account does not exist or was removed**: skipped as `notFound`.
- **Input without a usable username**: skipped as `invalidInput`. If *no* input yields a username, the run fails with an input error.
- **Private account**: scraped normally — metadata and stats are returned with `privateAccount: true`.
- **Blocked request**: automatically retried. If every retry fails, the input is skipped as `requestFailed`. A run where *all* targets were blocked fails with a clear message.

The run's status message always reports how many profiles were scraped and how many inputs were skipped.

# Actor input Schema

## `startUrls` (type: `array`):

TikTok profile URLs to scrape, for example https://www.tiktok.com/@therock. Video URLs are accepted too — the profile of the video author is scraped.

## `usernames` (type: `array`):

TikTok usernames to scrape, with or without the leading @. Merged with Profile URLs and deduplicated.

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

Select proxies to be used by your crawler. Datacenter proxies are used by default; switch to RESIDENTIAL if TikTok starts blocking requests.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.tiktok.com/@therock"
    }
  ],
  "usernames": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        {
            "url": "https://www.tiktok.com/@therock"
        }
    ],
    "usernames": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alien_force/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 = {
    "startUrls": [{ "url": "https://www.tiktok.com/@therock" }],
    "usernames": [],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("alien_force/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 '{
  "startUrls": [
    {
      "url": "https://www.tiktok.com/@therock"
    }
  ],
  "usernames": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call alien_force/tiktok-profile-scraper --silent --output-dataset

```

## MCP server setup

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