# TikTok Post Scraper (`sophisticated_zythum/tiktok-scraper`) Actor

Extract TikTok posts by keyword, hashtag, or profile. Get views, likes, comments, video URLs, hashtags, and creator data. No login required. Pay only for results delivered.

- **URL**: https://apify.com/sophisticated\_zythum/tiktok-scraper.md
- **Developed by:** [Md Saif Ahmed](https://apify.com/sophisticated_zythum) (community)
- **Categories:** Social media, Lead generation, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.37 / 1,000 post extracteds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Scraper

Extract TikTok posts by **keyword search** or **profile URL** — views, likes, comments, hashtags, video URLs, and full profile data. No login required.

Built on enterprise-grade infrastructure with a **100% success rate** and pay-per-result pricing — you only pay for posts actually delivered.

---

### What does TikTok Scraper do?

TikTok Scraper collects public post data from TikTok in two modes:

- **Keyword / Hashtag Search** — Find posts matching any keyword or hashtag (e.g. `street food`, `#travel`). Great for trend research, competitor analysis, and content discovery.
- **Profile Scraping** — Extract recent posts from any public TikTok profile. Supports date filtering and content type selection (posts, reposts, liked posts).

Both modes run in parallel — scraping 5 keywords and 3 profiles takes the same time as scraping 1 keyword and 1 profile.

---

### What data do you get?

Each post record includes:

| Field | Description |
|---|---|
| `postId` | Unique TikTok post ID |
| `description` | Post caption |
| `videoUrl` | Direct video URL |
| `previewImage` | Thumbnail image URL |
| `createdAt` | Post publish timestamp |
| `playCount` | Total views |
| `likeCount` | Total likes |
| `shareCount` | Total shares |
| `commentCount` | Total comments |
| `collectCount` | Total saves/bookmarks |
| `videoDuration` | Video length in seconds |
| `hashtags` | Array of hashtags used |
| `region` | Country of the poster |
| `music` | Music title and author |
| `profileUsername` | Creator's username |
| `profileUrl` | Creator's profile URL |
| `profileAvatar` | Creator's profile picture URL |
| `profileBio` | Creator's bio |
| `profileFollowers` | Creator's follower count |
| `isVerified` | Whether the account is verified |
| `source` | The keyword or profile that returned this post |

---

### Use cases

- **Trend research** — Track which content is going viral around a topic or hashtag
- **Influencer discovery** — Find creators posting about your niche, ranked by engagement
- **Competitor analysis** — Monitor a competitor's posting frequency, engagement, and content strategy
- **Market research** — Understand how your audience talks about a topic
- **Content strategy** — Identify top-performing post formats, hashtags, and music for your brand
- **Academic research** — Collect public social media data for studies on behavior, trends, or culture

---

### How to use

#### 1. Add your inputs

Provide one or both of:
- **Keywords** — plain terms like `vintage furniture` or hashtags like `#art`
- **Usernames** — TikTok handles like `natgeo` or `nasa`

#### 2. Set filters (optional)

- **Max Posts** — how many posts per keyword/profile (default: 20, max: 500)
- **Min Views / Min Likes** — skip low-engagement posts
- **Date range** — profile mode only (`Start Date` / `End Date` in YYYY-MM-DD)
- **What to Collect** — Posts, Reposts, Posts & Reposts, or Liked Posts (profile mode only)
- **Country** — filter keyword results by country code (e.g. `US`, `GB`)

#### 3. Run and export

Results appear in the **Dataset** tab. Export as JSON, CSV, or Excel.

---

### Input example

```json
{
  "keywords": ["street food", "#travel"],
  "usernames": ["natgeo", "nasa"],
  "maxPosts": 50,
  "country": "US",
  "minViews": 10000,
  "whatToCollect": "Posts"
}
````

***

### Output example

```json
{
  "source": "street food",
  "postId": "7312849302948572417",
  "description": "Best street tacos in Mexico City 🌮 #streetfood #mexico #foodtok",
  "videoUrl": "https://v16-webapp.tiktok.com/...",
  "previewImage": "https://p16-sign.tiktokcdn-us.com/...",
  "createdAt": "2024-11-15T14:23:00.000Z",
  "playCount": 482000,
  "likeCount": 38400,
  "shareCount": 1200,
  "commentCount": 874,
  "collectCount": 5300,
  "videoDuration": 28,
  "hashtags": ["streetfood", "mexico", "foodtok"],
  "region": "MX",
  "music": {
    "title": "original sound",
    "author": "foodie_travels"
  },
  "profileUsername": "foodie_travels",
  "profileUrl": "https://www.tiktok.com/@foodie_travels",
  "profileFollowers": 124000,
  "isVerified": false,
  "extractedAt": "2026-06-03T11:30:00.000Z"
}
```

***

### Pricing

This actor uses **pay-per-result** pricing — you are only charged for posts successfully extracted.

| Plan | Price per 1,000 posts |
|---|---|
| Free | $2.99 |
| Starter | $2.43 |
| Scale | $1.86 |
| Business | $1.37 |

There is no monthly subscription. Charges apply only when the actor runs successfully.

You can cap total spend using Apify's **Max total charge** setting before running.

***

### FAQ

**Does this require a TikTok account or login?**
No. This scraper only collects publicly available data and requires no TikTok credentials.

**Can I scrape private accounts?**
No. Only public TikTok profiles can be scraped.

**How many posts can I get per keyword?**
Up to 500 posts per keyword per run. For larger volumes, run multiple times with different keywords.

**Does it support hashtag search?**
Yes. Add the `#` prefix to your keyword (e.g. `#cooking`) to search by hashtag.

**How fresh is the data?**
Data is collected live from TikTok at the time you run the actor — always up to date.

**Is this legal?**
This actor collects only publicly available data from TikTok, in the same way a user would view posts in a browser. It complies with GDPR for public data collection. Always ensure your use case complies with your local regulations.

# Actor input Schema

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

TikTok usernames to scrape posts from (e.g. 'natgeo', 'nasa')

## `keywords` (type: `array`):

Keywords or hashtags to discover posts (e.g. 'street food', '#travel')

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

Maximum posts to collect per username or keyword (minimum 5)

## `startDate` (type: `string`):

Only include posts on or after this date (YYYY-MM-DD). Applies to profile scraping only.

## `endDate` (type: `string`):

Only include posts on or before this date (YYYY-MM-DD). Applies to profile scraping only.

## `country` (type: `string`):

Filter keyword results by country code (e.g. 'US', 'GB'). Leave empty for global results.

## `whatToCollect` (type: `string`):

Type of content to collect from profiles

## `minViews` (type: `integer`):

Skip posts with fewer views (play count) than this

## `minLikes` (type: `integer`):

Skip posts with fewer likes than this

## Actor input object example

```json
{
  "usernames": [
    "natgeo"
  ],
  "keywords": [
    "street food"
  ],
  "maxPosts": 20,
  "whatToCollect": "Posts",
  "minViews": 0,
  "minLikes": 0
}
```

# 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": [
        "natgeo"
    ],
    "keywords": [
        "street food"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sophisticated_zythum/tiktok-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": ["natgeo"],
    "keywords": ["street food"],
}

