# TikTok Profile Scraper - Profiles & Videos, No Login (`studioxl/tiktok-profile-scraper`) Actor

Scrape public TikTok profiles and their videos by username. Exact follower, like, and view counts. No login. Fast JSON and CSV export.

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

## Pricing

from $2.90 / 1,000 results

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

Extract public TikTok profiles and their videos by username or profile URL. No TikTok account or login is required. Results are returned as structured JSON you can export to CSV, Excel, or an API.

### What you get

For each profile:

- Handle, nickname, bio, bio link, region, language
- Follower, following, likes (hearts), video, and friend counts (exact numbers, not the rounded "40.7M" shown on the page)
- Verified flag, private-account flag, seller flag, account creation time, avatar URL

For each video (when you set videos per profile above 0):

- Caption text, create time (ISO), direct video URL
- Play, like, comment, share, and save counts
- Duration, cover image, sound name and author, hashtags
- Pinned and slideshow flags

### Usage

1. Add one or more usernames or profile URLs to **Usernames or profile URLs**. `@handle`, bare `handle`, and full `https://www.tiktok.com/@handle` URLs all work.
2. Set **Videos per profile** to the number of recent videos you want from each profile. Leave it at 0 to collect only the profile record.
3. Run the Actor. Results appear in the dataset as one row per profile and one row per video.

Minimal input:

```json
{
    "profiles": ["@gordonramsayofficial", "https://www.tiktok.com/@mrbeast"],
    "resultsPerPage": 30
}
```

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `profiles` | array | required | Usernames or profile URLs |
| `resultsPerPage` | integer | 0 | Videos to collect per profile; 0 means profile record only |
| `excludePinnedPosts` | boolean | false | Skip pinned posts |
| `maxScrolls` | integer | 30 | Upper bound on paging per profile |
| `proxyCountryCode` | string | None | Collect results as seen from a country |

### Output

One `type: "profile"` row per input, followed by `type: "video"` rows when videos are requested. A profile that cannot be read returns a row with an `error` field (`not_found`, `unavailable`, or `request_failed`) rather than being dropped silently, so a run never returns a quietly empty result for a given input.

### Limitations

- Private accounts return the profile record only. Their videos are not accessible without following, which this Actor does not do.
- Video counts for very large profiles are bounded by `maxScrolls`. Reaching your `resultsPerPage` target means the requested sample was collected, not that the profile was exhausted.
- Follower and following member lists are out of scope. The counts are totals, not lists.
- Displayed values that TikTok itself does not expose for a given profile are returned as `null` rather than guessed.
- Only public data is collected. This Actor does not log in, accept terms, or access anything behind an account.

### Reliability

- No login and no account, so there is no session to expire or get flagged mid-run.
- A profile that cannot be read returns an explicit error row, so a run never ends in a silent empty result.
- The Actor retries on a fresh session if TikTok shows a block, and bounds paging so a run finishes predictably.
- Reads the data TikTok embeds in the public profile page, the most stable part of the site.

### FAQ

- Do I need a TikTok account or cookies? No. This Actor collects only public data with no login.
- Can it scrape private accounts? It returns the public profile record. Private accounts do not expose their videos, so none are returned.
- Does it get follower or following lists? No. It returns follower and following counts, not member lists.
- Why is my video count lower than the profile total? Paging is bounded by Max scroll depth. Raise it to collect more.
- What formats can I export? JSON, CSV, Excel, and HTML through the Apify dataset, or via the API.

### Legal

Use this Actor only for publicly available data and in line with TikTok's Terms of Service and applicable law. Profile data can include personal data; if you store or redistribute it, you are the controller and are responsible for GDPR, CCPA, and similar obligations.

# Actor input Schema

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

TikTok usernames (@handle or handle) or full profile URLs. Add one per line or use bulk edit.

## `resultsPerPage` (type: `integer`):

How many of each profile's videos to collect. Set 0 to collect only the profile record.

## `excludePinnedPosts` (type: `boolean`):

Skip posts pinned to the top of the profile.

## `maxScrolls` (type: `integer`):

Upper bound on paging per profile. Raise it for profiles with many videos; higher values cost more.

## `proxyCountryCode` (type: `string`):

Collect results as seen from this country. Leave as None for default routing.

## Actor input object example

```json
{
  "profiles": [
    "@gordonramsayofficial",
    "https://www.tiktok.com/@mrbeast"
  ],
  "resultsPerPage": 30,
  "excludePinnedPosts": false,
  "maxScrolls": 30,
  "proxyCountryCode": "None"
}
```

# Actor output Schema

## `results` (type: `string`):

Scraped records in the default dataset.

# 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": [
        "@gordonramsayofficial"
    ],
    "resultsPerPage": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("studioxl/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 = {
    "profiles": ["@gordonramsayofficial"],
    "resultsPerPage": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("studioxl/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 '{
  "profiles": [
    "@gordonramsayofficial"
  ],
  "resultsPerPage": 30
}' |
apify call studioxl/tiktok-profile-scraper --silent --output-dataset

```

## MCP server setup

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