# TikTok Video Search API (`deepmine/tiktok-video-search`) Actor

Search TikTok by keyword and get the videos TikTok shows for it, in TikTok's order: plays, likes, comments, shares, caption, hashtags, creator (with followers), sound, cover and post date, plus each video's rank. Keywords in, clean JSON out. No login.

- **URL**: https://apify.com/deepmine/tiktok-video-search.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.25 / 1,000 videos

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/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 Video Search API

Search TikTok by keyword and get the **videos TikTok shows for that search**, in TikTok's own order, as clean rows: plays, likes, comments, shares, saves, caption, hashtags, the creator and their follower count, sound, cover, post date and each video's **rank** in the results.

Type keywords the way you would on TikTok, or paste a `tiktok.com/search?q=...` link. No TikTok account, no cookies, no login.

| Creator | Caption | ▶️ Plays | ❤️ Likes | 📅 Posted | 🔍 Keyword | 🏅 Rank |
|---|---|---:|---:|---|---|---:|
| [@nativetyfood](https://www.tiktok.com/@nativetyfood/video/7352887253321960746) | $6.25 pork roll in Taiwan 🇹🇼 #taiwan #taipei #taip… | 11,800,000 | 389,900 | 2024-04-01 | street food | 2 |
| [@street.food.1610](https://www.tiktok.com/@street.food.1610/video/7623389623330393366) | Fastest fried rice EVER 😳🔥#food #foodie #streetfoo… | 8,500,000 | 574,400 | 2026-03-31 | street food | 3 |
| [@deinfitnessmangae](https://www.tiktok.com/@deinfitnessmangae/video/7672766248488340768) | Full Body Workout #workout #trainning #homeworkout… | 223,000 | 12,900 | 2026-08-12 | home workout | 1 |

<sub>Collected 2026-09-27 with `{"keywords": ["street food", "home workout"], "maxVideosPerKeyword": 20}`. Every row also has the full caption, shares, saves, the creator's name, follower count and verified badge, duration, hashtags, sound, cover and video ID.</sub>

**$0.40 per 1,000 videos** on the Starter plan ($0.50 Free, $0.30 Scale, $0.25 Business). The prefilled run (100 videos) costs about $0.04.

### Why this one

- **Up to ~250 videos per keyword.** The Actor pages through the whole search TikTok shows logged-out visitors (216 for "street food", 243 for "skincare routine", 254 for "booktok recommendations" on 2026-09-27), not just the first screen.
- **Rank included.** `rank` is the video's position in TikTok's results, so you can track who ranks for a term over time.
- **Creator size on every video.** Each row carries the creator's follower count and verified badge: find creators in a niche straight away.
- **Many keywords per run**, searched in parallel, each with its own limit and summary. Rows come keyword by keyword, in your order.
- **Fails loudly, never silently.** Every run saves a per-keyword summary (`OUTPUT`). If TikTok refuses a keyword on every retry, the run is marked failed instead of quietly returning less.
- **Fast and light.** Plain HTTP, no browser: 5 keywords and 782 videos took 32 seconds in our test.

### Input

| Field | What it does | Default |
|---|---|---|
| `keywords` | Search terms, one per line: `street food`, `skincare routine`, `https://www.tiktok.com/search?q=booktok`. | `street food` |
| `maxVideosPerKeyword` | Videos per keyword, up to 1,000 (but see "How many videos per keyword?"). | 100 |
| `postedAfter` | Keep only videos posted after this date (`2026-09-01`, or via the API `30 days`). | all |
| `proxyConfiguration` | Apify Proxy. Datacenter (the default) works; switch to residential only if a run reports blocks. | Apify datacenter |

Example:

```json
{
  "keywords": ["street food", "skincare routine"],
  "maxVideosPerKeyword": 200
}
```

### Output

One row per video, keyword by keyword in your order, each keyword's videos in TikTok's order (`rank` 1, 2, 3...). Two table views in the Console:

- **📊 Overview**: 🖼️ Cover, 🏷️ Username, 👤 Creator, 📝 Caption, 🔗 TikTok, ▶️ Plays, ❤️ Likes, 💬 Comments, 🔁 Shares, 👥 Followers, 📅 Posted, 🔍 Keyword, 🏅 Rank
- **📈 Stats**: 🏷️ Username, 🔗 TikTok, ▶️ Plays, ❤️ Likes, 💬 Comments, 🔁 Shares, 🔖 Saves, 👥 Followers, ⏱️ Duration, 📅 Posted, 🔍 Keyword, 🏅 Rank

#### Output fields

Every row has these keys, in this order. A value TikTok didn't send is `null` (never an empty string or a made-up 0).

- `cover`: the video's cover image.
- `authorName`: the creator's display name.
- `caption`: the full caption, hashtags included.
- `captionSnippet`: the caption's first 50 characters on one line, for tables.
- `authorUsername`: the creator's TikTok username, without @.
- `videoUrl`: the video's page on TikTok.
- `authorVerified`: the creator has TikTok's verified badge.
- `plays`: views.
- `likes`: likes.
- `comments`: comments.
- `shares`: shares.
- `saves`: saves (TikTok's Favorites).
- `authorFollowers`: the creator's followers when the video was collected.
- `durationSeconds`: length in seconds (`null` for photo posts).
- `postedAt`: when it was posted (UTC).
- `rank`: position in TikTok's results for the keyword.
- `hashtags`: hashtags in the caption, without #.
- `soundTitle`: the sound's title ("original sound" is the creator's own audio).
- `soundUrl`: the sound's page on TikTok.
- `photos`: the images of a photo post (slideshow); `null` for videos.
- `videoId`: TikTok's video ID.
- `keyword`: the search keyword (your input).
- `scrapedAt`: when it was collected (UTC).

Example row:

```json
{
  "cover": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-...",
  "authorName": "nativetyfood",
  "caption": "$6.25 pork roll in Taiwan 🇹🇼 #taiwan #taipei #taipeitaiwan #streetfood #taiwanfood #nativety",
  "captionSnippet": "$6.25 pork roll in Taiwan 🇹🇼 #taiwan #taipei #taip…",
  "authorUsername": "nativetyfood",
  "videoUrl": "https://www.tiktok.com/@nativetyfood/video/7352887253321960746",
  "authorVerified": false,
  "plays": 11800000,
  "likes": 389900,
  "comments": 1720,
  "shares": 3826,
  "saves": 14159,
  "authorFollowers": 1500000,
  "durationSeconds": 99,
  "postedAt": "2024-04-01T14:05:00Z",
  "rank": 2,
  "hashtags": ["taiwan", "taipei", "taipeitaiwan", "streetfood", "taiwanfood", "nativety"],
  "soundTitle": "original sound - Native Ty Food",
  "soundUrl": "https://www.tiktok.com/music/original-sound-native-ty-food-7352887503252163370",
  "photos": null,
  "videoId": "7352887253321960746",
  "keyword": "street food",
  "scrapedAt": "2026-09-27T19:07:35Z"
}
```

Notes:

- `rank` counts every video TikTok returned, including ones `postedAfter` filtered out, so gaps are normal with a date filter.
- TikTok rounds large counters on its web pages (269.9K plays shows as `269900`); small numbers are exact. Now and then TikTok sends a video's plays, likes, shares and saves as 0 next to real comments; those come as `null`.
- **Image links expire.** `cover` and `photos` are signed by TikTok and stop working about 2 days after the run. Download the images you need soon after the run.

#### Run summary (`OUTPUT`)

```json
{
  "results": 459,
  "inputs": [
    {"input": "street food", "status": "ok", "results": 216, "stopReason": "end", "keyword": "street food"},
    {"input": "skincare routine", "status": "ok", "results": 243, "stopReason": "end", "keyword": "skincare routine"},
    {"input": "porn", "status": "no_results", "results": 0, "stopReason": "no_results", "error": "TikTok shows no results for this keyword (it hides results for some terms)"}
  ]
}
```

`status` per keyword: `ok`, `no_results` (TikTok shows nothing, or hides results for that term), `invalid`, `blocked` (TikTok refused it on every retry; the run fails so you notice), `stopped` (your spending limit). `stopReason`: `max_results`, or `end` when TikTok showed no more videos. `filteredOut` counts videos dropped by `postedAfter`.

### How many videos per keyword?

TikTok shows logged-out visitors a fixed list of roughly **150 to 250 videos per search**, and it's the same list for every visitor (three separate visits to "street food" together added only 6%). For more coverage, add related keywords or long-tail variations ("street food bangkok", "street food nyc").

### Pricing

Pay per result, no start fee and no minimum. Example: 1,000 videos cost $0.40 on the Starter plan.

| Your Apify plan | Per 1,000 videos |
|---|---|
| Free | $0.50 |
| Starter | $0.40 |
| Scale | $0.30 |
| Business | $0.25 |

You pay only for rows that reach your dataset. Keywords with no results and invalid inputs cost nothing. When your spending limit is reached, the run stops.

### FAQ

**Do I need a TikTok account?** No. The Actor reads only what TikTok shows logged-out visitors.

**Can I sort by date or by views?** TikTok's web search doesn't offer that to logged-out visitors, so results come in TikTok's relevance order. Use `postedAfter` to keep recent videos, and sort on `postedAt` or `plays` after the run.

**Why did a nonsense keyword return videos?** TikTok falls back to loosely related videos when nothing matches well. Check `caption` and `hashtags` if you need exact matches.

**The same video under two keywords?** It gets a row under each keyword, each with its own `rank`.

**Hashtags?** Searching `#booktok` works like any keyword. For a hashtag's own feed plus its total views, use our TikTok Hashtag Videos API.

### Feedback

Missing a field, or a result that doesn't look right? Open an issue on the **Issues** tab and we'll look into it. If the data helps you, a short review on this page helps other people find it.

# Actor input Schema

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

Search terms, one per line, as you'd type them on TikTok. A tiktok.com/search?q=... URL works too. Example: street food

## `maxVideosPerKeyword` (type: `integer`):

Videos to get per keyword, in TikTok's order. TikTok shows logged-out visitors roughly 150-250 videos per search. You pay per video.

## `postedAfter` (type: `string`):

Skip videos posted before this date (YYYY-MM-DD). Via the API you can also pass a relative time such as '30 days'. TikTok's results aren't sorted by date, so this filters the videos TikTok returns. Leave empty for all.

## `proxyConfiguration` (type: `object`):

TikTok is reached through Apify Proxy. Datacenter proxies (the default) work for these pages; switch to residential only if your runs report blocks.

## Actor input object example

```json
{
  "keywords": [
    "street food"
  ],
  "maxVideosPerKeyword": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "keywords": [
        "street food"
    ],
    "maxVideosPerKeyword": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/tiktok-video-search").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 = {
    "keywords": ["street food"],
    "maxVideosPerKeyword": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/tiktok-video-search").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 '{
  "keywords": [
    "street food"
  ],
  "maxVideosPerKeyword": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call deepmine/tiktok-video-search --silent --output-dataset

```

## MCP server setup

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

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/jYEa8i47xRPBmgg57/builds/0uC9OkH1dGxhgn9Vk/openapi.json
