# Kwai Keyword Video Discovery Scraper (`automation-lab/kwai-keyword-video-discovery`) Actor

Discover public Kwai videos by keyword. Export video and creator IDs, captions, visible engagement, media links, music and duration for recurring topic research.

- **URL**: https://apify.com/automation-lab/kwai-keyword-video-discovery.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Social media, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.89 / 1,000 keyword 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

## Kwai Keyword Video Discovery Scraper

Find public **Kwai videos** associated with supplied keywords and export stable string video and creator IDs, captions, visible engagement, page and media links, duration, optional music, and query timestamps. Use repeated runs for topic research and creator comparisons—not as a complete archive or a newest-video alert service.

### Who is it for?

Content researchers, creator partnerships teams and analysts who need small repeatable keyword snapshots from Kwai Brazil's public video search.

### Why use it?

Keep video IDs intact rather than rounding large numeric identifiers. Every record carries its originating query and response timestamp. Compare snapshots downstream using `videoId`, and distinguish unavailable engagement from genuine zero counts. No account, cookies or proxy setup is required.

### What it collects

| Fields | Meaning |
|---|---|
| query, position, queriedAt | Normalized query, native batch position and collection time |
| videoId, creatorId | Exact string source identifiers |
| creatorName, creatorHandle, creatorUrl | Public creator identity |
| caption, videoPageUrl | Video caption and public page |
| viewCount, likeCount, commentCount, shareCount | Visible engagement; null means unavailable |
| mediaUrl, thumbnailUrl | Source-provided links; media is not downloaded |
| durationSeconds, publishedAt | Source duration and publication time |
| music | Source-supplied music metadata or null; commonly absent in search batches |

Music is not enriched from video detail pages. Media links may expire. Comment bodies, private records, generic feeds and downloads are excluded.

### Getting started

1. Enter one or more keywords, such as `futebol` or `maquiagem`.
2. Set a global unique-video limit.
3. Run and inspect the default dataset.
4. Export JSON/CSV or connect a downstream integration.
5. Compare later runs using string IDs; store your own snapshots for historical comparisons.

```json
{"keywords":["futebol","maquiagem"],"maxItems":20}
```

### Input parameters

`keywords` accepts 1–20 nonempty strings, each at most 100 characters. Leading/trailing whitespace is removed and internal whitespace collapsed. Identical normalized queries are deduplicated. Queries run in supplied order.

`maxItems` is a **global** unique-video limit, default 20, range 1–100. Zero/unlimited is unsupported. Earlier queries may fill the limit before later queries run. Duplicate video IDs are excluded across queries, so a shared video is attributed only to its first query.

### Search semantics and coverage

Kwai controls keyword ranking and sometimes supplies unrelated recommendations even for nonsense queries. To exclude those generic recommendations, this Actor accepts a record only when the complete query occurs as a substring in its caption, creator display name **or** creator handle. Matching ignores case and accents and collapses whitespace. It is not whole-field equality or whole-word matching. Multiword queries must occur as the complete normalized phrase in one field. Each query is independent (ANY across the query list). Semantic synonyms without that literal phrase are not collected. This Actor requests one native batch of at most 20 source records per query. It does not promise exhaustive pagination, historical coverage, chronological ordering or a full creator catalog. Non-video cards are excluded, so a batch may produce fewer videos.

Source errors are failures, not empty successful datasets. A verified search response containing no matching videos produces a successful empty dataset. If a later query fails, existing rows are partial and the run is marked failed.

### Output example

This anonymized example preserves the types observed in local source output; counts, identity and caption are illustrative.

```json
{
  "query":"futebol", "position":1,
  "videoId":"5000000000000000001", "creatorId":"3xexamplecreator",
  "creatorName":"Example Creator", "creatorHandle":"exampleuser",
  "caption":"Example football video #futebol",
  "videoPageUrl":"https://www.kwai.com/@exampleuser/video/5000000000000000001",
  "creatorUrl":"https://www.kwai.com/@exampleuser",
  "viewCount":1000, "likeCount":50, "commentCount":5, "shareCount":10,
  "mediaUrl":null, "thumbnailUrl":null, "music":null,
  "durationSeconds":30.5, "publishedAt":"2026-01-01T00:00:00.000Z",
  "queriedAt":"2026-10-12T00:00:00.000Z"
}
```