# Run the Actor and wait for it to finish
run = client.actor("sophisticated_zythum/tiktok-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "natgeo"
  ],
  "keywords": [
    "street food"
  ]
}' |
apify call sophisticated_zythum/tiktok-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sophisticated_zythum/tiktok-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Post Scraper",
        "description": "Extract TikTok posts by keyword, hashtag, or profile. Get views, likes, comments, video URLs, hashtags, and creator data. No login required. Pay only for results delivered.",
        "version": "0.0",
        "x-build-id": "pjdXNNeASkFq95Zi9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sophisticated_zythum~tiktok-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sophisticated_zythum-tiktok-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sophisticated_zythum~tiktok-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sophisticated_zythum-tiktok-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sophisticated_zythum~tiktok-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sophisticated_zythum-tiktok-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "usernames": {
                        "title": "TikTok Usernames",
                        "type": "array",
                        "description": "TikTok usernames to scrape posts from (e.g. 'natgeo', 'nasa')",
                        "items": {
                            "type": "string"
                        }
                    },
                    "keywords": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "Keywords or hashtags to discover posts (e.g. 'street food', '#travel')",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxPosts": {
                        "title": "Max Posts",
                        "minimum": 5,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum posts to collect per username or keyword (minimum 5)",
                        "default": 20
                    },
                    "startDate": {
                        "title": "Start Date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Only include posts on or after this date (YYYY-MM-DD). Applies to profile scraping only."
                    },
                    "endDate": {
                        "title": "End Date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Only include posts on or before this date (YYYY-MM-DD). Applies to profile scraping only."
                    },
                    "country": {
                        "title": "Country",
                        "type": "string",
                        "description": "Filter keyword results by country code (e.g. 'US', 'GB'). Leave empty for global results."
                    },
                    "whatToCollect": {
                        "title": "What to Collect",
                        "enum": [
                            "Posts",
                            "Reposts",
                            "Posts & Reposts",
                            "Liked Posts"
                        ],
                        "type": "string",
                        "description": "Type of content to collect from profiles",
                        "default": "Posts"
                    },
                    "minViews": {
                        "title": "Minimum Views",
                        "type": "integer",
                        "description": "Skip posts with fewer views (play count) than this",
                        "default": 0
                    },
                    "minLikes": {
                        "title": "Minimum Likes",
                        "type": "integer",
                        "description": "Skip posts with fewer likes than this",
                        "default": 0
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
