# TikTok Public Video Data (`hydra_search/tiktok-public-video-data`) Actor

Get structured data for TikTok videos from their links: author, title, thumbnail, plays, likes, comments, shares, hashtags and music. No API key or login. Rank by plays or likes and keep only the top videos. Public data only. Blocks are reported, never bypassed.

- **URL**: https://apify.com/hydra_search/tiktok-public-video-data.md
- **Developed by:** [HYDRA SEARCH](https://apify.com/hydra_search) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 video records

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 Public Video Data

Give it TikTok video URLs, get structured rows. No TikTok API key and no login.

### What you get

Author, title, thumbnail, caption, post date, plays, likes, comments, shares, hashtags and music title, all taken from the public video page (the thumbnail link is a signed TikTok CDN URL and may expire). The page is fetched first. TikTok's oEmbed endpoint is used only as a free fallback when the page is unavailable. Each row has a `status`: `ok` (page data with an author and all four counts), `partial`, `blocked`, `login_wall`, `not_found`, or `error`.

### Input

| Field | Type | Notes |
|---|---|---|
| `videoUrls` | array of strings | Public TikTok video URLs. Leave it empty to get one free sample row. |
| `delaySeconds` | integer, default 2 | Base pause between requests. It doubles automatically when TikTok signals rate limiting. |
| `maxItems` | integer, default 100 | Maximum videos to process, up to 1000. |
| `sortBy` | `none`, `playCount`, `likeCount`, `commentCount`, `shareCount` | Sort the finished rows by this count, highest first. Default `none`. |
| `topN` | integer, optional | Return only the first N rows after filtering and sorting. |
| `minPlayCount` | integer, default 0 | Drop rows with fewer plays. |
| `minLikeCount` | integer, default 0 | Drop rows with fewer likes. |
| `proxyUrls` | JSON array, optional, secret | Your own http/https proxies, for example `["http://user:pass@host:port"]`. Never logged. |
| `proxyStrategy` | `round-robin` or `least-recent` | How the next proxy is picked. Default `round-robin`. |

Example input:

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@ddlovato/video/7480598109484010794",
    "https://www.tiktok.com/@foodporn/video/7222191537348791554"
  ],
  "delaySeconds": 3,
  "maxItems": 10
}
```

### Ranking and filtering

Applied after all videos are fetched: first rows below `minPlayCount` or `minLikeCount` are dropped, then the rest are sorted descending by `sortBy`, then the first `topN` are kept. Ties keep the order of your input list.

- Rows with a missing count (for example blocked rows) are treated as 0 and get a `note` that says so. The note appears only when that count was used for filtering or sorting.
- Only the rows that are returned are charged. Rows that were filtered out or cut by `topN` are not pushed and not charged.
- Example: `{ "videoUrls": [...], "sortBy": "playCount", "topN": 3 }` returns the 3 most played videos and charges for 3 rows.
- `maxItems` still limits how many videos are fetched, before any filtering. If it cuts valid URLs, the run log shows a warning with the count.

### Status values

- `ok`: the page was served with an author and all four counts (plays, likes, comments, shares). The only billable status.
- `partial`: free. Either the page was served without an author or without all four counts, or the page was unavailable (HTTP 5xx, or 200 with no usable data) and only oEmbed fields were returned (`source` is `oembed`, counts are empty).
- `blocked`: TikTok blocked the page request (403, 429, 503, captcha), or the run stopped after three blocks in a row. The Actor does not try to get around it, and does not fall back to oEmbed after a block.
- `login_wall`: free. TikTok answered 200 with a login page and no video data. It counts as a block: after three in a row the run stops.
- `not_found`: the video does not exist or is not public.
- `error`: a connection failure, a TikTok server error (HTTP 5xx) on the page with no oEmbed data, or no healthy proxy was left.

`source` is `page`, `oembed` or `sample`. Only `ok` rows are charged.

### Limits, stated plainly

- Only public video URLs of the form `https://www.tiktok.com/@user/video/<id>`.
- TikTok often blocks automated page requests. Optional rotating proxies (http/https) can spread requests, and a proxy is dropped for a cooldown after repeated connection failures. A block (403, 429, 503, captcha) or a login wall is never retried through another proxy or another endpoint: the Actor backs off, reports `blocked` or `login_wall`, and stops after three in a row. Pacing applies to all proxies combined. No identity rotation or captcha solving.