The `SUMMARY` key-value record contains requested and processed queries, the actual delivered count, `billingLimited`, and coverage limitations. When the spending limit is reached, the Actor stops requesting further keywords and marks `billingLimited: true`; even a successful run may then contain partial or zero output. IDs must remain strings in spreadsheets and databases.

### How much does it cost to discover Kwai videos?

Pricing uses a one-time `start` event plus one `item` event per unique delivered video. Duplicates and rejected cards have no item event. Music and creator metadata are included, not separately charged. Source media is not downloaded.

The start event is $0.001 per run. Per-video prices: FREE $0.0017038, BRONZE $0.0014816, SILVER $0.0011556, GOLD/PLATINUM/DIAMOND $0.00088896. BRONZE example estimates including start: one video $0.0024816, five $0.008408, twenty $0.030632, one hundred $0.14916. A valid empty search charges only the start event. Apify Store spend tiers reflect qualifying aggregate monthly Store spend, not a private volume discount. Your selected maximum total charge can reduce collected output; consult the active Console pricing before running.

### Integrations

Send snapshots to Google Sheets, a warehouse or an Apify webhook. Join on `videoId` for changes in visible engagement. Group by `creatorId` to shortlist creators across topics. Scheduling and comparison live in your Apify Task or external pipeline; this Actor does not maintain cross-run history or send alerts.

### API usage

Use an Apify token stored outside source code. This example starts one run and returns run metadata; fetch dataset rows after that same run succeeds.

```bash
curl -X POST 'https://api.apify.com/v2/acts/automation-lab~kwai-keyword-video-discovery/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" -H 'Content-Type: application/json' \
  -d '{"keywords":["futebol"],"maxItems":10}'
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/kwai-keyword-video-discovery')
    .call({ keywords: ['futebol'], maxItems: 10 });
if (run.status !== 'SUCCEEDED') throw new Error(run.status);
const { items } = await client.dataset(run.defaultDatasetId).listItems({ limit: 10 });
console.log(items);
```

```python
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/kwai-keyword-video-discovery').call(
    run_input={'keywords': ['futebol'], 'maxItems': 10})
if run['status'] != 'SUCCEEDED':
    raise RuntimeError(run['status'])
print(client.dataset(run['defaultDatasetId']).list_items(limit=10).items)
```

### MCP usage

Select the stable Actor subset:

```bash
claude mcp add --transport http apify \
  'https://mcp.apify.com?tools=automation-lab/kwai-keyword-video-discovery'
```

For **Claude Desktop**, use the client's HTTP MCP setup (or a compatible remote-MCP bridge if your version requires one). **Cursor** and **VS Code** support remote HTTP MCP; use the Actor-specific URL with authentication configured in the client. An example remote configuration is:

```json
{"mcpServers":{"apify":{"url":"https://mcp.apify.com?tools=automation-lab/kwai-keyword-video-discovery"}}}
```

Discover actual tool names and input schemas with `tools/list`. Actor selection also includes run/data utility tools; it is not exactly one tool. Example prompt: “Discover ten Kwai videos for futebol and summarize visible engagement, keeping IDs as strings.”

For an authorized invocation, start once and retain the run and storage IDs. `call-actor` waits at most 45 seconds; IDs are not result rows. Poll `get-actor-run` for that same run with 2/4/8-second backoff capped at 10 seconds and a 120-second deadline. On timeout check the known run, never restart blindly. Report pending or terminal failure honestly.

After success use bounded `get-dataset-items` pages of 20, maximum 100 rows or 64 KiB of serialized UTF-8 content admitted to model context, whichever comes first. Enforce the byte ceiling host-side, including oversized rows; disclose truncation and continuation offsets. If your client cannot intercept oversized responses, do not claim a hard byte guarantee. Full exports remain in storage outside model context. No universal context/token savings are claimed.

