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

Scrape TikTok profiles and extract usernames, display names, bios, follower counts, following counts, total likes, video counts, verification status, profile images, and profile URLs. Ideal for influencer discovery, competitor tracking, TikTok analytics, and social media research.

- **URL**: https://apify.com/shahidirfan/tiktok-profile-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

### What does TikTok Profile Scraper do?

TikTok Profile Scraper collects video details from TikTok profiles. Enter one or more usernames and the number of videos you need per profile, and the Actor collects each profile's public posts and saves their metadata to an Apify dataset.

The result is a structured list you can sort, filter, export, and connect to other tools. Every row includes the profile username, so you always know which account produced the video. Add several profiles in one run and set how many videos to collect from each.

### Why use TikTok Profile Scraper?

- **Collect posts from multiple creators in one run** - No need to open each profile and copy video links by hand.
- **Structured output** - Every video becomes one dataset row with consistent field names.
- **No video downloads** - The Actor collects metadata only, so runs finish faster and use less storage.
- **Export ready** - Download results as JSON, CSV, Excel, or XML, or read them through the Apify API.
- **Automation ready** - Schedule runs to track profiles over time or trigger workflows with webhooks.

### What data can you extract from TikTok?

| Field | Description |
|-------|-------------|
| `username` | Profile username that produced the video |
| `video_id` | Unique TikTok video identifier |
| `title` | Video caption or title |
| `author` | TikTok username of the creator |
| `publish_date` | Upload date in YYYYMMDD format |
| `duration` | Video length in seconds |
| `view_count` | Number of views |
| `like_count` | Number of likes |
| `description` | Full video description |
| `thumbnail` | Thumbnail image URL |
| `url` | Direct TikTok video URL |
| `collected_at` | ISO timestamp for when the record was saved |

### How to use TikTok Profile Scraper

1. Open the Actor on Apify Store.
2. Add one or more TikTok usernames, with or without the `@` symbol. Full profile URLs also work.
3. Set how many videos to fetch from each profile and, if needed, a proxy configuration.
4. Run the Actor.
5. Open the dataset to review the videos and their metadata.
6. Download the dataset or connect it to your workflow.

A username can contain letters, numbers, periods, and underscores, up to 24 characters. Invalid usernames stop the run with a clear validation message.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `usernames` | Array of strings | No | `["tiktok"]` | TikTok profiles to scrape, with or without `@`, or full profile URLs |
| `maxVideos` | Integer | No | `20` | Number of videos to collect from each profile |
| `proxyConfiguration` | Object | No | `{}` | Proxy settings. Empty means no proxy. Choose Apify Proxy or add custom proxy URLs in the form |

The username list has a default example so you can test the Actor right away. Replace it with the profiles you want to scrape. The Actor always collects metadata and does not download video files.

### Output Data

| Field | Type | Description |
|-------|------|-------------|
| `username` | String | Profile username that produced the video |
| `video_id` | String | Unique TikTok video identifier |
| `title` | String | Video caption or title |
| `author` | String | Creator username |
| `publish_date` | String | Upload date in YYYYMMDD format |
| `duration` | Number | Video length in seconds |
| `view_count` | Number | Views at collection time |
| `like_count` | Number | Likes at collection time |
| `description` | String | Full video description |
| `thumbnail` | String | Thumbnail image URL |
| `url` | String | Direct TikTok video URL |
| `collected_at` | String | ISO timestamp for when the record was saved |

Only public videos are saved. If a video is private, restricted, or no longer available, it is skipped and the run continues. The final log line reports how many videos were skipped.

### Usage Examples

#### Scrape one profile

Collect up to 50 videos from a single profile:

```json
{
  "usernames": ["example_creator"],
  "maxVideos": 50
}
```

#### Scrape several profiles

Collect up to 20 videos from each of three profiles in one run:

```json
{
  "usernames": ["example_creator", "another_creator", "third_creator"],
  "maxVideos": 20
}
```

#### Use full profile URLs

The username list also accepts TikTok profile URLs:

```json
{
  "usernames": [
    "https://www.tiktok.com/@example_creator",
    "https://www.tiktok.com/@another_creator"
  ],
  "maxVideos": 30
}
```

#### Use Apify Proxy

Proxy is off by default. Turn it on from the Proxy configuration field when you need a different network exit:

