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

A powerful and reliable TikTok scraper that extracts comprehensive post data from user profiles. Get video details, engagement metrics, and more with built-in anti-blocking measures and high-performance processing. Perfect for social media analysis and monitoring.

- **URL**: https://apify.com/easyapi/tiktok-profile-posts-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media
- **Stats:** 292 total users, 11 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

from $4.99 / 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.

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 TikTok user profile posts with high performance and reliability. Extract comprehensive post data including video details, engagement metrics, and more! 🚀

### Features ✨

- 🎯 Scrape posts from any public TikTok profile
- 📊 Get detailed post statistics (views, likes, comments, shares)
- 🎥 Extract video information (duration, resolution, URLs)
- 👤 Collect author details
- 🎵 Include music/sound information
- \#️⃣ Capture hashtags and challenges
- ⚡ High-performance parallel processing

### Usage 💡

Simply provide the TikTok username(s) you want to scrape and optionally set a limit for the number of posts to collect.

### Output Data Structure 📋

For each post, you'll get structured data including:

- Post ID and description
- Creation timestamp
- Author information (ID, username, nickname, avatar)
- Engagement statistics
- Video details (duration, dimensions, URLs)
- Music track information
- Associated hashtags

### Input Parameters 🎛️

| Field | Type | Description |
|-------|------|-------------|
| usernames | Array | List of TikTok usernames to scrape (e.g., \["@espnfc"]) |
| maxItems | Integer | Maximum number of posts to scrape per user (optional) |

### Support 🤝

For any questions or issues, please open a ticket or contact our support team.

#### Input Example

A full explanation of an input example in JSON.

