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

Search TikTok by keyword and get the matching videos or accounts, ranked as TikTok shows them: views, likes, captions, hashtags, creators and follower counts. Real-time API, date filter, no login.

- **URL**: https://apify.com/automly/tiktok-search-scraper.md
- **Developed by:** [Automly](https://apify.com/automly) (community)
- **Categories:** Social media
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 videos

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

### What is TikTok Search Scraper?

**TikTok Search Scraper** is a tool that lets you **search TikTok by keyword and scrape the results**: the videos or accounts TikTok shows for your search, in the same order, with views, likes, comments, shares, captions, hashtags, sounds, creators and follower counts. Type your keywords, click **Start**, and download the results as Excel, CSV or JSON.

- 🚀 **Speed:** about 4,400 results per minute (1,248 videos for 10 keywords in 17 seconds in our test)
- 🔎 **Keywords:** search as many keywords as you like in one run
- 🏆 **Ranking:** every result has its position in TikTok's search results
- 🎬 **Videos or accounts:** search for videos, or for creators and brands
- 🔓 **No login:** no TikTok account, cookies or API key needed

### What can TikTok Search Scraper do?

- Scrape the **videos** TikTok shows for any keyword, with their stats and creator
- Find **TikTok accounts** that match a keyword, with followers, likes and bio
- See each result's **rank** for its keyword, to track what ranks for a search
- Keep only videos **posted after a date you choose**
- Get results in seconds over the **real-time API**, without starting a run
- Export to Excel, CSV, JSON, HTML or XML, or send them to Google Sheets, Make, Zapier and more

### What data can you extract from TikTok search?

| | | |
|---|---|---|
| 🔎 Keyword and rank | 🎬 Video URL and ID | 💬 Caption |
| 👁️ Views | ❤️ Likes | 💬 Comments |
| 🔁 Shares and saves | #️⃣ Hashtags and mentions | 🎵 Sound title and author |
| 📅 Post date | ⏱️ Video length | 🖼️ Cover image |
| 👤 Creator username and name | ✅ Verified badge | 👥 Followers (accounts) |
| 📝 Bio (accounts) | ❤️ Total likes (accounts) | 🌐 Caption language |

### How to scrape TikTok search results

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **TikTok Search Scraper**.
3. Type one or more **search keywords**.
4. Choose **Videos** or **Users** and how many results you want per keyword, then click **Start**.
5. When the run finishes, download your results as Excel, CSV, JSON, HTML or XML.

### ⬇️ Input

| Setting | What it does |
|---|---|
| Search keywords | What to search for, one keyword or phrase per line |
| Search for | Videos (default) or Users (accounts) |
| Max results per keyword | How many results to get for each keyword (default 100) |
| Videos published after | Only videos posted on or after this date (videos only) |
| Language | Language for the results (default English) |

Example: the top videos for two keywords.

```json
{
  "searchQueries": ["pasta recipe", "home workout"],
  "searchType": "videos",
  "maxResultsPerQuery": 100
}
```

Example: accounts that match a keyword.

```json
{
  "searchQueries": ["cooking"],
  "searchType": "users",
  "maxResultsPerQuery": 50
}
```

### ⬆️ Output

You get one row per video or account, with `searchQuery` (the keyword) and `rank` (its position for that keyword, starting at 1). You can view the results as a table in Apify Console or download them as Excel, CSV, JSON, HTML or XML.

A video result:

```json
{
  "type": "video",
  "searchQuery": "pasta recipe",
  "rank": 1,
  "id": "7572688274054057229",
  "url": "https://www.tiktok.com/@essen.recipes.official/video/7572688274054057229",
  "text": "Simple One Pot Ground Beef Pasta Recipe! Perfect for Weekends #easyrecipe #pasta #homecooking #groundbeef #onepotmeals",
  "createdAt": "2025-11-14T20:58:16Z",
  "authorUsername": "essen.recipes.official",
  "authorNickname": "Essen Recipes",
  "authorId": "6797225747200181254",
  "authorVerified": false,
  "authorFollowers": 25300,
  "views": 93500,
  "likes": 499,
  "comments": 18,
  "shares": 118,
  "saves": 363,
  "reposts": 0,
  "hashtags": ["easyrecipe", "pasta", "homecooking", "groundbeef", "onepotmeals", "EasyRecipe"],
  "mentions": [],
  "durationSeconds": 305,
  "coverUrl": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-p-0068-tx/...",
  "isSlideshow": false,
  "slideshowImages": [],
  "soundId": "7572688383848286990",
  "soundTitle": "original sound - Essen Recipes",
  "soundAuthor": "Essen Recipes",
  "soundOriginal": true,
  "isAd": false,
  "isPinned": false,
  "language": "en",
  "location": null,
  "isAiGenerated": false,
  "source": "pasta recipe",
  "fetchedAt": "2026-09-24T18:42:42Z"
}
```

An account result:

```json
{
  "type": "user",
  "searchQuery": "cooking",
  "rank": 1,
  "username": "albert_cancook",
  "url": "https://www.tiktok.com/@albert_cancook",
  "nickname": "albert_cancook",
  "id": "6852492533143553030",
  "secUid": "MS4wLjABAAAAnqldz4-SCawaplNco7viSM7C2jA2JNbgBZgeD5_uM2B5YnWrIEDp0Phem-E10BdY",
  "bio": "📍LA, 🇺🇸\n\niamalbertcancook@gmail.com\n\nYT 29M / FB 4M / IG 3.5M",
  "bioLink": null,
  "verified": true,
  "privateAccount": false,
  "followers": 15800000,
  "following": null,
  "likes": 435995056,
  "videos": null,
  "avatarUrl": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/...",
  "createdAt": null,
  "language": null,
  "isSeller": false,
  "source": "cooking",
  "fetchedAt": "2026-09-24T18:43:16Z"
}
```

Each run also saves a short report that lists how many keywords and results it covered, and any keyword it could not search with the reason.

### How can I use TikTok search data?

- **Trend research:** see which videos rank for a topic and what they have in common
- **SEO for TikTok:** track where your videos rank for the keywords you care about
- **Influencer discovery:** find creators and brands in your niche, with their follower counts
- **Competitor research:** see who wins the searches in your market
- **Content ideas and AI:** build datasets of captions, hashtags and sounds for a topic

### Real-time TikTok search API

Need results right away inside your app? Call the actor's API and get the results back in the response, without starting a run:

```
GET https://<your-actor-standby-url>/search?q=pasta%20recipe&type=videos&limit=50
GET https://<your-actor-standby-url>/search?q=cooking&type=users&limit=20
Authorization: Bearer <YOUR_APIFY_TOKEN>
```

You can also run the actor from your own code with the [Apify API](https://docs.apify.com/api/v2) or the Python and JavaScript clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("automly/tiktok-search-scraper").call(run_input={
    "searchQueries": ["pasta recipe"],
    "searchType": "videos",
    "maxResultsPerQuery": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["rank"], item["url"], item["views"])
```

### ❓FAQ

#### How much does it cost to scrape TikTok search results?

You pay only for the results you get, per 1,000 results. See the **Pricing** tab for the current price. Every Apify account gets $5 of free usage each month, so you can try it at no cost.

#### How many results can I get per keyword?

TikTok itself shows a limited number of results for each search. In our tests that was about 90 to 160 videos per keyword, and about 60 to 70 accounts. If you need more, add more specific keywords (for example "easy pasta recipe" and "creamy pasta recipe" as well as "pasta recipe"). Results are not repeated within a keyword.

#### Are the results the same as in the TikTok app?

They are the results TikTok shows to a visitor who is not logged in, in TikTok's own order. Results in the app are personalized, so yours may differ a little.

#### Can I get only recent videos?

Yes. Set **Videos published after** to a date. Older videos are skipped and don't count towards **Max results per keyword**. The `rank` stays the video's position in TikTok's full results, so skipped videos leave gaps. Because TikTok sorts search results by relevance, not by date, you may get fewer results with a date filter.

#### Do I need a TikTok account?

No. You don't need a TikTok account, cookies or an API key.

#### Can I scrape private accounts or videos?

No. Only public content shows up in search. Private accounts may appear in account search, but their videos cannot be scraped.

#### Is it legal to scrape TikTok search results?

This scraper only collects content that people chose to make public. It does not collect private data such as email addresses or phone numbers, though a public bio can contain them. Public data can still be personal data protected by laws such as GDPR, so only scrape it for a legitimate reason and ask a lawyer if you are unsure. You can read more in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

TikTok Search Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by TikTok.

#### Something isn't working. What should I do?

Open the **Issues** tab and tell us the keyword and what you expected. We usually reply within a day.

# Actor input Schema

## `searchQueries` (type: `array`):

What to search TikTok for, one keyword or phrase per line, just like typing in the TikTok search bar.

## `searchType` (type: `string`):

Whether to find videos or accounts that match your keywords.

## `maxResultsPerQuery` (type: `integer`):

How many results to get for each keyword. TikTok shows a limited number of results per search (see the README), so you may get fewer.

## `videosPublishedAfter` (type: `string`):

Only videos posted on or after this date, e.g. 2026-08-01 (UTC if no time zone). Older videos are skipped and don't count towards Max results; rank still shows the position in all results. Videos only.

## `language` (type: `string`):

Two-letter language code for the results (e.g. en, es, fr, de, ja).

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

Proxy settings. The default works for most runs.

## Actor input object example

```json
{
  "searchQueries": [
    "pasta recipe"
  ],
  "searchType": "videos",
  "maxResultsPerQuery": 100,
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `videos` (type: `string`):

No description

## `users` (type: `string`):

No description

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

No description

## `report` (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 = {
    "searchQueries": [
        "pasta recipe"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/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 = {
    "searchQueries": ["pasta recipe"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automly/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 '{
  "searchQueries": [
    "pasta recipe"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automly/tiktok-search-scraper --silent --output-dataset

```

## MCP server setup

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