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

Scrape TikTok profiles and all video posts. Extract likes, views, shares, saves, comments, hashtags, and follower stats. Fast HTTP scraper — no browser or login needed. Export as JSON, CSV, or Excel or get the results by API or via MCP in Claude, ChaptGPT, Claude Code, Codex or any AI App.

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

## Pricing

from $1.00 / 1,000 scraped profiles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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?

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

### What does TikTok Profile Scraper do?

**TikTok Profile Scraper** extracts all posts from one or more [TikTok](https://www.tiktok.com) profiles with full metadata — likes, comments, plays, shares, saves, hashtags, music, and more. No login or API key is required.

Run it on the [Apify platform](https://apify.com) to get API access, scheduling, webhooks, monitoring, and integrations with tools like Google Sheets, Slack, and Zapier.

### Why use TikTok Profile Scraper?

- **Market research** — Track competitor content strategies and engagement rates.
- **Influencer analysis** — Evaluate creators by their post frequency, reach, and engagement.
- **Content monitoring** — Get alerts on new posts from profiles you watch.
- **Data journalism** — Collect public TikTok data for analysis and reporting.
- **Trend detection** — Identify trending hashtags and music across profiles.

### How to scrape TikTok profile data

1. Go to the [TikTok Profile Scraper](https://apify.com/harish_garg/tiktok-profile-scraper) page on Apify.
2. Click **Start**.
3. Enter one or more TikTok profile URLs (e.g. `https://www.tiktok.com/@tiktok`) or `@handle` values.
4. Set **Max Videos per Profile** to control how many videos to scrape (default is 15). To fetch all videos, set this to 0.
5. Click **Run**.
6. When the run finishes, download your data from the **Dataset** tab.

### Input parameters

| Field | Type | Description |
|---|---|---|
| `profileUrls` | string\[] | One or more TikTok profile URLs, @handles, or raw secUid strings. Required. |
| `maxVideosPerProfile` | integer | Maximum videos per profile. Default: 15. Set to 0 to fetch all videos. |

Example input:

```json
{
    "profileUrls": ["https://www.tiktok.com/@tiktok"],
    "maxVideosPerProfile": 15
}
```

### Output — what data do you get?

The scraper produces one row per video. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

Example output:

```json
{
    "videoId": "7345678901234567890",
    "videoUrl": "https://www.tiktok.com/@tiktok/video/7345678901234567890",
    "description": "Check out this cool video! #fyp #tiktok",
    "createTime": 1700000000,
    "coverUrl": "https://p16-sign.tiktokcdn-us.com/obj/tos-useast5-p-0068-tx/abc123",
    "likes": 150000,
    "comments": 3200,
    "plays": 5000000,
    "shares": 12000,
    "saves": 45000,
    "reposts": 800,
    "authorUniqueId": "tiktok",
    "authorNickname": "TikTok",
    "musicTitle": "original sound - TikTok",
    "musicId": "7345678901234567891",
    "musicAuthor": "TikTok",
    "musicIsOriginal": true,
    "hashtags": ["fyp", "tiktok"],
    "textExtra": [{"hashtagName": "fyp"}, {"userId": "123", "userUniqueId": "tiktok"}],
    "locationCreated": "Los Angeles",
    "duration": 30,
    "isAd": false,
    "isImagePost": false,
    "profileFollowers": 80000000,
    "profileHearts": 2500000000,
    "profileVideoCount": 500,
    "profileAvatarUrl": "https://p16-sign.tiktokcdn-us.com/musically-maliva-obj/abc123~c5_1080x1080.jpeg",
    "profileBioLink": "https://www.tiktok.com/about"
}
```

### TikTok post data fields

| Field | Description |
|---|---|
| `videoId` | The unique ID of the video. |
| `videoUrl` | Direct link to the video on TikTok. |
| `description` | The caption text of the video. |
| `createTime` | Unix timestamp of when the video was posted (seconds since epoch). |
| `coverUrl` | URL of the video thumbnail image. |
| `likes` | Total number of likes (diggs). |
| `comments` | Total number of comments. |
| `plays` | Total number of views. |
| `shares` | Total number of shares. |
| `saves` | Total number of saves (bookmarks). |
| `reposts` | Total number of reposts. |
| `authorUniqueId` | The @handle of the author. |
| `authorNickname` | The display name of the author. |
| `musicTitle` | The title of the audio/music used. |
| `musicId` | The unique ID of the audio/music. |
| `musicAuthor` | The creator of the audio/music. |
| `musicIsOriginal` | Whether the audio is an original sound (true) or a reused sound (false). |
| `hashtags` | List of hashtags in the video description. |
| `textExtra` | @mention and hashtag entities with user IDs and positions. |
| `locationCreated` | Location where the video was created (when available). |
| `duration` | Video duration in seconds. |
| `isAd` | Whether the video is a paid ad. |
| `isImagePost` | Whether the post is an image carousel. |
| `profileFollowers` | Follower count of the profile at scrape time. |
| `profileHearts` | Total likes on the profile at scrape time. |
| `profileVideoCount` | Total video count on the profile at scrape time. |
| `profileAvatarUrl` | URL of the profile picture. |
| `profileBioLink` | The link-in-bio URL of the profile. |

### Pricing — how much does it cost to scrape TikTok profiles?

This Actor uses the **pay-per-event** pricing model. You are charged for two types of events:

| Event | Description | Charged |
|---|---|---|
| `profile-scraped` | Resolving a TikTok profile | Once per profile |
| `video-scraped` | Saving a video to the dataset | Once per video |

You can set a **maximum spending limit** on each run to control your costs. When the limit is reached, the scraper stops automatically.

#### Cost estimate

- The default run (15 videos from one profile) takes about 5 seconds and costs a fraction of a cent.
- To scrape all videos, set `maxVideosPerProfile` to 0. A large profile with thousands of posts takes a few minutes.

### Tips for scraping TikTok profiles

- The default `maxVideosPerProfile` is 15, which is a good starting point for testing.
- Set `maxVideosPerProfile` to 0 to get all videos from a profile.
- You can pass multiple profile URLs in a single run.
- The scraper handles `@handle` values, full URLs, and raw `secUid` strings.

### FAQ, disclaimers, and support

**Is it legal to scrape TikTok?**
This scraper collects publicly available data. Review the TikTok Terms of Service and your local laws before use. You are responsible for how you use the data.

**What if a profile returns no results?**
The profile may be private, may not exist, or TikTok may have changed its page structure. Check the run log for error details.

**I found a bug or have a feature request.**
Open an issue in the **Issues** tab on the Actor page. We also offer custom scraping solutions — contact us through Apify.

# Actor input Schema

## `profileUrls` (type: `array`):

One or more TikTok profile URLs (e.g. https://www.tiktok.com/@tiktok), @handle values, or raw secUid strings.

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

Maximum number of videos to scrape per profile. Set to 0 to fetch all videos.

## Actor input object example

```json
{
  "profileUrls": [
    "https://www.tiktok.com/@tiktok"
  ],
  "maxVideosPerProfile": 15
}
```

# Actor output Schema

## `dataset` (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 = {
    "profileUrls": [
        "https://www.tiktok.com/@tiktok"
    ],
    "maxVideosPerProfile": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/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 = {
    "profileUrls": ["https://www.tiktok.com/@tiktok"],
    "maxVideosPerProfile": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("hgservices/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 '{
  "profileUrls": [
    "https://www.tiktok.com/@tiktok"
  ],
  "maxVideosPerProfile": 15
}' |
apify call hgservices/tiktok-profile-scraper --silent --output-dataset

```

## MCP server setup

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