# TikTok Search Scraper — Videos by Keyword (`endspec/tiktok-instant-search-scraper`) Actor

Search TikTok videos by keyword and pull results in seconds. Returns video URL, author, view count, likes, music, and download link. Fast, reliable TikTok scraper for content research, trend analysis, and influencer discovery. Pay only per result returned.

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

## Pricing

from $80.00 / 1,000 video returneds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

Search TikTok videos by keyword instantly. Returns full video metadata with watermark-free download URLs.

**Fast. Reliable. Bulk-ready.**

---

### Simple Input-Output Example

#### Input:
```json
{
  "keywords": ["cooking"],
  "maxResultsPerKeyword": 20,
  "region": "US"
}
````

#### Output (one dataset item per video):

```json
{
  "searchKeyword": "cooking",
  "videoId": "7639813342944660758",
  "url": "https://www.tiktok.com/@kyfitjourney/video/v24044gl0000d83131nog65lo0ief5f0",
  "title": "BBQ Chicken Burgers Will Always Be A 10/10 Dinner Request",
  "author": { "uniqueId": "kyfitjourney", "nickname": "KYRA | EASY RECIPES" },
  "playCount": 733026,
  "diggCount": 63687,
  "videoUrl": "https://v19.tiktokcdn-eu.com/.../play.mp4",
  "createdAt": "2026-05-15T08:17:44.000Z"
}
```

**Important Notes:**

- Pagination is automatic — set `maxResultsPerKeyword` to 1–200 (default 20)
- Multiple keywords supported — each is searched independently, results are aggregated
- Returns watermark-free video URLs (`videoUrl`) and watermarked URLs (`videoUrlWithWatermark`)
- Includes full music metadata (title, artist, duration, cover) when present
- Returns success even if a keyword has no results (an error row is only pushed on actual API failures)
- If the upstream API rate-limits us, you will **not** be charged for the affected keyword
- Contact for any issue / enquiry: contact@endspec.net

***

### Full Actor Documentation

#### TikTok Search Scraper — Videos by Keyword

**Search TikTok videos by any keyword and get back full metadata.** Ideal for trend research, content discovery, influencer outreach prep, and competitive content analysis.

***

#### Overview

The TikTok Search Scraper is an Apify Actor that searches TikTok by keyword and returns full video metadata for each match. Whether you're tracking a trend, researching content for a marketing campaign, monitoring a competitor's content output, or building a dataset of creator content, this actor gives you clean, structured data fast.

##### What You Can Do

- **Search by Keyword** — one or many keywords per run; results are aggregated per keyword
- **Get Watermark-Free Videos** — direct CDN URLs for both watermarked and clean video downloads
- **Full Metadata** — title, description, author, play count, likes, comments, shares, music, cover images
- **Regional Localization** — set a country code (US, GB, DE, etc.) to localize results
- **Bulk-Ready** — paginates automatically up to 200 results per keyword

##### Data Availability

**All data returned by this actor is publicly available information from TikTok's search interface.** No private videos, no logged-in-only fields. The actor returns what any public TikTok user could see by searching the same keywords on the site.

***

#### Actor Input Parameters

The actor accepts the following input parameters:

**keywords** (required)
• Type: array of strings
• Description: One or more keywords to search TikTok for. Each keyword is searched independently and results are aggregated into the dataset.
• Example: `["cooking", "baking"]`

**maxResultsPerKeyword** (optional)
• Type: integer
• Default: 20
• Range: 1–200
• Description: Maximum number of videos to return for each keyword. The actor paginates the underlying API automatically.

**region** (optional)
• Type: string
• Default: `"US"`
• Description: Two-letter country code (e.g. US, GB, DE) used to localize search results.

***

#### Input Examples

##### Example 1: Single Keyword

```json
{
  "keywords": ["cooking"],
  "maxResultsPerKeyword": 20
}
```

##### Example 2: Multiple Keywords, Larger Batch

```json
{
  "keywords": ["recipes", "baking", "meal prep"],
  "maxResultsPerKeyword": 50,
  "region": "US"
}
```

##### Example 3: Trend Research in a Specific Country

```json
{
  "keywords": ["fashion 2026", "outfit ideas"],
  "maxResultsPerKeyword": 100,
  "region": "GB"
}
```

***

#### Output Schema

Each video is pushed as one dataset item. Field summary:

| Field | Type | Description |
|---|---|---|
| `searchKeyword` | string | The keyword that surfaced this video |
| `videoId` | string | TikTok internal video id |
| `awemeId` | string | TikTok aweme id (used in some URLs) |
| `url` | string | Canonical TikTok video URL |
| `title` | string | Video caption/title |
| `description` | string | Full content description (multi-line if applicable) |
| `region` | string | Country/region of the video |
| `durationSeconds` | integer | Video duration in seconds |
| `createdAt` | ISO 8601 string | When the video was published |
| `author.id` | string | TikTok user id |
| `author.uniqueId` | string | TikTok username (e.g., `kyfitjourney`) |
| `author.nickname` | string | Display name |
| `author.avatar` | string | Profile picture URL |
| `playCount` | integer | View count |
| `diggCount` | integer | Like count |
| `commentCount` | integer | Comment count |
| `shareCount` | integer | Share count |
| `downloadCount` | integer | Download count |
| `cover` | string | Static cover image URL |
| `coverDynamic` | string | Animated cover URL |
| `videoUrl` | string | Watermark-free video download URL |
| `videoUrlWithWatermark` | string | TikTok-watermarked video URL |
| `sizeBytes` | integer | Video file size in bytes |
| `music.title` | string | Music track title |
| `music.author` | string | Music artist |
| `music.url` | string | Music audio URL |
| `isAd` | boolean | Whether this video is a paid ad |
| `scrapedAt` | ISO 8601 string | When this row was extracted |

***

#### Output Examples

```json
{
  "searchKeyword": "cooking",
  "videoId": "7639813342944660758",
  "url": "https://www.tiktok.com/@kyfitjourney/video/v24044gl0000d83131nog65lo0ief5f0",
  "title": "BBQ Chicken Burgers...",
  "description": "BBQ Chicken Burgers Will Always Be A 10/10 Dinner Request...",
  "author": {
    "id": "7326165710991377440",
    "uniqueId": "kyfitjourney",
    "nickname": "KYRA | EASY RECIPES",
    "avatar": "https://..."
  },
  "durationSeconds": 60,
  "createdAt": "2026-05-15T08:17:44.000Z",
  "playCount": 733026,
  "diggCount": 63687,
  "commentCount": 160,
  "shareCount": 2399,
  "videoUrl": "https://v19.tiktokcdn-eu.com/.../play.mp4",
  "music": { "title": "Never Lose Me", "author": "Flo Milli" },
  "isAd": false
}
```

***

#### Use Cases

##### Trend Research

- Track keyword performance over time
- Discover top creators in any niche
- Monitor emerging hashtags and topics

##### Influencer Outreach

- Build creator lists by topic/keyword
- Surface high-engagement videos for collaboration ideas
- Get author details for direct messaging research

##### Competitive Content Analysis

- Track competitor's content cadence and engagement
- Benchmark video metrics against your own content
- Find underused keywords with high engagement

##### Content Repurposing

- Source watermark-free TikTok content for analysis
- Build training data for video understanding models
- Aggregate creator content for compilations

***

#### Pricing

This actor uses **pay-per-result** pricing. You pay only for videos actually returned to your dataset — failed keywords (rate limits, API errors) are not charged.

***

#### Support

For support and questions:

- **Email**: contact@endspec.net
- **Apify**: Report issues through the Apify platform

If you need related TikTok data (user info, hashtag analytics, comment scraping, music search), reach out — we can build it.

***

#### Changelog

**Version 1.0.0**

- Initial release
- Multi-keyword batch search
- Automatic pagination up to 200 results per keyword
- Full video + author + music metadata
- Watermark-free video URLs
- Regional localization

# Actor input Schema

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

One or more keywords to search TikTok for. Each keyword is searched independently and results are aggregated. Example: \["cooking", "baking"]

## `maxResultsPerKeyword` (type: `integer`):

Maximum number of videos to return for each keyword. The actor paginates automatically. 1-200.

## `region` (type: `string`):

Two-letter country code (e.g. US, GB, DE) used to localize results. Default: US.

## Actor input object example

```json
{
  "keywords": [
    "cooking"
  ],
  "maxResultsPerKeyword": 20,
  "region": "US"
}
```

# Actor output Schema

## `dataset` (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": [
        "cooking"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("endspec/tiktok-instant-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": ["cooking"] }

# Run the Actor and wait for it to finish
run = client.actor("endspec/tiktok-instant-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "cooking"
  ]
}' |
apify call endspec/tiktok-instant-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=endspec/tiktok-instant-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok Search Scraper — Videos by Keyword",
        "description": "Search TikTok videos by keyword and pull results in seconds. Returns video URL, author, view count, likes, music, and download link. Fast, reliable TikTok scraper for content research, trend analysis, and influencer discovery. Pay only per result returned.",
        "version": "1.0",
        "x-build-id": "CzAdSuARFHNp5fuKk"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/endspec~tiktok-instant-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-endspec-tiktok-instant-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/endspec~tiktok-instant-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-endspec-tiktok-instant-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/endspec~tiktok-instant-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-endspec-tiktok-instant-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keywords"
                ],
                "properties": {
                    "keywords": {
                        "title": "Search Keywords",
                        "minItems": 1,
                        "type": "array",
                        "description": "One or more keywords to search TikTok for. Each keyword is searched independently and results are aggregated. Example: [\"cooking\", \"baking\"]",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResultsPerKeyword": {
                        "title": "Max Results Per Keyword",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of videos to return for each keyword. The actor paginates automatically. 1-200.",
                        "default": 20
                    },
                    "region": {
                        "title": "Region",
                        "type": "string",
                        "description": "Two-letter country code (e.g. US, GB, DE) used to localize results. Default: US.",
                        "default": "US"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