### Legality and responsible use

Collect only public records for legitimate research. Respect source rights, applicable privacy rules and restrictions on reuse. The Actor uses Apify's standard terms and does not grant rights to downloaded or linked media. Kwai is named only to identify the data source. This Actor is independently operated by automation-lab and is not affiliated with or endorsed by Kwai or Apify.

### Data handling and dependencies

No AI is used during extraction or output generation. Queries are sent to Kwai; public video/creator metadata is stored in the run dataset on Apify. Apify controls storage retention under your account settings; delete run datasets/KV records when no longer needed. There is no fixed global dataset, cross-run cache, browser profile or media download. The operator pays required platform and telemetry costs; no paid third-party key or hidden external fee is required.

Failed operations send sanitized diagnostic input, exceptions and Actor/build/run IDs to our private GlitchTip service for repair. Secret fields and URL queries are removed; reports are retained for 30 days. Do not place confidential information in keywords. Private GlitchTip diagnostics are separate from your public source records.

### Troubleshooting and FAQ

**Why fewer than my limit?** One native batch per query, source availability, non-video cards and deduplication can reduce output.

**Why older videos or an indirect match?** Kwai determines ranking; the complete normalized phrase may match a creator name/handle rather than the caption. This is not newest-first search. Generic recommendations without the phrase in any supported field are omitted.

**Why is music null?** Search batches commonly omit music. The Actor does not fabricate tracks or visit every detail page.

**Why did the run fail?** Upstream availability, invalid input and unexpected response shapes fail closed. Transient HTTP failures receive at most two bounded retries; application result errors are not retried blindly. Existing rows in a failed run are partial.

**Can I scrape hashtags, creators or feeds?** Those separate routes are not supported. Supply ordinary keyword queries only.

**How do I report a problem?** Open an Apify Store issue with a safe input and run link. Do not post tokens or private information. We aim to provide a substantive response within 14 calendar days.

### Related Actors

For broader topic discovery on another source, see [YouTube Search Results Scraper](https://apify.com/automation-lab/youtube-search-results). It returns YouTube records, not Kwai data; choose according to the source your research requires.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/kwai-keyword-video-discovery/changelog.md

# Actor input Schema

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

1–20 keyword queries, each up to 100 characters. Queries run in supplied order against Kwai's anonymous keyword search. Leading/trailing whitespace is removed and internal whitespace collapsed; identical queries are deduplicated. Kwai controls ranking. To exclude generic recommendations, a record must also contain the complete normalized query as a substring of its caption, creator name OR handle. Matching is case-insensitive and accent-insensitive; whitespace is collapsed. This is phrase substring matching, not whole-field equality or whole-word boundaries. Each query is independent (ANY across the supplied list), and generic unrelated recommendations are omitted. No generic feed, hashtag-only or creator route is used.

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

Global run limit of unique video IDs, across all queries. Default 20, range 1–100; zero/unlimited is unsupported. Earlier queries can exhaust this limit before later queries run. One native search batch of at most 20 records is requested per query; duplicates/non-video records are excluded and source caps can yield fewer results. Does not promise exhaustive pagination or newest-first results.

## Actor input object example

```json
{
  "keywords": [
    "futebol",
    "maquiagem"
  ],
  "maxItems": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

All video fields in JSON.

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

Queries and delivered unique video count.

# 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": [
        "futebol",
        "maquiagem"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/kwai-keyword-video-discovery").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": [
        "futebol",
        "maquiagem",
    ],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/kwai-keyword-video-discovery").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": [
    "futebol",
    "maquiagem"
  ],
  "maxItems": 20
}' |
apify call automation-lab/kwai-keyword-video-discovery --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/kwai-keyword-video-discovery"
        }
    }
}
```

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/rzR28djqxJf3UXZEH/builds/JSDQDz4hZ8zDthIkZ/openapi.json
