# TikTok Search Scraper (`piotrv1001/tiktok-search-scraper`) Actor

TikTok search scraper: find TikTok videos by keyword with views, likes, comments, shares, saves, caption, hashtags, upload date, music and author stats. Sort by most liked or newest, filter by date posted. Export TikTok search data to JSON, CSV or Excel.

- **URL**: https://apify.com/piotrv1001/tiktok-search-scraper.md
- **Developed by:** [FalconScrape](https://apify.com/piotrv1001) (community)
- **Categories:** Social media, Videos, Automation
- **Features:** Limited permissions
- **Stats:** 4 total users, 1 monthly users, 73.3% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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.

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

The **TikTok Search Scraper** finds TikTok videos by keyword and gives you the results as clean TikTok data: views, likes, comments, shares and saves, the caption with hashtags, the exact upload date, the music, and the creator's follower count. Type a few keywords, sort by most liked or newest, limit by date posted, and export the search results to JSON, CSV or Excel. It works as a TikTok search API: no TikTok account or developer approval needed.

### 🎯 Use Cases

- **TikTok keyword research**: see which videos rank for a keyword and how many views, likes and saves they get before you make your own.
- **TikTok SEO**: track who shows up for your target keywords, what captions and hashtags they use, and how the results change week to week.
- **TikTok trends**: sort by newest or filter to this week to see what is being posted about a topic right now.
- **Competitor and content research**: collect the top videos in a niche, sorted by most liked, into one spreadsheet.
- **Find TikTok influencers**: every row has the creator's username, bio, followers and total likes, so a keyword search doubles as a creator list.
- **TikTok data for analytics and AI**: captions, hashtags and engagement counts for datasets and content analysis.

### ✨ Features

- **Search by keyword**: any number of keywords in one run, each with its own limit.
- **Sort and date filters**: sort by most liked or newest, and limit to the last 24 hours, week, month, 3 or 6 months. Filtered searches cost $0.0012 per video and can take 1 to 3 minutes.
- **Video stats**: plays, likes, comments, shares and saves for every result.
- **Caption details**: full caption, hashtags, mentions and exact upload time, plus language on sorted and date-filtered searches.
- **Music and sound**: sound ID, title, artist and audio link.
- **Creator data**: username, nickname, verified flag, bio, avatar, followers, following, total likes and video count.
- **Photo posts too**: slideshow posts come back with `type: "photo"` and all image links.
- **Fair billing**: a video found under two keywords is saved and charged once.

### 🛠️ How It Works

1. **Enter your keywords**, one per line.
2. **Pick a sort and a date range** if you want them, and set how many videos you want per keyword.
3. **Run it and download** the results as JSON, CSV or Excel, or pull them through the Apify API.

### ⚙️ Input

| Field                      | What it does                                                                                 |
| -------------------------- | -------------------------------------------------------------------------------------------- |
| **Keywords**               | What to search TikTok for, one keyword or phrase per line.                                   |
| **Sort by**                | Relevance (default), most liked or newest. Most liked and newest cost $0.0012 per video.     |
| **Date posted**            | Any time (default), last 24 hours, week, month, 3 or 6 months. A period costs $0.0012 per video. |
| **Max videos per keyword** | Stop each keyword after this many videos. Default 50.                                        |

```json
{
    "keywords": ["protein pancakes", "nike shoes"],
    "sortBy": "most-liked",
    "publishTime": "month",
    "maxItems": 100
}
```

#### How many videos per keyword?

TikTok decides how deep a search goes. Expect about 60 to 240 videos per keyword. Date filters and narrow topics return fewer: a one-week or 24-hour filter can return under 10 videos, or none. When a search ends before your limit, the run's status message says so, and you pay only for what was found.

A plain keyword search of up to about 90 videos takes seconds. Filtered searches, and searches beyond that depth, can take 1 to 3 minutes and occasionally cannot finish; the status message tells you when to run one again, and only the videos you received are charged.

### 💰 Pricing

You pay only for the videos you get. There is no monthly rental.

| Event              | Price                                 | What you get                                                                     |
| ------------------ | ------------------------------------- | -------------------------------------------------------------------------------- |
| **Video**          | $0.0005 per video ($0.50 per 1,000)   | One video or photo post with stats, caption, music and author, from a search with no filter |
| **Filtered video** | $0.0012 per video ($1.20 per 1,000)   | The same data, from a search with a sort (most liked, newest) or a date filter   |
| **Actor start**    | $0.00005 per run                      | Charged once when the run starts.                                                |

Filtered searches cost $0.0012 per video and can take 1 to 3 minutes. The price is set by your input: if you choose a sort or a date filter, every video in that run is a filtered video. With Relevance and Any time, every video is $0.0005, however many you ask for.

Without filters: 50 videos = $0.025 · 1,000 videos = $0.50 · 10,000 videos = $5.00.

With a sort or date filter: 50 videos = $0.06 · 1,000 videos = $1.20 · 10,000 videos = $12.00.

### 📊 Sample Output Data

```json
{
    "id": "7700644237926272286",
    "url": "https://www.tiktok.com/@natandrus/video/7700644237926272286",
    "type": "video",
    "description": "let me know in the comments which recipe you want me to share! here is my weekly high protein & fiber meal prep as so…",
    "createdAt": "2026-10-25T16:32:50.000Z",
    "createTimeUnix": 1792945970,
    "playCount": 1200000,
    "likeCount": 123800,
    "commentCount": 959,
    "shareCount": 9940,
    "saveCount": 62889,
    "repostCount": 0,
    "durationSeconds": 47,
    "width": 720,
    "height": 1280,
    "definition": "720p",
    "coverUrl": "https://p16-common-sign.tiktokcdn.com/tos-useast8-p-0068-tx2…",
    "dynamicCoverUrl": "https://p16-common-sign.tiktokcdn.com/tos-useast8-p-0068-tx2…",
    "images": [],
    "photoTitle": null,
    "hashtags": [
        "sundaymealprep",
        "mealprep"
    ],
    "mentions": [],
    "music": {
        "id": "7700644299179936542",
        "title": "original sound",
        "author": "nat ❤️‍🔥🏋🏽‍♀️💪🏼",
        "original": true,
        "durationSeconds": 47,
        "coverUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b1…",
        "playUrl": "https://v16-webapp-prime.tiktok.com/video/tos/alisg/tos-alis…"
    },
    "subtitles": [
        {
            "language": "eng-US",
            "source": "ASR",
            "format": "webvtt",
            "url": "https://v16-webapp.tiktok.com/04d0fa01e2f72dd2f28edbf2f19f52…"
        }
    ],
    "location": null,
    "country": null,
    "language": "en",
    "categories": [],
    "isAd": false,
    "isAiGenerated": false,
    "authorUsername": "natandrus",
    "authorNickname": "nat ❤️‍🔥🏋🏽‍♀️💪🏼",
    "authorId": "6741454164587660294",
    "authorSecUid": "MS4wLjABAAAAmup4MC7QtJK--IKZUUVPeoP9Jnok7Fk7Vby-7rzn_UL5mGcYuSFDZraAON9jTitQ",
    "authorVerified": false,
    "authorBio": "24, slc, -40 pounds naturally\nhigh protein meals + weight loss hacks\n💌: natalieandrus20@gmail.com",
    "authorAvatar": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b1…",
    "authorFollowers": 122100,
    "authorFollowing": 166,
    "authorLikes": 841400,
    "authorVideoCount": 401,
    "keyword": "protein pancakes",
    "scrapedAt": "2026-11-01T07:54:40.618Z"
}
```

`playCount`, `likeCount` and the author counts are the numbers TikTok shows, which it rounds to three digits for big videos (1.2M). `keyword` is the search that found the video. `repostCount` and `language` are filled on sorted and date-filtered searches and on results past the first 90 or so; they are empty on the others. `country` is empty here, and `location` is filled only when the creator tagged a place.

### 📅 Schedule and Integrate

To follow TikTok trends or a keyword over time, save your search as a Task and run it daily or weekly with Apify **Schedules**. Every run adds a new snapshot with `scrapedAt`. Send the results to Google Sheets, Zapier, Make, n8n or your own system through webhooks and the Apify API.

### 🤖 Use with AI Agents (MCP)

The TikTok Search Scraper works as a tool in Claude, ChatGPT, Cursor and other MCP clients through the Apify MCP server (`https://mcp.apify.com`). An agent can call it with:

```json
{ "keywords": ["protein pancakes"], "sortBy": "newest", "maxItems": 20 }
```

### ❓ FAQ

**Is there a TikTok search API?** TikTok's official Research API needs an application and is limited to approved academic work. This actor gives you the public search results by keyword as JSON, through the Apify API, with no approval.

**How do I search TikTok videos by keyword in bulk?** Add one keyword per line. Each keyword gets its own results up to **Max videos per keyword**, and each row names its `keyword`.

**Can I use this for TikTok keyword research?** Yes. Compare plays, likes and saves across the videos that rank for a keyword, or sort by most liked to see what has worked best. It shows the videos and their numbers, not a monthly search volume figure, because TikTok does not publish one here.

**Can I get only recent TikTok videos?** Yes. Set **Date posted** to the last 24 hours, week, month, 3 or 6 months, or set **Sort by** to newest. Filtered searches cost $0.0012 per video and can take 1 to 3 minutes.

**Why did I get fewer videos than I asked for?** TikTok limits how far a search goes, and filters narrow it further. The status message says when a search ended early or should be run again.

**Do I need a TikTok account?** No. The scraper only reads public search results.

**Is the video file included?** No. Cover images, the sound file and subtitle links are included.

### 🔗 Related Scrapers

- [TikTok Video Scraper](https://apify.com/piotrv1001/tiktok-video-scraper): the same fields for a list of video links.
- [TikTok Profile Videos Scraper](https://apify.com/piotrv1001/tiktok-profile-videos-scraper): every public video of a profile.
- [TikTok Sound Scraper](https://apify.com/piotrv1001/tiktok-sound-scraper): the videos that use a sound.
- [TikTok Video Transcript Scraper](https://apify.com/piotrv1001/tiktok-video-transcript-scraper): the spoken text of TikTok videos.

# Actor input Schema

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

What to search TikTok for, one keyword or phrase per line. Each keyword gets its own results up to Max videos per keyword.

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

Order of the results. Relevance is TikTok's own order, at the standard $0.0005 per video. Most liked or Newest costs $0.0012 per video for every keyword in the run, and can take 1 to 3 minutes.

## `publishTime` (type: `string`):

Only videos posted within this period. Any time is the standard $0.0005 per video. Any other period costs $0.0012 per video for every keyword in the run, can take 1 to 3 minutes, and narrow periods often return few videos.

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

Stop each keyword after this many videos. TikTok usually returns about 60 to 240 videos per keyword; the status message says when a search ended sooner.

## Actor input object example

```json
{
  "keywords": [
    "nike shoes",
    "protein pancakes"
  ],
  "sortBy": "relevance",
  "publishTime": "any",
  "maxItems": 50
}
```

# Actor output Schema

## `results` (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": [
        "nike shoes"
    ],
    "sortBy": "relevance",
    "publishTime": "any",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/tiktok-search-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 = {
    "keywords": ["nike shoes"],
    "sortBy": "relevance",
    "publishTime": "any",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/tiktok-search-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 '{
  "keywords": [
    "nike shoes"
  ],
  "sortBy": "relevance",
  "publishTime": "any",
  "maxItems": 50
}' |
apify call piotrv1001/tiktok-search-scraper --silent --output-dataset

```

## MCP server setup

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