```
{
    "usernames": [
        "@ronaldo"
    ],
    "maxItems": 20
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```
[
	{
		"id": "6815546762250521862",
		"desc": "@mariasophianazario @m_alice00 ❤️",
		"createTime": 1586868141,
		"author": {
			"id": "6791062194399282181",
			"uniqueId": "ronaldo",
			"nickname": "Ronaldo Lima",
			"avatarLarger": "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/7310942706023268358~c5_1080x1080.jpeg?lk3s=a5d48078&nonce=49951&refresh_token=12ae38b072a3a7d07439efb2c5679bdd&x-expires=1730422800&x-signature=R%2FiS72TW0ZRP44WHhctXpYH5QxM%3D&shp=a5d48078&shcp=81f88b70"
		},
		"stats": {
			"playCount": 28900000,
			"diggCount": 551200,
			"commentCount": 32400,
			"shareCount": 358100
		},
		"video": {
			"duration": 7,
			"width": 608,
			"height": 540,
			"ratio": "540p",
			"cover": "https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/ec9abd5a665e42a88e27440036a30aad_1586868150?lk3s=81f88b70&x-expires=1730422800&x-signature=avmgIoIosparxeKckMOAWOBL9Gs%3D&shp=81f88b70&shcp=-",
			"playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast2a/tos-useast2a-ve-0068c004/0cb831db709f49f4b4838c374f814e37/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=3&dr=0&lr=all&cd=0%7C0%7C0%7C&cv=1&br=1154&bt=577&cs=0&ds=6&ft=4KJMyMUm8Zmo0kgjtb4jVZ0fdpWrKsd.&mime_type=video_mp4&qs=0&rc=N2c1PDs2Ojg8ZTw6ZGQ1OEBpanJobGs6bjd0dDMzZDczM0A2Xl4yMDAtNTMxYWM0NTUwYSNgLmRmX2Uwc15fLS1eMTZzcw%3D%3D&btag=e00088000&expire=1730272909&l=202410300121412486DE9B0C2E250A9831&ply_type=2&policy=2&signature=b647eb622c2543a87e47b5451729f136&tk=tt_chain_token",
			"downloadAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast2a/tos-useast2a-pve-0068/2085aa6c5aa943b8af9c21982533f973/?a=1988&bti=ODszNWYuMDE6&ch=0&cr=3&dr=0&lr=all&cd=0%7C0%7C0%7C&cv=1&br=924&bt=462&cs=0&ds=3&ft=4KJMyMUm8Zmo0kgjtb4jVZ0fdpWrKsd.&mime_type=video_mp4&qs=0&rc=OGdpaGY3PDQ4PDw0OTUzM0BpanJobGs6bjd0dDMzZDczM0A2LzZiNGBiXjQxYTFhXi4tYSNgLmRmX2Uwc15fLS1eMTZzcw%3D%3D&btag=e00088000&expire=1730272909&l=202410300121412486DE9B0C2E250A9831&ply_type=2&policy=2&signature=ba81b456a4d0259bd447cb8d3e564598&tk=tt_chain_token"
		},
		"music": {
			"id": "6776700714560391941",
			"title": "Lalala (Ilkan Gunuc Remix)",
			"authorName": "Y2K & bbno$",
			"playUrl": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/os8FYpeG8FSODjfDDAra7zoCgExboSyOaQeAQn"
		},
		"hashtags": []
	},
    ...
]
```

### Related Actors:

- 🎵 [TikTok Comments Scraper](https://apify.com/easyapi/tiktok-comments-scraper) - Extract comprehensive comments data from any TikTok video with advanced features and complete engagement metrics.
- 👥 [TikTok Followers Scraper](https://apify.com/easyapi/tiktok-followers-scraper) - Extract detailed follower information from TikTok accounts with comprehensive user data and engagement metrics.
- 🔍 [TikTok Following Scraper](https://apify.com/easyapi/tiktok-following-scraper) - Scrape TikTok following lists to extract detailed user information and relationships.
- 🎥 [TikTok Videos Scraper](https://apify.com/easyapi/tiktok-videos-scraper) - Extract TikTok video search results with comprehensive video metadata and engagement stats.
- 📱 [TikTok LIVE Scraper](https://apify.com/easyapi/tiktok-live-scraper) - Extract real-time data from TikTok live streams with comprehensive streaming information.
- 🔍 [TikTok Users Scraper](https://apify.com/easyapi/tiktok-users-scraper) - Extract detailed user profiles from TikTok search results with comprehensive account information.
- 📧 [TikTok Email Scraper](https://apify.com/easyapi/tiktok-email-scraper) - Find and extract email addresses from TikTok creator profiles for influencer outreach.
- 🎥 [TikTok Video Downloader](https://apify.com/easyapi/tiktok-video-downloader) - Download TikTok videos without watermarks in original quality.
- 📊 [Social Media Influencer Scraper](https://apify.com/easyapi/social-media-influencer-scraper) - Discover top influencers across multiple platforms including TikTok.
- 🔍 [All-in-One Social Media Phone Number Scraper](https://apify.com/easyapi/all-in-one-social-media-phone-number-scraper) - Extract phone numbers from multiple social platforms including TikTok.
- 📧 [All-in-One Social Media Email Scraper](https://apify.com/easyapi/all-in-one-social-media-email-scraper) - Discover emails across multiple social platforms including TikTok.
- 🎥 [All-in-One Media Downloader](https://apify.com/easyapi/all-in-one-media-downloader) - Download videos and media from multiple platforms including TikTok.
- 🏷️ [Social Media Hashtag Generator](https://apify.com/easyapi/social-media-hashtag-generator) - Generate trending hashtags for multiple social platforms including TikTok.
- 🔍 [Keyword Discovery Tool](https://apify.com/easyapi/keyword-discovery-tool) - Discover trending keywords and search insights across social platforms.
- 📊 [Text Sentiment Analysis](https://apify.com/easyapi/text-sentiment-analysis) - Analyze sentiment of content from social media posts and comments.

# Actor input Schema

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

List of TikTok usernames to scrape (include @ symbol)

## `maxItems` (type: `integer`):

Maximum number of posts to scrape per username

## Actor input object example

```json
{
  "usernames": [
    "@espnfc"
  ],
  "maxItems": 20
}
```

# 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": [
        "@espnfc"
    ],
    "maxItems": 20
};

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

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

```

## MCP server setup

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