# Douyin Search Scraper 抖音 — Videos by Keyword, No Login (`zinin/douyin-search-scraper`) Actor

Search Douyin (抖音) by keyword without login: top videos with likes, comments, shares, saves, author, hashtags, music, cover and video link. About 15-30 videos per keyword. Pay per video, no start fee.

- **URL**: https://apify.com/zinin/douyin-search-scraper.md
- **Developed by:** [Tim Zinin](https://apify.com/zinin) (community)
- **Categories:** Social media, Videos, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.14 / 1,000 result delivereds

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

## Douyin Search Scraper 抖音 — videos by keyword, no login

Search [Douyin](https://www.douyin.com) (抖音, the Chinese TikTok) by keyword and get the videos Douyin shows for it: description, likes, comments, shares, saves, publish time, author, hashtags, music, cover and a direct video link. Type keywords and run. No login, no cookies, no QR code, no proxy setup.

- **Pay per video.** No start fee. Keywords without videos and unanswered keywords are free.
- **About 15–30 videos per keyword.** See "How many videos per keyword" below: this is an honest limit of signed-out search, stated up front.
- **Only real matches are charged.** A video is delivered only when your keyword is in its own text (description, hashtags, author or music). Douyin's unrelated substitutes for a keyword it has nothing for are dropped, and the keyword gets a free status row.
- **One video = one row, charged once.** The same video found by two keywords or two screens is delivered and charged one time.
- **Videos and image posts.** Slideshow posts (图文) come with their image links.
- **Fast.** A keyword takes about 15 seconds; 100 keywords in about 25 minutes.

Typical uses: trend and topic monitoring in China, finding creators (KOL / 达人) who post about a product or niche, brand and competitor mentions, fresh content for a keyword every day, feeding Douyin search results to an AI agent or a sheet.

### What you get

| Field | Example |
|---|---|
| `keyword`, `position` | `咖啡`, `3` — your keyword and the order of delivery for it |
| `videoId`, `url` | `7407722767006600463`, `https://www.douyin.com/video/7407722767006600463` |
| `postType` | `video` or `images` (slideshow post) |
| `description` | `喝咖啡会有什么功效？喝咖啡时应该注意什么？ #咖啡` |
| `hashtags` | `["咖啡", "黑咖啡"]` |
| `createdAt` | `2024-08-27T07:47:47.000Z` |
| `durationSeconds` | `135.1` (videos only) |
| `likes`, `comments`, `shares`, `saves` | `123`, `23`, `11`, `20` |
| `author` | `nickname`, `douyinId` (抖音号), `secUid`, `userId`, `bio`, `verified`, `verificationLabel`, `avatar`, `profileUrl` |
| `music` | `id`, `title`, `author`, `durationSeconds` |
| `videoUrl` | Direct link to the video file (videos only; the link is signed by Douyin and expires in about a day) |
| `coverUrl`, `width`, `height` | Cover image and frame size |
| `imageUrls` | Image links of a slideshow post |
| `region`, `shareUrl` | Region code of the post and its permanent share link |
| `found`, `source`, `scrapedAt` | Row type, data source and time stamp |

Not included, because Douyin does not give it to a signed-out visitor in search: play (view) counts and the author's follower count (`author.followers` is `null`). To get followers, likes and post counts of the authors, pass `author.profileUrl` to [Douyin Profile Scraper](https://apify.com/zinin/douyin-profile-scraper).

### Input

```json
{
  "keywords": ["咖啡", "露营", "iphone"],
  "maxResultsPerKeyword": 20,
  "publishTime": "any"
}
```

| Parameter | Type | Default | Description |
|---|---|---|---|
| `keywords` | string\[] | required | Up to 200 keywords per run. Duplicates are removed. |
| `maxResultsPerKeyword` | integer | `20` | 1–40. Up to 7 reads one screen; more reads up to six screens of the same keyword. |
| `publishTime` | string | `any` | `any`, `day`, `week` or `half_year` — the date filter of the search page. |
| `maxItems` | integer | `8000` | Stop after this many paid video rows in the whole run. |

### How many videos per keyword

Douyin shows a visitor who is not logged in only the first screen of a search: 6–9 videos. Scrolling further asks for a login or a verification, and this Actor does not log in, does not use anyone's cookies and does not solve verifications.

To give more than one screen, the Actor reads the same keyword through the filters of the search page (any time, last day, last week, last half year, most liked, latest). Each filter returns its own first screen; merged and deduplicated they give **about 15–30 different videos per keyword** (18–32 in our test runs on ten keywords; fewer for long, narrow phrases). With `publishTime` set, three screens are read and a keyword gives about 10–20 videos.

If you need hundreds of videos per keyword, this Actor is not the right tool. If you need the top and the freshest videos for many keywords, cheaply and without accounts, it is.

Douyin search is fuzzy: for a keyword it has nothing for, it shows popular unrelated videos. The Actor keeps a video only when the keyword is in the video's own text — the description, hashtags, author name or bio, or music title (for a phrase with spaces, every word must be there). Everything else is dropped and not charged; a keyword with no real match gets a free `no_results` row. Write keywords the way creators write them: `新能源汽车` matches fewer videos than `新能源`.

### Output example

```json
{
  "found": true,
  "keyword": "咖啡",
  "position": 4,
  "videoId": "7407722767006600463",
  "url": "https://www.douyin.com/video/7407722767006600463",
  "postType": "video",
  "description": "喝咖啡会有什么功效？喝咖啡时应该注意什么？ #咖啡",
  "hashtags": ["咖啡"],
  "createdAt": "2024-08-27T07:47:47.000Z",
  "durationSeconds": 135.1,
  "likes": 123,
  "comments": 23,
  "shares": 11,
  "saves": 20,
  "author": {
    "secUid": "MS4wLjABAAAA…",
    "userId": "…",
    "nickname": "没想好要叫啥名字",
    "douyinId": "…",
    "bio": "…",
    "followers": null,
    "verified": false,
    "verificationLabel": null,
    "avatar": "https://p3.douyinpic.com/…",
    "profileUrl": "https://www.douyin.com/user/MS4wLjABAAAA…"
  },
  "music": { "id": "…", "title": "…", "author": "…", "durationSeconds": 135 },
  "videoUrl": "https://…douyinvod.com/…",
  "coverUrl": "https://p3-sign.douyinpic.com/…",
  "width": 1080,
  "height": 1920,
  "imageUrls": [],
  "region": "CN",
  "shareUrl": "https://www.iesdouyin.com/share/video/7407722767006600463/",
  "source": "Douyin search page (so.douyin.com), signed-out visitor",
  "scrapedAt": "2026-11-20T18:00:00.000Z"
}
```

Free status row (not charged):

```json
{ "found": false, "keyword": "…", "status": "source_unavailable", "message": "Douyin did not answer for this keyword (…). Not charged; run it again later.", "source": "…", "scrapedAt": "…" }
```

`status` is `no_results` (Douyin showed no videos with the keyword in their text), `source_unavailable` (no answer after three attempts through different exits) or `invalid_keyword` (the keyword is longer than 100 characters; it is skipped and the other keywords are searched).

### Pricing

Pay per event: one `result-found` event for every delivered video row. There is no start fee and no charge for status rows. The current price is on the Pricing tab. Platform usage is small: a keyword is 4–7 page requests.

Set a maximum cost per run in the run options if you want a hard cap: the Actor checks the remaining budget before every video and stops when it is spent, keeping everything already delivered.

### Reliability

- Every keyword is read by a fresh visitor through Apify Proxy, which is built in; a refused request is repeated through another exit.
- Progress is saved after every video. If the platform restarts the run, delivered videos are not delivered or charged again.
- Likes, comments, shares and saves are the numbers Douyin shows at the moment of the run.

### FAQ

**Do I need a Douyin account, cookies or a Chinese phone number?** No. The Actor reads what Douyin shows a signed-out visitor.

**Why did a keyword give only a few videos?** Long phrases are rarely written word for word in a video's text, and only exact matches are delivered. Use the short form of the keyword.

**Can I get more than 40 videos per keyword?** Not from one keyword. Use several related keywords (for example `咖啡`, `黑咖啡`, `咖啡推荐`): videos are deduplicated across keywords and charged once.

**Can I sort by likes or date?** The Actor merges the relevance, most-liked and latest screens; sort the dataset by `likes` or `createdAt` after the run.

**Can I download the video files?** Each video row has a direct `videoUrl`. Download it soon after the run: Douyin signs the link for about a day.

**Is it legal?** The Actor collects only what Douyin shows publicly to visitors without login. Results include creators' public profile data; you are responsible for using it under the laws that apply to you (GDPR, CCPA, PIPL) and Douyin's terms.

### Related Actors

- [Douyin Profile Scraper](https://apify.com/zinin/douyin-profile-scraper) — followers, likes and post counts of creators by profile link.
- [Douyin / Xiaohongshu / Weibo Analytics Report Builder](https://apify.com/zinin/douyin-xiaohongshu-weibo-analytics-report-builder) — turns an exported dataset into an analytics report.

### Run time limit

When the run's time limit is close, the Actor stops by itself shortly before it and finishes normally: everything delivered stays, and the status message says how many videos were delivered. Raise the run timeout for a big job, or resurrect the run — it continues from that point without charging the delivered videos again.

# Changelog

This Actor's version history is a separate document: https://apify.com/zinin/douyin-search-scraper/changelog.md

# Actor input Schema

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

One keyword or phrase per line, up to 200 per run. Chinese keywords give the best results (美食, 咖啡, 露营); Latin words and brand names work too. Duplicates are removed.

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

Douyin shows a signed-out visitor only the first screen of a search (6-9 videos). For larger limits the Actor also reads the same keyword with the date and sort filters of the search page and merges the screens, which gives about 15-30 different videos per keyword. 40 is the upper limit; a keyword usually ends earlier. Only videos with the keyword in their own text are delivered and charged.

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

Keep the date filter of the search page on for every screen. With a filter the Actor reads three screens (relevance, most liked, latest), about 10-20 videos per keyword.

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

Stop the run after this many paid video rows in total. Free status rows do not count.

## Actor input object example

```json
{
  "keywords": [
    "咖啡"
  ],
  "maxResultsPerKeyword": 20,
  "publishTime": "any",
  "maxItems": 8000
}
```

# Actor output Schema

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

API URL of the run's default dataset items.

# 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": [
        "咖啡"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zinin/douyin-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": ["咖啡"] }

# Run the Actor and wait for it to finish
run = client.actor("zinin/douyin-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": [
    "咖啡"
  ]
}' |
apify call zinin/douyin-search-scraper --silent --output-dataset

```

## MCP server setup

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