# TikTok Topic, Effect and Place Pages Scraper (`xyrelith-data/tiktok-topic-effect-place-scraper`) Actor

Scrape TikTok Discover topic pages, effect pages and place pages without login: entity metadata, keyword tags, photo albums and every attached video with stats, music and author details.

- **URL**: https://apify.com/xyrelith-data/tiktok-topic-effect-place-scraper.md
- **Developed by:** [Xyrelith Data](https://apify.com/xyrelith-data) (community)
- **Categories:** Social media, Videos, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Topic, Effect and Place Pages Scraper

Collect TikTok's public topic, effect and place landing pages without logging in. Paste a name, a numeric ID or a page link and get two kinds of rows: the page's own metadata and every video TikTok attaches to it, with engagement stats, author details, music, hashtags and durable image links.

TikTok hides these pages behind JavaScript-signed requests, not a login. This scraper opens each page like a normal visitor, lets TikTok's own page load its data, and reads the result. No account, cookie, API key or proxy configuration is needed.

### What it collects

#### Topic pages — `tiktok.com/discover/<topic>`

- Topic title, TikTok's topic summary and keyword tags
- Topic ID, language and canonical page link
- The ranked list of videos shown on the topic page, including TikTok's AI-written title and summary for each video when present

Topic input accepts a plain name (`easy dinner recipes`), an existing slug (`easy-dinner-recipes`) or a link. `/channel/...` links that redirect to Discover are also accepted.

#### Effect pages — `tiktok.com/effect/<name>-<id>`

- Effect name, ID and description
- Creator ID and nickname, creator verified flag and top-designer flag
- Number of people who used the effect and total views of those videos
- Publish date, tags and effect icon
- The videos using the effect

#### Place pages — `tiktok.com/place/<name>-<id>`

- Place name, ID and category
- Type hierarchy such as `Place and Address > Places > Province`
- Address, city, province, country and country/city codes
- Parent place, claimed flag, total video count and photo count
- Photo album copied to durable storage
- The videos tagged at that place

#### Video rows for all three page types

Every video row includes:

| Group | Fields |
|---|---|
| Identity | `videoId`, `videoUrl`, `caption`, `hashtags`, `createdAt`, `durationSeconds`, `rank` |
| Engagement | `views`, `likes`, `comments`, `shares`, `saves` |
| Author | `authorId`, `authorUsername`, `authorNickname`, `authorVerified`, `authorFollowers`, avatar |
| Music | `musicId`, `musicTitle`, `musicAuthor`, cover |
| Media | cover image and author avatar, rehosted in the run's Key-Value Store |
| Context | `pageType`, `entityId`, `entityName`, `entityUrl`, `sourceUrl` |
| Discover extras | `aiTitle`, `aiSummary`, `videoAltText` |

All image fields are copied into the run's Key-Value Store (`coverUrl`, `authorAvatarUrl`, `musicCoverUrl`, `iconUrl`, `photos`) and the original TikTok link is kept in the matching `...Original` field. This keeps links usable after TikTok's signed image URLs expire.

### Input

| Field | Default | What it does |
|---|---|---|
| `mode` | `discover` | `discover`, `effect`, `place` or `urls` |
| `topics` | `[]` | Names, slugs or links for Discover topic pages (prefill: `pizza`) |
| `effects` | `[]` | IDs, slugs or links for effect pages |
| `places` | `[]` | IDs, slugs or links for place pages |
| `startUrls` | `[]` | Mixed discover, effect and place links detected automatically |
| `maxVideosPerEntity` | `30` | Video cap per page; `0` returns page metadata only |
| `maxItems` | `500` | Hard cap on all dataset rows, including metadata rows |
| `maxPhotosPerPlace` | `12` | Number of place album photos to publish |
| `minViews` | `0` | Drop videos below this view count |
| `minLikes` | `0` | Drop videos below this like count |
| `postedWithin` | `any` | Keep only videos from the last 24 hours, 7, 30 or 90 days |
| `includeEntityRecord` | `true` | Emit the page metadata row |

The field for the chosen mode is required in practice; other target fields are ignored. A bare effect or place name without its numeric ID cannot be resolved, so paste the page link or the slug that ends with the ID.

#### Examples

Discover topics:

```json
{
  "mode": "discover",
  "topics": ["pizza", "easy dinner recipes", "https://www.tiktok.com/discover/cat-videos"],
  "maxVideosPerEntity": 30,
  "maxItems": 100
}
```

Effect pages:

```json
{
  "mode": "effect",
  "effects": ["https://www.tiktok.com/effect/Green-Screen-Video-460598"],
  "maxVideosPerEntity": 50
}
```

Place pages:

```json
{
  "mode": "place",
  "places": ["22535796481546927", "https://www.tiktok.com/place/New-York-State-22535796481546927"],
  "maxPhotosPerPlace": 12,
  "minLikes": 100
}
```

Mixed links with filters:

```json
{
  "mode": "urls",
  "startUrls": [
    "https://www.tiktok.com/discover/coffee",
    "https://www.tiktok.com/effect/x-460598",
    "https://www.tiktok.com/place/x-22535796481546927"
  ],
  "postedWithin": "30d",
  "maxItems": 200
}
```

### Output

The dataset mixes metadata rows and video rows. Use `recordType` to separate them:

- `tiktokTopic`, `tiktokEffect`, `tiktokPlace` — one page metadata row
- `tiktokTopicVideo`, `tiktokEffectVideo`, `tiktokPlaceVideo` — video rows

Each row also has `pageType`, `sourceUrl` and `scrapedAt`. Rows are ordered by page and then by TikTok's own rank.

Example video row (shortened):

```json
{
  "recordType": "tiktokPlaceVideo",
  "pageType": "place",
  "entityId": "22535796481546927",
  "entityName": "New York State",
  "entityUrl": "https://www.tiktok.com/place/New-York-State-22535796481546927",
  "rank": 1,
  "videoId": "7453477561163631918",
  "videoUrl": "https://www.tiktok.com/@ypppppoo8/video/7453477561163631918",
  "caption": "They're finally reunited.#usa #surprise #reunion",
  "hashtags": ["usa", "surprise", "reunion"],
  "createdAt": "2024-12-28T14:59:44Z",
  "durationSeconds": 84,
  "views": 180500000,
  "likes": 16300000,
  "comments": 52200,
  "shares": 293400,
  "saves": 1100000,
  "authorUsername": "ypppppoo8",
  "authorNickname": "ypppppoo",
  "authorVerified": false,
  "authorFollowers": 2100000,
  "musicTitle": "suono originale",
  "musicAuthor": "sophia ★",
  "coverUrl": "https://api.apify.com/v2/key-value-stores/.../records/tt-place-...-cover.jpg",
  "coverUrlOriginal": "https://p16-common-sign.tiktokcdn.com/...",
  "sourceUrl": "https://www.tiktok.com/place/x-22535796481546927",
  "scrapedAt": "2026-11-15T09:14:06Z"
}
```

### Use cases

- **Trend research:** compare the videos ranking on different Discover topics and see which creators and sounds appear.
- **Effect adoption:** measure how many people use an effect, how many views its videos accumulate and which creators drive it.
- **Local content research:** collect the videos tagged at a city, province, restaurant, hotel or landmark, with author and engagement data.
- **Creator discovery:** find the authors and music behind a topic, effect or place, then filter by views or likes.
- **Content monitoring:** schedule the same inputs to track new videos inside a date window.

### FAQ

#### Do I need a TikTok account or cookies?

No. The scraper reads public pages as a logged-out visitor and never asks for a login, cookie or API key.

#### Do I need to configure a proxy?

No. It connects directly. If a network blocks the direct path, the actor automatically tries Apify's datacenter proxy on a retry; users never configure anything.

#### How deep can it go?

Discover pages are followed beyond the visible scroll until TikTok says there are no more results: 94 unique videos for `pizza` in testing, with other topics varying. Effect and place pages paginate through their own cursors. `maxVideosPerEntity` controls how many rows to collect and `maxItems` caps the whole run.

#### Why is the effect or place name not enough?

TikTok resolves effects and places by their numeric ID. A name alone has no ID to look up, so provide the page link or the slug that ends with the ID.

#### Why are images copied into the Key-Value Store?

TikTok's image links are signed and expire. The scraper stores the bytes once and publishes a stable link, while keeping TikTok's signed URL in the `...Original` field for traceability.

#### Are ratings, reviews, coordinates or LIVE events included?

No. TikTok does not expose place ratings, reviews, coordinates or LIVE event data on these public pages in a way that can be collected reliably without login, so they are intentionally out of scope.

#### What happens when a page has no videos?

The metadata row is still returned when TikTok shows the page. The run finishes successfully with a status message describing what was found.

### Notes and limits

- Discover topic pages: the page UI stops scrolling at roughly 60 videos, so the actor continues the same TikTok list request directly until TikTok reports no more results. Measured ceiling for `pizza`: 94 unique videos; other topics vary and are reported honestly in the run status.
- Topic summaries and keyword tags are returned only for topics where TikTok publishes them. Smaller topics may have a title and videos but no summary; the fields are then omitted instead of filled with generic page copy.
- Effect pages: the number of people and view total come from TikTok's effect detail; TikTok does not expose a separate total video count there. Effect video payloads report `0` followers for some creators when TikTok hides the count; the value is kept as TikTok sends it rather than guessed.
- Place pages: the video count is TikTok's own total, while the collected rows are limited by `maxVideosPerEntity`.
- Places without an album, or effects without some optional fields, simply omit those fields. No row is padded with placeholder values.
- This actor collects public page data only. Use it responsibly and respect TikTok's terms and applicable privacy laws.

# Actor input Schema

## `mode` (type: `string`):

Discover topic pages (tiktok.com/discover/...), effect pages (tiktok.com/effect/...), place pages (tiktok.com/place/...) or a mixed list of all three.

## `topics` (type: `array`):

(mode=discover) Topic names, slugs or links. Plain words are turned into TikTok topic slugs, for example Easy Dinner Recipes becomes easy-dinner-recipes.

## `effects` (type: `array`):

(mode=effect) Effect IDs, effect slugs or links. An effect name without its numeric ID cannot be resolved, so paste the page link or slug that ends with the ID.

## `places` (type: `array`):

(mode=place) Place IDs, place slugs or links. A bare numeric ID works; a place name without the numeric ID cannot be resolved.

## `startUrls` (type: `array`):

(mode=urls) Any mix of TikTok discover, effect and place page links. The page type is detected from each URL.

## `maxVideosPerEntity` (type: `integer`):

Maximum video rows to collect from each topic, effect or place. Set 0 to return page metadata only. Discover topics stop at TikTok's own 60-video page ceiling; effects and places can go deeper.

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

Hard cap on all rows in the dataset, including the one page-metadata row per entity. When the cap is reached the run stops cleanly.

## `maxPhotosPerPlace` (type: `integer`):

How many photos from a place's photo album to publish. Every photo is copied to the run's Key-Value Store so the links stay usable after TikTok's signed URLs expire.

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

Drop videos with fewer views. Videos whose stats are missing pass through.

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

Drop videos with fewer likes. Videos whose stats are missing pass through.

## `postedWithin` (type: `string`):

Keep only videos created inside this window, measured from the run start.

## `includeEntityRecord` (type: `boolean`):

Add one row per topic, effect or place with its title, description, keywords, owner or place details. Disable it to receive video rows only.

## Actor input object example

```json
{
  "mode": "discover",
  "topics": [
    "pizza"
  ],
  "effects": [],
  "places": [],
  "startUrls": [],
  "maxVideosPerEntity": 2,
  "maxItems": 3,
  "maxPhotosPerPlace": 3,
  "minViews": 0,
  "minLikes": 0,
  "postedWithin": "any",
  "includeEntityRecord": true
}
```

# Actor output Schema

## `data` (type: `string`):

Dataset with one metadata row per topic, effect or place (recordType=tiktokTopic, tiktokEffect, tiktokPlace) and one row per attached video (recordType=tiktokTopicVideo, tiktokEffectVideo, tiktokPlaceVideo). Video rows carry views, likes, comments, shares, saves, author, music, hashtags, duration, created date and Key-Value Store media links.

# 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 = {
    "mode": "discover",
    "topics": [
        "pizza"
    ],
    "maxVideosPerEntity": 2,
    "maxItems": 3,
    "maxPhotosPerPlace": 3,
    "minViews": 0,
    "minLikes": 0,
    "postedWithin": "any",
    "includeEntityRecord": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("xyrelith-data/tiktok-topic-effect-place-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 = {
    "mode": "discover",
    "topics": ["pizza"],
    "maxVideosPerEntity": 2,
    "maxItems": 3,
    "maxPhotosPerPlace": 3,
    "minViews": 0,
    "minLikes": 0,
    "postedWithin": "any",
    "includeEntityRecord": True,
}

# Run the Actor and wait for it to finish
run = client.actor("xyrelith-data/tiktok-topic-effect-place-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 '{
  "mode": "discover",
  "topics": [
    "pizza"
  ],
  "maxVideosPerEntity": 2,
  "maxItems": 3,
  "maxPhotosPerPlace": 3,
  "minViews": 0,
  "minLikes": 0,
  "postedWithin": "any",
  "includeEntityRecord": true
}' |
apify call xyrelith-data/tiktok-topic-effect-place-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xyrelith-data/tiktok-topic-effect-place-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/s4LeShu1UDqGXRK0a/builds/U8XRpnYYaDzqyFwrX/openapi.json