### Sample output row

```json
{
  "url": "https://www.tiktok.com/@ddlovato/video/7480598109484010794",
  "videoId": "7480598109484010794",
  "status": "ok",
  "source": "page",
  "authorName": "Demi Lovato",
  "authorUrl": "https://www.tiktok.com/@ddlovato",
  "title": "On Cooking With Demi we are all about facing our fears. (caption shortened)",
  "thumbnailUrl": "https://p16-common-sign.tiktokcdn-us.com/... (signed link, expires)",
  "description": "On Cooking With Demi we are all about facing our fears. (caption shortened)",
  "createTime": "2025-03-11T17:01:45.000Z",
  "playCount": 2400000,
  "likeCount": 204600,
  "commentCount": 3376,
  "shareCount": 5448,
  "hashtags": [],
  "musicTitle": "original sound",
  "blockedReason": null,
  "note": null,
  "fetchedAt": "2026-11-23T03:48:09.699Z",
  "sourceUrl": "https://www.tiktok.com",
  "disclaimer": "Public data as served by TikTok at fetch time. Not affiliated with TikTok. Counts may be missing when TikTok blocks page requests. Check TikTok terms and applicable law before use.",
  "isSample": false
}
```

### Pricing

Pay per result (event `video-record`): $2.00 per 1,000 results ($0.002 each). Only rows that are returned in the dataset with status `ok` (real page data: author and all four counts) are charged. `partial`, `blocked`, `login_wall`, `not_found` and `error` rows are free, and so is the sample row. An oEmbed-only row is never charged.

### Legal

Not affiliated with TikTok. You are responsible for following TikTok's terms and the law where you operate. See TERMS.md.

# Actor input Schema

## `videoUrls` (type: `array`):

Public TikTok video URLs, like https://www.tiktok.com/@user/video/1234567890. No API key needed.

## `proxyUrls` (type: `array`):

Optional. Enter a JSON array of proxy URLs like \["http://user:pass@host:port"]. Requests rotate across them. Stored as secret and never logged.

## `proxyStrategy` (type: `string`):

How to pick the next proxy.

## `delaySeconds` (type: `integer`):

Base pause between requests. Doubles automatically when TikTok signals rate limiting.

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

Maximum number of videos to process.

## `sortBy` (type: `string`):

Sort the finished rows by this count, highest first. Applied after fetching.

## `topN` (type: `integer`):

Optional. Return only the first N rows after filtering and sorting. Only returned rows are charged.

## `minPlayCount` (type: `integer`):

Drop rows with fewer plays. A missing count is treated as 0.

## `minLikeCount` (type: `integer`):

Drop rows with fewer likes. A missing count is treated as 0.

## Actor input object example

```json
{
  "videoUrls": [],
  "proxyStrategy": "round-robin",
  "delaySeconds": 2,
  "maxItems": 100,
  "sortBy": "none",
  "minPlayCount": 0,
  "minLikeCount": 0
}
```

# Actor output Schema

## `overview` (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 = {
    "videoUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydra_search/tiktok-public-video-data").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 = { "videoUrls": [] }

# Run the Actor and wait for it to finish
run = client.actor("hydra_search/tiktok-public-video-data").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 '{
  "videoUrls": []
}' |
apify call hydra_search/tiktok-public-video-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydra_search/tiktok-public-video-data"
        }
    }
}
```

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/PK2etab0Vp9bN9GOD/builds/R41BAapfacGHToS4F/openapi.json
