# Douyin Search Scraper & Video Downloader (`plutonus/douyin-scraper`) Actor

Free beta — Search public Douyin (抖音) results by keyword, export creator and engagement data, and optionally download MP4 files for eligible videos. No Douyin login or cookies required. Normal Apify usage costs apply.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 & Video Downloader

Search publicly accessible Douyin (抖音) results with one keyword and export item metadata. Metadata-only is the default; you can also request MP4 files for eligible videos found in the search. You don't need to provide a Douyin account, export cookies, or use QR login.

**Free beta — no extra charge from us. You only pay your normal Apify usage, storage, and transfer costs.**

### How to use it

1. Enter one `keyword` (1–128 characters, without spaces at the beginning or end).
2. Leave `media_max_items` empty for metadata only. To request MP4 files, set it to an integer from 1 to 2000.
3. Run the Actor. Open its Dataset for results and `OUTPUT` for a short run summary.

For example, this input requests metadata for one search:

```json
{
  "keyword": "街头美食"
}
```

To request MP4 files too, add `"media_max_items": 5`. That number is a maximum request, not a promise of five files. The accepted maximum, 2000, does not mean the search will find or deliver 2000 results or videos.

### For AI agents and API users

Use Actor Store identifier `plutonus/douyin-scraper`. Start a metadata-only run with `{"keyword":"街头美食"}` or request media with `{"keyword":"咖啡","media_max_items":5}`. The requested media count is a maximum, not a delivery guarantee.

Runs are long-running and can exceed 5 minutes. Start the run asynchronously, then poll for completion or use a completion webhook before reading the default Dataset. When requested media is available, MP4 files are stored in the initiating run's default key-value store, as described below.

### What you get

The Dataset contains one row per usable public item found, with its Douyin item ID, public URL and type. Available details can include a caption, creation time, public creator name or handle, verification information, engagement counts, hashtags and video dimensions. Some fields may be absent.

An illustrative row with synthetic values (optional fields vary):

```json
{
  "keyword": "街头美食",
  "awemeId": "1234567890123456789",
  "publicUrl": "https://www.douyin.com/video/1234567890123456789",
  "itemType": "VIDEO",
  "caption": "A quick noodle lunch",
  "authorNickname": "Sample Kitchen",
  "likeCount": 42,
  "commentCount": 3
}
```

With media enabled, available MP4 files appear in the initiating run's default key-value store as `MEDIA_<aweme_id>.mp4`. The `MEDIA_MANIFEST` record lists selected videos and shows which files were delivered or unavailable; `OUTPUT` summarizes those counts. Files follow that store's retention settings. This Actor does not provide a permanent media library.

MP4 downloads are attempted only for eligible video results found in the search. Other item types and unavailable videos do not produce MP4 files, so you may receive fewer files than requested while still receiving metadata.

### Costs and beta limits

Requesting media can increase run time, transfer, storage, and your Apify costs.

Search coverage and result counts are not guaranteed. The Actor does not independently verify relevance or latest ordering. Beta capacity can sometimes be unavailable. There is no production reliability or SLA promise.

### Responsible use

Publicly visible creator information, including names or handles, identifiers such as `authorSecUid`, verification status and public counters, can still be personal data. You are responsible for how you use the output and for complying with applicable laws and regulations, including privacy and data-protection obligations where relevant, and Douyin's applicable terms and policies.

A downloadable MP4 does not grant rights to reuse or republish it. You are responsible for copyright and other applicable rights when storing, redistributing or republishing media.

This is an independent, unofficial tool. It is not affiliated with, sponsored by, endorsed by or operated by Douyin or ByteDance. Their names and trademarks are used only to identify the supported platform.

# Actor input Schema

## `keyword` (type: `string`):

One Douyin search keyword (1–128 Unicode characters, without leading or trailing whitespace).

## `media_max_items` (type: `integer`):

Optional. Request up to this many MP4s from eligible videos found by the keyword search. Fewer may be available or delivered; this does not set or guarantee the number of search results. Downloads can increase run time and Apify usage, storage, and transfer costs. Leave empty for metadata only.

## Actor input object example

```json
{
  "keyword": "街头美食"
}
```

# Actor output Schema

## `items` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `mediaManifest` (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 = {
    "keyword": "街头美食"
};

// Run the Actor and wait for it to finish
const run = await client.actor("plutonus/douyin-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 = { "keyword": "街头美食" }

# Run the Actor and wait for it to finish
run = client.actor("plutonus/douyin-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 '{
  "keyword": "街头美食"
}' |
apify call plutonus/douyin-scraper --silent --output-dataset

```

## MCP server setup

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