# TikTok Profile Posts Scraper (`harpoon/tiktok-profile-posts-scraper`) Actor

Scrape the videos of public TikTok profiles - captions, authors, stats, music, hashtags, and video URLs.

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

## Pricing

from $1.00 / 1,000 profile posts

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?

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 Posts Scraper

Scrape the videos of any public TikTok profile - captions, authors, stats, music, hashtags, and video URLs - in one clean dataset. Paste a profile URL or `@handle`, press **Start**, and get structured JSON/CSV/Excel.

### What can this Actor do?

- **Videos of any public profile** - latest videos first, paginated until it reaches your `max_videos` cap.
- **Profile plus content in one row** - each row carries the author's followers, total likes, and video count alongside the video stats.
- **Full engagement metrics** - plays, likes, comments, shares, and collects per video.
- **Media and music details** - cover, dynamic cover, play/download URLs, sound title, artist, and duration.
- **Hashtags** - extracted as a clean array.
- **Deduplicated** - a video never appears twice, even across pages.

### Why use this Actor?

- **No code required** - the input form is prefilled with a working example; press Start and it runs as-is.
- **Reliable at scale** - rotating proxy pool, request hedging, and automatic retries handle TikTok's variability.
- **Clean schema** - a single flat row per video, ready for your warehouse, sheet, or dashboard.
- **Pay per result** - you only pay for the videos that actually land in the dataset.

### How to use it

1. Open the **Input** tab.
2. Paste one or more profile URLs or `@handles` into **Profiles**.
3. Set **Max videos per profile** (default `100`).
4. Press **Start** and download your data from the **Output** tab.

```json
{
  "profiles": ["https://www.tiktok.com/@mahmoudridaabbas"],
  "max_videos": 100
}
```

Accepted profile references: `https://www.tiktok.com/@user`, `@user`, or `user`.

### Output

One dataset row per video:

```json
{
  "id": "7510595766524710149",
  "profile_username": "mahmoudridaabbas",
  "description": "🥹🥀#gaza #palestine #freepalestine #support #fypシ゚",
  "created_at": 1748696852,
  "url": "https://www.tiktok.com/@mahmoudridaabbas/video/7510595766524710149",
  "author": {
    "username": "mahmoudridaabbas",
    "nickname": "Mahmoud Abbas /Palestine",
    "id": "7206569119830672410",
    "sec_uid": "MS4wLjABAAAA_BrZcjaxkyDTWXD4CWdpKw7noYN_na2xFI2ttMV4THAXq0O6xRRUR2LyEOYdRw6N",
    "verified": true,
    "private": false,
    "signature": "الحساب الرسمي لفلسطين ...",
    "avatar_url": "https://p16-common-sign.tiktokcdn-eu.com/tos-alisg-avt-0068/e5ee49b75246bfae0df69669c...",
    "follower_count": 173400,
    "following_count": 28,
    "video_count": 157,
    "heart_count": 356800
  },
  "stats": {
    "play_count": 70400,
    "like_count": 5531,
    "comment_count": 412,
    "share_count": 276,
    "collect_count": 307
  },
  "music": {
    "id": "7327265877370784514",
    "title": "suara asli - Hijrah ja",
    "author_name": "JojoMBUD",
    "duration": 23,
    "original": true,
    "play_url": "https://v45.tiktokcdn-eu.com/bd730a9dd7d835efe6228082b8baf3c1/6aae955c/video/tos/alis..."
  },
  "hashtags": ["gaza", "palestine", "freepalestine", "support", "fypシ゚"],
  "video": {
    "duration": 0,
    "ratio": "",
    "width": 0,
    "height": 0,
    "definition": "",
    "cover_url": "https://p16-common-sign.tiktokcdn-eu.com/tos-maliva-i-photomode-us/1292ab79a3a54756aa...",
    "dynamic_cover_url": "",
    "play_url": "",
    "download_url": ""
  },
  "scraped_at": "2026-09-18T13:59:29Z"
}
```

| Field | Description |
| --- | --- |
| `id` | Numeric video id |
| `profile_username` | The profile you requested |
| `description` | Video caption |
| `created_at` | Unix creation timestamp |
| `url` | Canonical video URL |
| `author` | Author profile: username, nickname, id, sec\_uid, verified, bio, avatar, follower/following/video/heart counts |
| `stats` | `play_count`, `like_count`, `comment_count`, `share_count`, `collect_count` |
| `music` | Sound id, title, artist, duration, original flag, play URL |
| `hashtags` | Array of hashtags |
| `video` | Duration, ratio, dimensions, definition, cover/dynamic cover/play/download URLs |
| `scraped_at` | When the row was collected (ISO 8601) |

### Pricing

This Actor is billed per **1,000 results** (one result = one video). See the **Pricing** tab for the current rate. A run that returns no new videos is not charged.

### FAQ

**Do I need cookies or a login?** No. Public profiles only - no TikTok account required. The Actor uses a managed signature service and rotating residential proxies under the hood.

**Can I scrape private profiles?** No. Private accounts and videos are not returned.

**How recent are the videos?** Newest first, as TikTok orders the profile grid. Long profiles are paginated until `max_videos` is reached or the profile is exhausted.

**Can I run several profiles at once?** Yes. Add one profile per line; they are fetched in parallel.

### Limitations

- Only public profiles.
- `max_videos` caps the returned rows; very large profiles take longer.
- Video `play_url`/`download_url` are signed CDN links and can expire; re-run to refresh them.
- Result order and availability follow TikTok's own profile feed.

### Integrate with your stack

Export the dataset as JSON, CSV, Excel, or XML, or pull it from the Apify API. You can also run this Actor from the [Apify MCP server](https://apify.com/apify/actors-mcp-server) so AI agents can call it directly.

# Actor input Schema

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

<b>Public TikTok profile URLs or @handles</b>, one per line. Accepts <code>https://www.tiktok.com/@mahmoudridaabbas</code>, <code>@mahmoudridaabbas</code>, or <code>mahmoudridaabbas</code>. Duplicates are removed automatically.

## `max_videos` (type: `integer`):

How many recent videos to return per profile. Higher values take longer and increase cost.

## Actor input object example

```json
{
  "profiles": [
    "https://www.tiktok.com/@mahmoudridaabbas",
    "@nike"
  ],
  "max_videos": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

One row per scraped video. Export as JSON, CSV, Excel, or XML.

# 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": [
        "https://www.tiktok.com/@mahmoudridaabbas"
    ],
    "max_videos": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("harpoon/tiktok-profile-posts-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": ["https://www.tiktok.com/@mahmoudridaabbas"],
    "max_videos": 100,
}

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

```

## MCP server setup

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