# TikTok Profile Scraper – Extract Posts, Stats, Videos & Music (`datascrapers/tiktok-profile-scraper`) Actor

Scrape all posts from any public TikTok profile. Extract video URLs, engagement stats, music metadata, hashtags, tagged users, author profile info, and post timestamps. Supports image and slideshow posts for influencer analytics and social monitoring.

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

## Pricing

from $5.00 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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** creates a structured dataset of posts collected from public [TikTok](https://www.tiktok.com) profiles. Each dataset item represents one post and can include video and CDN URLs, engagement stats (likes, comments, shares, views, saves), music metadata, hashtags, tagged users, author profile information, and post creation timestamps. Query the source by profile URL or handle, control the result limit with `maxPosts`, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, or XML.

### Dataset at a glance

| Property | Value |
|---|---|
| Source | tiktok.com (public profiles) |
| Record unit | One post (video or image/slideshow) |
| Input methods | Profile URLs or handles (`profileUrls`) |
| Main identifiers | `id` (post ID), `url` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML |
| Update model | Fresh records per Actor run |
| Pricing | $5 per 1,000 posts |

### Coverage and available records

The Actor collects all posts from one or more public TikTok profiles.

- **Profile input**: `profileUrls` accepts any profile link format (`https://www.tiktok.com/@fcbarcelona`, `https://m.tiktok.com/@narins.beauty_`, or just `@username`).
- **Multiple profiles**: Provide several profiles in one run; posts are collected per profile up to the `maxPosts` limit.
- **Post types**: Video posts and image/slideshow posts are both supported. Image posts return an `images` array; video posts return a `video` object.
- **Result limit**: `maxPosts` caps the number of posts per profile (`0` = unlimited).
- **Enrichment**: Each post includes engagement stats, music metadata, hashtags, tagged users, and the author's profile metadata.

Known exclusions: only public profiles are collected; private or age-restricted profiles that require login are not accessible; each run captures profile state at run time (no historical snapshots).

### Data dictionary

Field names below match dataset record JSON properties exactly.

| Field | Type | Nullable | Description | Example |
|---|---:|---|---|---|
| `id` | string | No | TikTok post identifier; best stable deduplication key | `7639302892674944278` |
| `url` | string | No | Canonical post URL | `https://www.tiktok.com/@fcbarcelona/video/7639302892674944278` |
| `description` | string | Yes | Post caption with hashtags and mentions | `#fcbarcelona #barçaontiktok` |
| `createdAt` | integer | Yes | Unix timestamp of post creation | `1778663821` |
| `createdAtISO` | string | Yes | ISO 8601 datetime of post creation | `2026-05-12T19:57:01+00:00` |
| `isImagePost` | boolean | Yes | Whether the post is a photo/slideshow rather than video | `false` |
| `isAd` | boolean | Yes | Whether the post is a paid advertisement | `false` |
| `isReviewing` | boolean | Yes | Whether the post is under review | `false` |
| `diversificationId` | integer | Yes | TikTok content diversification category ID | `0` |
| `categoryType` | integer | Yes | TikTok content category type | `0` |
| `aiGeneratedDescription` | string | Yes | AI-generated description when present | — |
| `images` | array | Yes | Image URLs for slideshow/photo posts | `["https://..."]` |
| `hashtags` | array | Yes | Hashtag objects `{id, title, description}` | See example record |
| `taggedUsers` | array | Yes | Users tagged in the caption | `[]` |
| `effectStickers` | array | Yes | Effect stickers applied to the post | `[]` |
| `contents` | array | Yes | Structured caption segments with text extras | `[]` |
| `video` | object | Yes | Video metadata: `{duration, cover, dynamicCover, playUrl, downloadUrl, bestQualityUrl, width, height, ratio}` | See example record |
| `stats` | object | Yes | Engagement: `{diggCount, shareCount, commentCount, playCount, collectCount}` | See example record |
| `music` | object | Yes | Music metadata: `{id, title, authorName, duration, playUrl, coverLarge, isOriginal}` | See example record |
| `authorMeta` | object | Yes | Author profile: `{id, uniqueId, nickname, verified, avatar, signature, followerCount, followingCount, heartCount, videoCount}` | See example record |
| `itemControl` | object | Yes | `{canRepost, canDuet, canStitch}` permissions | See example record |

### Example dataset record

A representative record produced by scraping `@fcbarcelona`:

```json
{
  "id": "7639302892674944278",
  "url": "https://www.tiktok.com/@fcbarcelona/video/7639302892674944278",
  "description": "#fcbarcelona #barçaontiktok",
  "createdAt": 1778663821,
  "createdAtISO": "2026-05-12T19:57:01+00:00",
  "isImagePost": false,
  "hashtags": [
    { "id": "26656", "title": "fcbarcelona", "description": "" }
  ],
  "taggedUsers": [],
  "video": {
    "duration": 30,
    "cover": "https://p16-common-sign.tiktokcdn-eu.com/...",
    "playUrl": "https://v16-webapp-prime.tiktok.com/video/tos/...",
    "downloadUrl": "https://v16-webapp-prime.tiktok.com/video/tos/...",
    "bestQualityUrl": "https://v16-webapp-prime.tiktok.com/video/tos/...",
    "width": 1080,
    "height": 1920,
    "ratio": "9:16"
  },
  "stats": {
    "diggCount": 26200,
    "shareCount": 141,
    "commentCount": 364,
    "playCount": 149800,
    "collectCount": 847
  },
  "music": {
    "id": "7420525641043855361",
    "title": "New Skills",
    "authorName": "Prodbyecho",
    "duration": 59,
    "playUrl": "https://sf16-ies-music-sg.tiktokcdn.com/...",
    "isOriginal": false
  },
  "authorMeta": {
    "id": "6594121926820872197",
    "uniqueId": "fcbarcelona",
    "nickname": "FC Barcelona",
    "verified": true,
    "signature": "Get the OR jersey",
    "followerCount": 66800000,
    "followingCount": 31,
    "heartCount": 2700000000,
    "videoCount": 5681
  },
  "itemControl": { "canRepost": true, "canDuet": true, "canStitch": true }
}
```

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---|---|---|---|
| `profileUrls` | array | Yes | — | TikTok profile URLs or handles | Profiles to scrape (any link format or `@username`) |
| `maxPosts` | integer | No | `0` | `0` or a positive integer | Maximum posts per profile; `0` = unlimited |
| `proxy` | object | No | Apify residential proxy | Apify proxy groups or custom proxies | Residential proxies are recommended |

Minimal request:

```json
{ "profileUrls": [{ "url": "https://www.tiktok.com/@fcbarcelona" }] }
```

Advanced request:

```json
{
  "profileUrls": [
    { "url": "https://www.tiktok.com/@fcbarcelona" },
    { "url": "https://www.tiktok.com/@narins.beauty_" }
  ],
  "maxPosts": 100,
  "proxy": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Retrieve the data through the API

1. Start the Actor with a JSON input (console or API).
2. Wait for the run to finish, or use a synchronous endpoint for an inline response.
3. Retrieve items from the run's default dataset.
4. Paginate or export the dataset.

Python example:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR-APIFY-TOKEN")

run = client.actor("datascrapers/tiktok-profile-scraper").call(run_input={
    "profileUrls": [{ "url": "https://www.tiktok.com/@fcbarcelona" }],
    "maxPosts": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["id"], item["stats"]["diggCount"])
```

Apify generates ready-to-run Python, JavaScript, and cURL examples on the Actor's API tab. Do not put a real API token in shared code or URLs.

### Data quality and record handling

- **Conditional fields**: Image posts omit the `video` object; video posts omit the `images` array. Fields that TikTok does not expose for a post are returned as null.
- **Source changes**: TikTok page structure and values can change; unreadable fields are returned as null rather than fabricated.
- **Deduplication**: Each run appends fresh records; the Actor does not deduplicate across runs. Use `id` as the stable key and filter repeated runs against previously stored IDs.
- **Rate limits**: TikTok rate-limits automated traffic. Residential proxies (enabled by default) are recommended for consistent coverage, especially at scale.
- **Normalization**: Creation time is returned as both a Unix timestamp (`createdAt`) and ISO 8601 (`createdAtISO`); engagement counts are read as integers.

### Export and pipeline examples

| Destination | Recommended method | Typical use |
|---|---|---|
| PostgreSQL / Supabase | Dataset API poll or webhook consumer | Store post and engagement history for dashboards |
| Google Sheets | Apify Google Sheets integration | Share influencer post lists with teams |
| S3 / cloud storage | Scheduled export via Apify scheduler | Archival of content snapshots |
| BI tools | CSV / JSON export | Influencer and content trend analysis |

### Pricing and cost examples

The Actor uses pay-per-event pricing, billed per post record:

| Event | Trigger | Rate |
|---|---|---|
| Posts | Every post pushed to the dataset | $5 per 1,000 posts |

A one-time Actor start event of $0.00005 applies to each run (effectively $0).

| Posts | Estimated base cost |
|---:|---:|
| 1,000 | $5.00 |
| 10,000 | $50.00 |
| 100,000 | $500.00 |

Compute units consumed by the run are billed by your Apify plan. Estimates depend on the verified pricing model and the options selected for the run.

### Limitations and responsible data use

- The Actor collects publicly accessible post data from public TikTok profiles only.
- Field availability depends on what TikTok renders at run time; some values can be null or missing, and site changes can alter fields.
- The Actor does not provide historical snapshots unless you store them yourself.
- Large runs require residential proxies; without them, coverage may degrade due to rate limiting.
- You are responsible for compliance with TikTok's terms of service, applicable privacy law, and any contractual obligations before using the data.

### Dataset questions

#### What does one dataset item represent?

One TikTok post. All engagement, music, hashtag, and author metadata is nested inside that single post record.

#### Which field should I use as a unique identifier?

`id` is the stable TikTok post identifier and the recommended deduplication key. `url` is a reasonable secondary key.

#### Are fields nullable or conditional?

Yes. Image posts omit the `video` object and video posts omit the `images` array. Fields TikTok does not expose for a given post are returned as null.

#### Can I retrieve the records as CSV or JSON?

Yes. The dataset can be exported as JSON, CSV, Excel, or XML from the Apify Console, and queried through the Dataset API.

#### Does the Actor return historical data?

No. Each run captures the state of the profiles at run time. To track changes, schedule repeated runs and store the outputs yourself.

#### What counts as a billable result?

Each post pushed to the dataset is one billable result, charged at $5 per 1,000 posts. Use `maxPosts` to control cost per run.

### Related datasets from Data Scrapers

- **[Instagram Post Scraper](https://apify.com/datascrapers/instagram-post-scraper)** — Public Instagram posts for cross-platform influencer research.
- **[Twitter X Profile Scraper](https://apify.com/datascrapers/twitter-x-profile-scraper)** — Profile and post data from X for social monitoring.
- **[YouTube Channel Scraper](https://apify.com/datascrapers/youtube-channel-scraper)** — Channel metadata and video data for content research.
- **[LinkedIn Profile Scraper](https://apify.com/datascrapers/linkedin-profile-scraper)** — Professional profile data for creator and audience analysis.

### Data Scrapers support

Need an additional field, record type, or export workflow? Contact Data Scrapers at stardustspotlight@gmail.com. Include a sample source URL, required fields, expected record volume, and preferred delivery format.

# Actor input Schema

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

One or more TikTok profile URLs. Supports any profile link format (e.g. https://www.tiktok.com/@fcbarcelona, https://m.tiktok.com/@narins.beauty\_, or just @username).

## `maxPosts` (type: `integer`):

Stop after collecting this many posts per profile. Leave 0 for unlimited.

## `proxy` (type: `object`):

Proxy settings for scraping. Apify residential proxy is recommended to avoid rate limiting and geo-restrictions.

## Actor input object example

```json
{
  "profileUrls": [
    {
      "url": "https://www.tiktok.com/@fcbarcelona"
    },
    {
      "url": "https://www.tiktok.com/@narins.beauty_"
    }
  ],
  "maxPosts": 100,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `posts` (type: `string`):

All scraped TikTok posts with full metadata, video URLs, stats, music info, and author details.

## `runStats` (type: `string`):

Aggregate run statistics (record count, timestamps).

## `run` (type: `string`):

Apify Console link to inspect this run

# 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": [
        {
            "url": "https://www.tiktok.com/@fcbarcelona"
        },
        {
            "url": "https://www.tiktok.com/@narins.beauty_"
        }
    ],
    "maxPosts": 100,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/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": [
        { "url": "https://www.tiktok.com/@fcbarcelona" },
        { "url": "https://www.tiktok.com/@narins.beauty_" },
    ],
    "maxPosts": 100,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/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": [
    {
      "url": "https://www.tiktok.com/@fcbarcelona"
    },
    {
      "url": "https://www.tiktok.com/@narins.beauty_"
    }
  ],
  "maxPosts": 100,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call datascrapers/tiktok-profile-scraper --silent --output-dataset

```

## MCP server setup

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