# Douyin Scraper - Videos, Search & Trends, No Login (`cliqtomedia/douyin-scraper`) Actor

Get public Douyin (抖音) videos by keyword, creator profile, video link or the trending list: caption, likes, comments, shares, saves, date, hashtags, author and music. One Actor, four modes. No login.

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

## Pricing

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

Get public Douyin (抖音) videos by keyword, creator profile, video link or the trending list. Each video comes back as one clean row with caption, likes, comments, shares, saves, date, hashtags, author and music.

Use it to track Chinese short-video trends, brands and creators without a Douyin account. The smallest run is one keyword and 10 videos: it takes about one minute and costs about $0.10.

![Douyin Scraper: keywords, creator profiles and video links in, clean video rows out](https://api.apify.com/v2/key-value-stores/bWtldYRZIB8qvv3u7/records/hero.png)

### Table of contents

- [What it does](#what-it-does)
- [How it works](#how-it-works)
- [Quick start](#quick-start)
- [Use cases](#use-cases)
- [Input](#input)
- [Output](#output)
- [Pricing](#pricing)
- [Limits](#limits)
- [API, export and integrations](#api-export-and-integrations)
- [Troubleshooting](#troubleshooting)
- [FAQ](#faq)
- [Related Actors](#related-actors)
- [Support](#support)

### What it does

Douyin Scraper reads the public Douyin website, like a visitor who is not logged in. It has four modes in one Actor:

- **Search by keyword** — videos that Douyin shows for a word, with their position in the results.
- **Creator profile videos** — the latest public videos of a creator.
- **Video links** — one row for each video link, share link or video ID.
- **Trending (hot search)** — videos for the topics on Douyin's hot-search list, with the topic attached.

Every video is one row with the same fields, so you can mix modes in one table. When an input gives no videos, you get one status row that says why, with no video charge: `not_found` (deleted or private video, missing profile), `no_results` (nothing found) or `error` (Douyin failed). Nothing found is never shown as an error, and an error is never shown as "nothing found".

#### Good fit

- Watch which videos Douyin shows for your product, brand or topic words.
- Follow what competing creators or brand accounts post and how it performs.
- Get likes, comments, shares and saves for a list of video links you already have.
- See which topics and videos are hot on Douyin today.

### How it works

1. The Actor opens the public Douyin page for your input in a real browser, through Apify Proxy. It does not log in and does not use cookies.
2. It reads the same video lists the page loads: search results, the creator's video list, the video page or the hot-search list. It turns pages until it reaches `maxItems` or the end of the list.
3. It saves one row per video in the Dataset. A video found by two keywords is saved and charged once. The run summary with one line per keyword, profile or link goes to the `RUN_SUMMARY` record.

If Douyin shows a verification page (CAPTCHA), the Actor does not solve it. It starts a new browser session on another IP, at most twice per run. If Douyin still refuses, the run ends with an `error` and keeps every video it already saved.

### Quick start

1. Open the **Input** tab.
2. Keep **What to collect** (`mode`) on **Search by keyword**.
3. Keep the prefilled keyword `咖啡` (coffee) in `keywords`, or add your own words.
4. Keep **Max videos** (`maxItems`) at 10.
5. Click **Start**.
6. Open the **Output** tab and check the **Overview** table: `desc`, `likes`, `comments` and `author.nickname` for each video.

Expected result: about one minute later, 10 video rows for 咖啡, numbered by `searchPosition` 1 to 10.

### Use cases

| Buyer job | Input path | Output entity | Key fields | Next integration |
| --- | --- | --- | --- | --- |
| Topic and brand research | `mode: search`, `keywords` | Video in search results | `desc`, `likes`, `searchPosition`, `hashtags`, `author.nickname` | Export to Google Sheets or CSV |
| Creator tracking | `mode: user`, `urls` with profile links | Creator's latest videos | `createdAt`, `likes`, `comments`, `isPinned` | Scheduled run, compare tables |
| Stats for known videos | `mode: video`, `urls` with video links | One video per link | `likes`, `comments`, `shares`, `collects`, `status` | API call from your system |
| Trend watch | `mode: trending` | Video of a hot topic | `trend.word`, `trend.rank`, `desc`, `likes` | Daily schedule, dashboard |

### Input

#### Input fields

| Field | Plain name | Type | Required | Default / prefill | Allowed values | Effect | Example | Recommendation |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `mode` | What to collect | string | no | default and prefill `search` | `search`, `user`, `video`, `trending` | Chooses the mode | `"user"` | Pick the mode first; it decides which other field is used |
| `keywords` | Keywords | array of strings | in `search` mode | prefill `["咖啡"]`, no default | 1–20 words, any language | Words to search | `["咖啡", "露营"]` | Chinese words give the best results |
| `urls` | Links | array of strings | in `user` and `video` modes | none | 1–100 links | Profiles or videos to read | `["https://www.douyin.com/video/7699062276518677770"]` | See the formats below |
| `maxItems` | Max videos | integer | no | default and prefill 10 | 1–1000 | Videos per keyword, per profile, or for the whole trending list | `50` | Not used in `video` mode |

Accepted link formats:

- `user` mode: `https://www.douyin.com/user/MS4wLjABAAAA…` or the `sec_uid` itself.
- `video` mode: `https://www.douyin.com/video/<id>`, `https://v.douyin.com/<code>/` share links, the share text copied from the app (the Actor finds the link in it), or the numeric video ID.

Empty input means `search` mode with no keywords. Such a run stops at once with an "Invalid input" message and does not open Douyin. The same happens in `user` or `video` mode without links, or with a link that is not a Douyin profile or video. Repeated keywords and links are read once. Two different links to the same video give one row and a warning in the run summary.

#### Interacting settings

| When | Input A | Input B | Effective behavior | Example | Cost/result effect |
| --- | --- | --- | --- | --- | --- |
| Search with several keywords | `keywords` | `maxItems` | `maxItems` counts per keyword | 3 keywords, `maxItems` 50 | Up to 150 videos |
| Same video for two keywords | `keywords` | — | Saved and charged once, under the first keyword | 咖啡 and 咖啡☕ | Fewer rows than keywords × `maxItems` |
| Creator mode | `urls` | `maxItems` | Douyin shows about 19 videos per profile without login | `maxItems` 50 | About 19 videos, note `LOGIN_LIMIT` |
| Video mode | `urls` | `maxItems` | `maxItems` is ignored, one row per link | 5 links | 5 rows |
| Trending mode | — | `maxItems` | `maxItems` counts for the whole list; `keywords` and `urls` are ignored | `maxItems` 30 | 30 videos across hot topics |
| Any mode | your run cost limit | — | The Actor stops before it would go over your limit | limit $0.20 | Run ends `SUCCEEDED`, reason `CHARGE_LIMIT` |

#### Input examples

##### Search by keyword

```json
{
  "mode": "search",
  "keywords": ["咖啡"],
  "maxItems": 10
}
```

Expected behavior: the Actor searches 咖啡 on Douyin and saves the first 10 videos.
Expected output: 10 rows with `searchPosition` 1–10, `desc`, `likes`, `comments`, `author`.
Limit or cost note: about one minute, about $0.10 on the Free plan price.

##### Creator profile videos

```json
{
  "mode": "user",
  "urls": ["https://www.douyin.com/user/MS4wLjABAAAAsfwGtL5CZnIafzOeiBhsndi_W3TxKFORn2vbJh0zr3E"],
  "maxItems": 20
}
```

Expected behavior: the Actor reads the creator's latest public videos, pinned videos first.
Expected output: about 19 rows with `createdAt`, `likes`, `isPinned`, `author.followers`.
Limit or cost note: Douyin shows only about the first 19–20 videos of a profile without login.

##### Video links

```json
{
  "mode": "video",
  "urls": [
    "https://www.douyin.com/video/7699062276518677770",
    "https://v.douyin.com/AbCdEfG/"
  ]
}
```

Expected behavior: one row per link. A deleted or private video gets a `not_found` row with no video charge.

##### Trending

```json
{
  "mode": "trending",
  "maxItems": 30
}
```

Expected behavior: the Actor reads the hot-search list and collects videos topic by topic, from the top.
Expected output: 30 rows, each with `trend.word` and `trend.rank`.

### Output

Results go to the default **Dataset**, one row per video. The **Overview** view shows the main columns. The full run summary is in the key-value store record `RUN_SUMMARY`.

#### Output fields

| Field | Meaning | Type | Can be empty? | Example / enum | Source / notes |
| --- | --- | --- | --- | --- | --- |
| `videoId` | Douyin video ID | string | only on some status rows | `7686495232195847857` | |
| `url` | Video link | string | on some status rows | `https://www.douyin.com/video/7686495232195847857` | |
| `contentType` | Video or photo post | `video`, `images` | on status rows | `video` | Photo posts (图文) are videos in Douyin lists |
| `desc` | Caption with hashtags | string | yes | `一次讲清楚14种咖啡…` | |
| `createdAt` | Publish time, UTC | ISO 8601 string | yes | `2026-09-17T13:42:19.000Z` | |
| `likes` | Likes | integer | yes | `1222` | |
| `comments` | Comments | integer | yes | `29` | |
| `shares` | Shares | integer | yes | `418` | |
| `collects` | Saves (收藏) | integer | yes | `1045` | |
| `plays` | Views | always `null` | always | `null` | Douyin's website does not show view counts. The Actor writes `null`, never a fake `0` |
| `durationSec` | Video length in seconds | number | yes; `null` for photo posts | `657.4` | |
| `imageCount` | Number of photos | integer | yes; `null` for videos | `6` | |
| `hashtags` | Hashtags without `#` | array of strings | empty array when none | `["咖啡", "商业"]` | |
| `isPinned` | Pinned on the profile | boolean | `null` outside `user` mode | `true` | Only a profile list says which videos are pinned |
| `author` | Creator | object | yes | `{uid, secUid, nickname, uniqueId, followers, verified, verifiedReason, url}` | `followers` is `null` in search and trending: Douyin does not send it there. `uniqueId` is `null` in `user` mode |
| `music` | Sound | object | yes | `{id, title, author, isOriginal}` | |
| `coverUrl` | Cover image | string | yes | `https://p3-sign.douyinpic.com/…` | Signed link, works for a limited time |
| `mode` | Mode of the run | string | no | `search` | |
| `input` | Keyword or link this row came from | string | no | `咖啡` | `trending` in trending mode |
| `searchPosition` | Position in the results | integer | `null` in `user` and `video` modes | `1` | Search and trending |
| `trend` | Hot topic | object | `null` outside trending | `{word, rank, hotValue}` | `rank` and `hotValue` can be `null` for the pinned top topic |
| `status` | Row status | `ok`, `not_found`, `no_results`, `error` | no | `ok` | |
| `error` | Why there is no video | string | `null` on `ok` rows | `Video not found…` | |
| `source` | Douyin site the row came from | string | no | `so.douyin.com` | Search uses `so.douyin.com`, other modes `www.douyin.com` |
| `fetchedAt` | When the row was collected | ISO 8601 string | no | `2026-10-26T14:15:49.634Z` | |

`null` means Douyin did not give the value. `0` is a real zero. Status rows (`not_found`, `no_results`, `error`) have `null` in every metric and are never charged as videos.

#### Output entities and surfaces

| Situation | Dataset/API/KVS/live view | Result shape | User action |
| --- | --- | --- | --- |
| Normal item | Dataset, **Overview** view | One `ok` row per video | Open, export or call the API |
| Domain-empty result | Dataset + `RUN_SUMMARY` | One `no_results` row for the keyword; run `SUCCEEDED`, status `NO_RESULTS` | Try another word |
| Missing video or profile | Dataset | One `not_found` row with `videoId` or `url` and `error` | Check the link |
| Partial result | Dataset + `RUN_SUMMARY` | Saved videos stay; `RUN_SUMMARY.reason` is `CHARGE_LIMIT`, `TIME_LIMIT` or `LOGIN_LIMIT` | Read the reason, raise the limit if you need more |
| Douyin refused or failed | Dataset + `RUN_SUMMARY` | Saved videos stay, one `error` row; run `FAILED`, reason `SOURCE_ERROR` | Run again later |

#### Output example

This is one full row from the Quick start run (search 咖啡, 10 videos):

```json
{
  "videoId": "7686495232195847857",
  "url": "https://www.douyin.com/video/7686495232195847857",
  "contentType": "video",
  "desc": "一次讲清楚14种咖啡到底有什么区别? #咖啡 #真财实学计划 #全球创作者计划 #商业 #燃起来了大国重器",
  "createdAt": "2026-09-17T13:42:19.000Z",
  "likes": 1222,
  "comments": 29,
  "shares": 418,
  "collects": 1045,
  "plays": null,
  "durationSec": 657.4,
  "imageCount": null,
  "hashtags": ["咖啡", "真财实学计划", "全球创作者计划", "商业", "燃起来了大国重器"],
  "isPinned": null,
  "author": {
    "uid": "3439748989075293",
    "secUid": "MS4wLjABAAAAD3KIHnwx3K8xFD8JORV0mNLXP57SekbBYmbXN9r283Cs6fUrtuMYyPtlXLr1N2iy",
    "nickname": "长江",
    "uniqueId": "90154947736",
    "followers": null,
    "verified": false,
    "verifiedReason": null,
    "url": "https://www.douyin.com/user/MS4wLjABAAAAD3KIHnwx3K8xFD8JORV0mNLXP57SekbBYmbXN9r283Cs6fUrtuMYyPtlXLr1N2iy"
  },
  "music": {
    "id": "7686495286553840399",
    "title": "@长江创作的原声",
    "author": "长江",
    "isOriginal": false
  },
  "coverUrl": "https://p3-sign.douyinpic.com/tos-cn-i-0813c000-ce/…",
  "mode": "search",
  "input": "咖啡",
  "searchPosition": 1,
  "trend": null,
  "status": "ok",
  "error": null,
  "source": "so.douyin.com",
  "fetchedAt": "2026-10-26T14:15:49.634Z"
}
```

`plays` and `author.followers` are `null` here because Douyin does not send them in search results. The cover link is shortened.

### Pricing

#### Pricing unit

You pay per saved video, a small fee per keyword or link, and a start fee per run:

| Event | Free plan | Bronze | Silver | Gold |
| --- | ---: | ---: | ---: | ---: |
| Saved video (`video`) | $0.003 | $0.0027 | $0.0024 | $0.0021 |
| Keyword, profile or link (`input`) | $0.005 | same | same | same |
| Actor start (`apify-actor-start`) | $0.03 per GB of run memory | same | same | same |

- **Video** — one `ok` row in the Dataset. A video found by two keywords is charged once. `not_found`, `no_results` and `error` rows are free.
- **Keyword, profile or link** — charged once for each keyword, profile or video link the run starts to work on, and once for the whole trending list. It is charged even when Douyin has no videos for it. Repeated keywords and links are removed first and are not charged.
- **Actor start** — Apify charges this automatically when the run starts, per GB of memory. The Actor always runs with 2 GB of memory, so this is $0.06 per run (4 GB was tested and was not faster).
- Platform usage (browser, proxy, compute) is included. You do not pay it separately.

So a run stopped by invalid input costs only the start fee, $0.06. A keyword with no videos or a missing video costs $0.005 on top of the start fee. A run that fails on Douyin's side is charged the start fee, its keywords or links, and the videos it saved before the failure.

#### Cost examples

Prices on the Free plan with the default 2 GB memory:

| Scenario | Input scope | Expected videos | Start + inputs | Video charge | Stop/cap behavior |
| --- | --- | ---: | ---: | ---: | --- |
| Quick start | 1 keyword, `maxItems` 10 | 10 | $0.065 | $0.03 | Total about $0.10 |
| Keyword research | 3 keywords, `maxItems` 100 | up to 300 | $0.075 | up to $0.90 | Ends at `maxItems` or the end of results |
| Creator profile | 1 profile | about 19 | $0.065 | about $0.06 | Douyin's no-login limit |
| Trending list | `maxItems` 300 | 300 | $0.065 | $0.90 | |
| Nothing found | 1 keyword with no videos | 0 | $0.065 | $0 | One `no_results` row, no video charge |

Because of the start fee, very small runs cost more per video than large ones. Total price by plan (search, default 2 GB memory):

| Videos in one run | Keywords | Free plan | Gold |
| ---: | ---: | ---: | ---: |
| 1 | 1 | $0.068 | $0.067 |
| 10 | 1 | $0.095 | $0.086 |
| 100 | 1 | $0.365 | $0.275 |
| 1,000 | 7 | $3.095 | $2.195 |

If you need only a few videos many times a day, collect them in one run instead of many small runs.

Set a maximum cost per run in the run options if you want a hard cap. The Actor stops before the next video or keyword would go over it and says so in the status message.

### Limits

- **Search:** Douyin returns about 150 videos per keyword, then stops. `maxItems` above that gives the same ~150 videos. Search results follow Douyin's website ranking; they can differ from the app and from a "most liked" order.
- **Creator profiles:** without login Douyin shows only about the first 19–20 videos of a profile. The run summary marks this as `LOGIN_LIMIT`.
- **Trending:** the hot-search list has about 50 topics; the measured maximum was 363 videos for the whole list.
- **Run length:** one run works up to 30 minutes. The largest tested run had 14 keywords and saved 1,596 videos in 19 minutes. Split bigger jobs into several runs.
- **Speed:** opening Douyin in a browser takes 30–60 seconds, so even a small run takes about one minute.
- **No views:** Douyin's website does not show view counts, so `plays` is always `null`.
- **Not included:** video files (MP4), comments, products, live streams, private or login-only content, and private contacts.
- **Verification pages:** Douyin can show a CAPTCHA to any visitor. The Actor does not solve it; it tries a new session at most twice and then reports an `error`.
- **Douyin down:** if Douyin gives no answer for 60 seconds, the run stops with an `error` instead of waiting. Videos saved before that stay in the Dataset.

### API, export and integrations

- **API:** start the Actor with `POST https://api.apify.com/v2/acts/cliqtomedia~douyin-scraper/runs` and the input JSON, then read `GET /v2/datasets/{datasetId}/items?view=overview`.
- **Export:** download the Dataset as JSON, CSV, Excel, XML or HTML from the **Output** tab.
- **Scheduling:** create a schedule in Apify Console to run trending or creator mode every day; each run gives a new Dataset.
- **Webhooks / no-code:** use Apify integrations (Make, Zapier, n8n, Google Sheets) on "run succeeded" and read the Dataset items. Use `videoId` as the key when you join runs.

#### Use with AI agents (MCP)

- MCP server URL with only this Actor: `https://mcp.apify.com?tools=cliqtomedia/douyin-scraper`.
- Smallest useful input: `{"mode": "search", "keywords": ["咖啡"], "maxItems": 10}`.
- Key output fields: `videoId` (video ID), `desc` (caption), `likes`, `comments`, `createdAt` (publish time, UTC), `status` (`ok` or why there is no video).
- Typical run: about one minute and about $0.10 for 10 videos; about 2 minutes per 150-video keyword. Views are always `null`; profiles give about 19 videos; search gives about 150 videos per keyword.

### Troubleshooting

#### A creator profile gives only about 19 videos

Symptom: you set `maxItems` 100 for a profile and got 19 rows.
Likely reason: Douyin shows only the first page of a profile to visitors who are not logged in.
Check: `RUN_SUMMARY.inputs[].note` is `LOGIN_LIMIT`.
Action: this is a Douyin limit. To find more of the creator's videos, search for their name or topics in `search` mode.

#### The run failed and the message mentions a verification page

Symptom: run `FAILED`, an `error` row, reason `SOURCE_ERROR`.
Likely reason: Douyin showed a CAPTCHA on every new session.
Check: `RUN_SUMMARY.source.captchas` and `renewals`.
Action: run again later. Videos saved before the error stay in the Dataset.

#### The run failed with "Douyin did not answer for 60 seconds"

Symptom: run `FAILED` or `SUCCEEDED` with fewer videos, an `error` row, reason `SOURCE_ERROR`.
Likely reason: Douyin or the proxy did not answer; the Actor stops early so it does not keep using resources.
Action: run again in a few minutes.

#### A keyword gives a `no_results` row

Symptom: one row with `status: no_results` and no videos.
Likely reason: Douyin has no videos for this word, or the word is filtered by Douyin.
Check: search the same word on douyin.com in a browser.
Action: try a Chinese word or a shorter phrase.

#### A video link gives a `not_found` row

Symptom: `status: not_found` with the video ID.
Likely reason: the video was deleted, made private, or the link points to a profile.
Action: check the link; use `user` mode for profile links.

#### The run ended earlier than expected

Symptom: run `SUCCEEDED`, fewer videos, reason `TIME_LIMIT` or `CHARGE_LIMIT`.
Likely reason: the run reached 30 minutes, your run timeout, or your cost limit.
Action: split keywords into several runs or raise the limit.

### FAQ

#### Do I need a Douyin account, cookies or a Chinese phone number?

No. The Actor reads only what Douyin shows to a visitor who is not logged in. You do not give it any login data.

#### Why is `plays` always empty?

Douyin's website does not show view counts for videos. Other tools often write `0` there; this Actor writes `null` so you do not mistake it for zero views.

#### Why are my search results different from the Douyin app?

Search uses Douyin's mobile website ranking ("综合"). The app can personalize results and show another order. The Actor keeps the website order in `searchPosition`.

#### How fresh is the data?

Every run reads Douyin live. Likes and comments are the numbers at `fetchedAt`. Cover links expire after some time, so download covers soon if you need them.

### Related Actors

- [Bilibili Scraper: Videos, Comments & Creators, No Login](https://apify.com/cliqtomedia/bilibili-scraper) — the same job for Bilibili, another big Chinese video site, with comments.
- [Social Video Downloader: TikTok, Instagram, X - No Login](https://apify.com/cliqtomedia/social-video-downloader) — download video files from TikTok, the international app, and other networks.

### Support

For a bug, question or feature request, open the Actor's **Issues** tab on Apify. Include the run ID, the mode and the error text from the status message or `RUN_SUMMARY`. Never send tokens, cookies or billing data.

# Changelog

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

# Actor input Schema

## `mode` (type: `string`):

Search: videos for keywords. Creator: latest public videos of profiles. Video: one row per video link. Trending: videos for Douyin's hot-search list.

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

Words to search on Douyin, in Chinese or any language, one per line, up to 20. Used only in Search mode.

## `urls` (type: `array`):

Creator mode: profile links like https://www.douyin.com/user/MS4wLjABAAAA… or the sec_uid. Video mode: links like https://www.douyin.com/video/7699062276518677770, v.douyin.com share links, share text with a link, or the video ID. One per line, up to 100.

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

Stop after this many videos for each keyword or profile, or for the whole trending list (1–1000). Not used in Video mode. Without login Douyin shows only about the first 20 videos of a profile.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "咖啡",
    "露营"
  ],
  "urls": [
    "https://www.douyin.com/video/7699062276518677770"
  ],
  "maxItems": 10
}
```

# Actor output Schema

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

Douyin videos as a table.

## `runSummary` (type: `string`):

Status, one line per input and request statistics.

# 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 = {
    "mode": "search",
    "keywords": [
        "咖啡"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("cliqtomedia/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 = {
    "mode": "search",
    "keywords": ["咖啡"],
    "maxItems": 10,
}

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

```

## MCP server setup

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