# TikTok Public Playlist Scraper (`w3crawler/tiktok-playlist-scraper`) Actor

Extract public TikTok playlist or profile page metadata, visible links, and visible video URLs from public URLs or usernames.

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

## Pricing

from $2.99 / 1,000 playlists

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 Public Playlist Page Scraper

Extract public TikTok playlist or profile-page metadata from public URLs or usernames. The Actor uses a public reader representation first and then direct HTTP, parses title, creator, playlist identifier/title, images, bounded page text, and visible video links, and stores one record per target page.

It does not use cookies, discover every playlist for a profile, fetch each video, or access private content.

### Example input

```json
{
  "playlistUrls": [
    "https://www.tiktok.com/@natgeo/playlist/Cinematic-7509464647364283178"
  ],
  "maxItems": 2
}
```

Profile mode can use usernames:

```json
{
  "usernames": ["natgeo"]
}
```

If no URL or username is supplied, the Actor uses three representative public playlist/profile pages. `maxItems` limits the number of target pages requested.

### Example output

```json
{
  "recordType": "tiktok-playlist",
  "status": "success",
  "dataAvailable": true,
  "source": "tiktok.com",
  "provenance": "public_tiktok_playlist_or_profile_page",
  "sourceTransport": "jina-reader",
  "extractionMethod": "public_page_text_and_post_links",
  "targetUrl": "https://www.tiktok.com/@natgeo/playlist/Cinematic-7509464647364283178",
  "username": "natgeo",
  "playlistId": "Cinematic-7509464647364283178",
  "playlistTitle": "Cinematic",
  "postCount": 2,
  "postsAvailable": true,
  "posts": [
    { "url": "https://www.tiktok.com/@natgeo/video/1234567890", "videoId": "1234567890" }
  ],
  "scrapedAt": "2026-08-18T00:00:00.000Z"
}
```

`posts` contains visible public video links found in the page representation. Those videos are not individually fetched. If a page cannot be retrieved, a `tiktok-playlist-access-diagnostic` or request diagnostic is stored and `OUTPUT` reports the failure.

### Input

- `playlistUrls` (array, optional): Public HTTPS TikTok playlist URLs or profile URLs.
- `usernames` (array, optional): Public TikTok usernames, with or without `@`; converted to profile URLs.
- `maxItems` (integer, 1–10): Maximum unique playlist/profile pages to request. Default: `10`.

The historical inputs for playlist IDs, metadata/posts modes, posts-per-playlist, and playlists-per-profile were removed because this implementation does not implement those operations.

### Output and storage

Playlist/profile page records and diagnostics are written to the default dataset. The Output tab links to the dataset and to `OUTPUT` in the default key-value store.

`OUTPUT` contains requested and processed target counts, usable record count, failed target URLs, and final status. It does not claim a count of every video in a playlist.

### Limitations and cost

The Actor makes at most one public reader request and one direct page request per target. TikTok page markup and visible link availability can change. A profile page is represented as a profile-page record; it is not a playlist enumeration. Missing values are omitted.

Apify compute and public HTTP traffic are the main costs. Start with one target and a small `maxItems` value, and avoid high-frequency retries.

### FAQ and disclaimer

#### Does it return every playlist video?

No. It returns only visible public video links found in the retrieved page representation.

#### Why did the transport show `jina-reader`?

The public reader representation is tried first because TikTok may return a challenge or script-heavy page to direct clients. The transport is recorded for traceability.

#### Does it access private profiles?

No. It requests public pages only and does not bypass authentication or access controls.

Use public data for a legitimate purpose, follow TikTok and `r.jina.ai` terms and robots guidance, and review privacy and data-protection obligations. For support, use the Actor Issues tab.

# Actor input Schema

## `playlistUrls` (type: `array`):

Public HTTPS TikTok playlist URLs or profile URLs.

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

Public TikTok usernames, with or without @; converted to public profile URLs.

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

Maximum unique playlist/profile pages to request.

## Actor input object example

```json
{
  "playlistUrls": [
    "https://www.tiktok.com/@natgeo/playlist/Cinematic-7509464647364283178"
  ],
  "usernames": [
    "natgeo"
  ],
  "maxItems": 2
}
```

# Actor output Schema

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

No description

## `runSummary` (type: `string`):

No description

# 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 = {
    "playlistUrls": [
        "https://www.tiktok.com/@natgeo/playlist/Cinematic-7509464647364283178"
    ],
    "usernames": [
        "natgeo"
    ],
    "maxItems": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/tiktok-playlist-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 = {
    "playlistUrls": ["https://www.tiktok.com/@natgeo/playlist/Cinematic-7509464647364283178"],
    "usernames": ["natgeo"],
    "maxItems": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/tiktok-playlist-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 '{
  "playlistUrls": [
    "https://www.tiktok.com/@natgeo/playlist/Cinematic-7509464647364283178"
  ],
  "usernames": [
    "natgeo"
  ],
  "maxItems": 2
}' |
apify call w3crawler/tiktok-playlist-scraper --silent --output-dataset

```

## MCP server setup

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