```json
{
  "usernames": ["example_creator", "another_creator"],
  "maxVideos": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

#### Collect a small sample

Fetch the first few videos shown on each profile:

```json
{
  "usernames": ["@example_creator", "@another_creator"],
  "maxVideos": 5
}
```

### Sample Output

```json
{
  "username": "example_creator",
  "video_id": "7706305917662268703",
  "title": "When the joke lands at the wrong time #funny #comedy",
  "author": "example_creator",
  "publish_date": "20260728",
  "duration": 23,
  "view_count": 1854000,
  "like_count": 142300,
  "description": "When the joke lands at the wrong time #funny #comedy",
  "thumbnail": "https://p16-sign-va.tiktokcdn.com/example-thumbnail.jpg",
  "url": "https://www.tiktok.com/@example_creator/video/7706305917662268703",
  "collected_at": "2026-07-28T10:30:00+00:00"
}
```

### Tips for Best Results

- Use public profiles. Private or restricted accounts return no videos.
- Add each profile to `usernames`. Every profile is scraped in the same run.
- `maxVideos` applies to each profile, not the run as a whole.
- Videos appear in the order TikTok shows them on the profile, including pinned posts.
- A large `maxVideos` value needs more feed pages, so the run takes a little longer.
- Leave proxy off for the fastest run. Enable it only when you need a different network exit.
- View, like, and publish values reflect what TikTok returned when the record was collected.
- If a profile returns no videos, check the username and try again later.
- Missing fields are a source limitation. Not every video publishes every value.

### Integrations

- **Google Sheets** - Send dataset rows to a spreadsheet for review and reporting.
- **Webhooks** - Trigger a workflow when a run finishes.
- **Make or Zapier** - Connect results to no-code automations.
- **API** - Read datasets programmatically from your own systems.
- **Apify schedules** - Re-run selected profiles hourly, daily, or weekly to track new posts.

### Frequently Asked Questions

#### Does this Actor download TikTok videos?

No. It collects public video metadata only. The dataset does not include video files or download links.

#### Can I scrape more than one profile in a single run?

Yes. Add each username to the `usernames` list. Every profile is scraped, and each saved record names the profile that produced the video.

#### How many videos does a profile return?

`maxVideos` sets the number of records to collect from each profile. The Actor saves videos shown on the profile until that count is reached, or stops early when the profile has no more public videos.

#### Are pinned videos included?

Yes. Pinned videos are part of the profile grid, so they can appear in the dataset along with the other posts.

#### Does it collect liked videos or reposts?

No. The Actor reads each profile's main video tab only.

#### Why is a profile missing from the dataset?

The profile may be private, may have no public videos, or TikTok may have returned a page without video links. Check the username, try a public profile, or run the Actor again later. Other profiles in the same run still complete.

#### Is a proxy required?

No. Proxy is off by default and the Actor does not need one: it reads TikTok's public creator feed and video pages directly. Enable a proxy only when you need a different network exit.

#### What happens to private or unavailable videos?

They are skipped. The dataset contains only public video details, and the final log reports how many videos were skipped during the run.

#### Why are some fields empty?

TikTok does not publish every value for every video. A missing view, like, or thumbnail value is reported as an empty field rather than invented.

#### Can I export the data to CSV or Excel?

Yes. Apify datasets can be downloaded in CSV, Excel, JSON, XML, and other supported formats after a run.

#### Can I run this Actor on a schedule?

Yes. Create a schedule in Apify Console and choose the usernames. Scheduled runs keep a history of results in separate datasets.

#### Is it legal to collect TikTok data?

Collecting publicly available data can be legal, but rules differ by location and use case. You are responsible for complying with applicable laws, TikTok's terms, and privacy requirements.

### Support

For issues, feature requests, or custom Actor work, use the Issues tab on the Actor page or contact the developer through Apify.

### Legal Notice

This Actor is designed for legitimate collection of publicly available data. Users are responsible for using the data responsibly and complying with applicable laws and website terms.

# Actor input Schema

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

Profile usernames to scrape, with or without the @ symbol. Full profile URLs are also accepted. Each profile is scraped in the same run.

## `maxVideos` (type: `integer`):

Number of videos to collect from each profile, starting with the videos shown first. The Actor stops early for a profile that has fewer public videos.

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

Choose to use no proxy, Apify Proxy, or provide custom proxy URLs. No proxy is used by default.

## Actor input object example

```json
{
  "usernames": [
    "tiktok"
  ],
  "maxVideos": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "usernames": [
        "tiktok"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/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 '{
  "usernames": [
    "tiktok"
  ]
}' |
apify call shahidirfan/tiktok-profile-scraper --silent --output-dataset

```

## MCP server setup

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