# 红果短剧 API | Hongguo Search, Details & Comments (`socialdatax/socialdatax-hongguo-data-api`) Actor

搜索红果短剧，获取剧集详情与分集目录、整剧和单集评论及回复、各清晰度视频下载地址与解密密钥。Search Hongguo dramas, get series and episodes, comments, replies and video download links. Export JSON, CSV or Excel. No SocialDataX API key required.

- **URL**: https://apify.com/socialdatax/socialdatax-hongguo-data-api.md
- **Developed by:** [SocialDataX](https://apify.com/socialdatax) (community)
- **Features:** Limited permissions
- **Stats:** 6 total users, 3 monthly users, 99.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 successful results

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/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

## 红果短剧 API | Hongguo Search, Details & Comments

Search Hongguo short dramas, read series details and episode lists, collect series and video comments and replies, and get video download URLs with decryption keys. Export results as JSON, CSV, Excel or JSONL. No SocialDataX API key is required from users.

搜索红果短剧，获取剧集详情及完整分集目录、整剧剧评和单集评论及回复、各清晰度下载地址与解密密钥。

### Pricing / 定价

All seven operations cost **$2 per 1,000 successfully saved Dataset rows** ($0.002 per row), including platform usage during the run. The Actor Start event costs $0.00005 per event under Apify's memory counting rules. Empty results and errors have no result charge; the startup event can still be charged.

七项操作统一每千条成功结果 **$2**，运行中的平台费用包含在内；启动事件另收 $0.00005，按 Apify 内存计数规则计算。空结果和错误不收结果费，启动费仍可能产生。免费计划可试用5次成功的 SocialDataX API 调用，分页按页计入；继续使用需要 Apify 付费计划。

### Operations / 操作

| operation | Required input / 输入 | One Dataset row / 计费单位 |
|---|---|---|
| `search_contents` | `keyword`；可选 `content_types` | One search result / 一条搜索结果 |
| `get_series_detail` | `series_id` 或 `url`，二选一 | One series including its complete `episodes` array / 一部剧，包含完整分集目录 |
| `get_series_comments` | `series_id` 或 `url`，二选一 | One series comment / 一条整剧剧评 |
| `get_series_comment_replies` | `series_id`、`comment_id`；`level=2` 或 `3` | One reply / 一条整剧剧评回复 |
| `get_video_comments` | `video_id` 或 `video_url`，二选一 | One video comment / 一条单集评论 |
| `get_video_comment_replies` | `video_id`、`comment_id` | One reply / 一条视频评论回复 |
| `get_video_download_links` | `video_id` 或 `video_url`，二选一 | One video including all `streams` / 一个视频，包含各清晰度 |

Pass IDs as strings so long IDs remain exact. Series IDs identify a whole drama; video IDs identify an episode or independent video. Series comments and video comments are separate lists. For series replies, `level=2` reads replies to a main comment; `level=3` reads replies to a parent reply. Video replies do not use `level`.

ID请使用字符串。整剧ID和单集ID不能混用；评论ID应来自对应的评论列表。整剧剧评回复支持两级，视频评论回复只读取主评论下的回复。

### Search and pagination / 搜索与分页

```json
{"operation":"search_contents","keyword":"重生","content_types":["comic"],"max_items":20,"auto_paginate":true}
```

`content_types` can contain `live_action`, `comic`, `ai_drama`, `film_tv`, `short_video`, or `image_text`; omit it or use `[]` for all types. The operation searches the general tab. Results identify their type as `series` or `image_text`.

Search, comments and replies support `max_items` (1–1,000, default20), `auto_paginate` (defaulttrue) and `page_token`. Copy the complete next-page token from `OUTPUT.pages[].next_page_token` or Dataset `page_next_page_token`, keeping the operation, query and target unchanged. Empty token means the end. If the original pagination session is unavailable, start again from the first page. Totals and short pages do not determine the end.

搜索、评论及回复支持自动翻页。`max_items`是总导出上限，单页实际条数由平台决定。达到上限时可能只导出当前页的一部分；下一页令牌从下一整页开始，不能恢复当前页未导出的条目。OUTPUT会提示截断；空页的下一页令牌仍保留在OUTPUT中。结果保留接口顺序与重复条目，不承诺固定排序或固定总条数。

### Share links and video URLs / 分享链接与视频取址

Series `url` accepts a supported `novelquickapp.com` share link or the full share text containing that link. `video_url` currently accepts supported Hongguo comic-episode share links on that domain with an explicit episode. The returned video is the shared episode, not an assumed first episode.

`get_video_download_links` returns `streams`, each with a quality label, encrypted MP4 URL, optional backup URL, encryption method and matching decryption key. URLs expire; download promptly. The quality label is the platform's label, not a verified pixel measurement.

**This operation returns URLs and keys. It does not download or save an MP4 in Apify.** To decrypt a downloaded file, use the matching stream key with FFmpeg:

```sh
ffmpeg -decryption_key '<decryption_key>' -i encrypted.mp4 -map 0:v:0 -map '0:a:0?' -c copy output.mp4
```

只返回下载地址和解密密钥；文件仍为加密MP4，需下载后使用同一清晰度的密钥解密。剧集详情的`episodes`不包含视频文件。请仅处理你有权使用的内容。

### Output and errors / 输出与错误

Dataset contains result rows plus query and pagination metadata. Series directories and video streams remain nested, without additional per-episode or per-quality result fees. `OUTPUT` contains counts, complete next-page tokens, warnings and lightweight failure details, without the video URLs or keys.

Always check `OUTPUT`, Dataset counts and warnings. Invalid inputs and terminal business errors stop without automatic retries; rate limits honor `Retry-After` with bounded attempts. If a later page fails, the run fails before exporting collected pages. When the free trial quota is exhausted during pagination, earlier successful pages are exported with a warning and billed as result rows.

Support: https://socialdatax.com/ai?from=apify

# Actor input Schema

## `operation` (type: `string`):

选择能力，只填写该操作需要的字段。

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

红果综合搜索的关键词或短语，例如剧名、人物名或题材；最多200个字符，部分表情符号计为两个字符。不含控制字符；不要传链接、作品 ID 或分页令牌。

## `content_types` (type: `array`):

内容类型可多选，不可重复。仅在用户明确限定内容类型时设置；未限定时省略或传空列表（不限），不要根据搜索关键词自行缩窄类型。live_action=真人剧，comic=漫剧（非静态漫画），ai_drama=红果平台单独列出的AI剧分类，film_tv=影视剧，short_video=短视频，image_text=图文。

## `series_id` (type: `string`):

整部剧的ID，可使用红果搜索结果中的series_id；1至19位正十进制数字字符串，不是单集video_id。详情与整剧剧评可改填url；二选一。

## `url` (type: `string`):

红果剧集分享链接，或包含该链接的整段分享文案；支持 https://novelquickapp.com/s/836Rt1LxwF4/ 这类链接。一次提供一条剧集链接。与series_id二选一，仅用于剧集详情和整剧剧评。

## `video_id` (type: `string`):

红果视频ID，支持剧集单集及独立视频；1至19位正十进制数字字符串。评论回复必填；单集评论和取址可改填video_url。

## `video_url` (type: `string`):

单集评论或取址使用，与video_id二选一。支持novelquickapp.com漫剧单集分享链接或整段分享文案；链接必须明确对应单集。

## `comment_id` (type: `string`):

回复操作必填，来自相应整剧剧评或视频评论列表。整剧level=3时填父回复ID。

## `level` (type: `integer`):

回复层级：2读取主评论下的回复，3读取某条回复下的楼中楼；默认2。仅用于整剧剧评回复。

## `page_token` (type: `string`):

首屏留空，续页原样回传OUTPUT或Dataset中的完整令牌，保持操作、关键词、类型和目标不变；原设备不可用时从首页重新获取。

## `max_items` (type: `integer`):

搜索、评论与回复的总导出上限。详情每部剧1条（含完整分集目录），取址每个视频1条（含各清晰度）。每千条成功结果$2，另有启动费。

## `auto_paginate` (type: `boolean`):

搜索、评论和回复按完整令牌继续，达到max_items或末页时停止。

## Actor input object example

```json
{
  "operation": "search_contents",
  "keyword": "重生",
  "content_types": [],
  "level": 2,
  "max_items": 20,
  "auto_paginate": true
}
```

# Actor output Schema

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

Open flat result rows written to the default Apify Dataset. Export as JSON, CSV, Excel / XLSX, or JSONL.

## `keyValueStore` (type: `string`):

Open the default key-value store. The OUTPUT record contains operation, item count, request count, page-level response summaries, non-fatal warnings, and lightweight failure details when a run fails.

# 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("socialdatax/socialdatax-hongguo-data-api").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("socialdatax/socialdatax-hongguo-data-api").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 socialdatax/socialdatax-hongguo-data-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialdatax/socialdatax-hongguo-data-api"
        }
    }
}
```

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/h4F95tbQ1bzuMorLb/builds/ijdjLGhmTwqygMcIa/openapi.json
