---
title: "获取视频号合集内视频/Get WeChat Channels Collection Videos"
method: POST
path: "/api/v1/wechat_channels/v2/fetch_collection_videos"
tags: ["WeChat-Channels-V2-API"]
---

# 获取视频号合集内视频/Get WeChat Channels Collection Videos

`POST /api/v1/wechat_channels/v2/fetch_collection_videos`

## Request

- Base URL: `https://api.tikhub.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tikhub.io/api/v1/wechat_channels/v2/fetch_collection_videos`
- Auth: HTTP bearer

# [中文]
### 用途:
- 给定合集 `topic_id`（来自 `fetch_user_collections`），返回该合集内的视频列表。
- 每个视频带媒体地址 `media`（含 `url` / `url_token` / `decode_key`），可直接下载解密。
- 支持翻页获取更多视频。
- 价格：0.01$/次
- ⏱️ 由于微信服务器原因，本接口响应较慢，请将客户端请求超时（timeout）设置为 30 秒；timeout 设置过小会造成已扣费但收不到响应的情况。
- ⚠️ 大整数 ID 精度：响应中的 `id` / `topic_id` 等为 64 位大整数，超出 JavaScript 安全整数范围（2^53-1）。请始终以**字符串**方式接收 / 传递这类 ID（解析 JSON 用 json-bigint 或按文本取值），勿让其经过 JS `Number`。Swagger UI 文档页对超大整数会末位舍入显示，属正常现象，不影响接口实际返回的数据。
### 参数:
- topic_id: 合集 ID（纯数字，来自 `fetch_user_collections` 的 `topic_id`）。示例 `14616794565351966924`（人民日报「早安中国」合集）。
- topic: 可选，合集名，提高命中。示例 `早安中国`。
- username: 可选，创作者 finder username（`v2_…@finder` 格式），提高命中。
- last_buffer: 可选，翻页游标（base64），**首页留空**；当响应 `down_continue` 为真时，传上一页响应的 `last_buffer` 取下一页。
- topic_type: 可选，合集类型，默认 16（与 `fetch_user_collections` 里该合集的 `topic_type` 对齐）。
- raw: 可选，默认 True。True=原始响应；False=精简解析结构（推荐做媒体下载）。
### 返回:
- 合集内视频列表及翻页游标

### 响应结构与 JSON Path:
#### `raw=false`（精简，snake_case，**推荐做媒体下载**）:
- `$.data.topic_id` / `$.data.title`（合集名）
- `$.data.total_count` —— 合集总视频数；`$.data.count` —— 本页条数（示例 20）
- `$.data.videos[]` —— 视频数组，逐个（N 为下标）:
    - `$.data.videos[N].id` —— 作品 objectId（可喂 `fetch_video_detail` / `fetch_video_comments`）
    - `$.data.videos[N].username` / `.nickname` / `.title`（可能为 null）/ `.create_time`
    - `$.data.videos[N].read_count` / `.like_count` / `.fav_count` / `.forward_count` / `.comment_count`
    - `$.data.videos[N].media` —— 媒体对象（单个），下载 + 解密:
        - `$.data.videos[N].media.url` —— 视频 CDN 链接（不带 Token）
        - `$.data.videos[N].media.url_token` —— CDN 链接 Token（防盗链）
        - `$.data.videos[N].media.full_url` —— 已拼好的完整 CDN URL（= `url` + `url_token`，可直接下载）
        - `$.data.videos[N].media.decode_key` —— 视频解密密钥（**每次请求都不同**）
        - 另含 `cover_url` / `duration` / `width` / `height` / `media_type` 等
- `$.data.down_continue` —— 是否有下一页（1=有）
- `$.data.last_buffer` —— 翻页游标（传回本接口取下一页）
#### `raw=true`（完整原始响应，camelCase）:
- `$.data.totalCount` → `total_count`
- `$.data.object[]` → `videos[]`（完整视频对象），逐个:
    - `$.data.object[N].id` → `id`；`$.data.object[N].username` → `username`
    - 媒体在 `$.data.object[N].objectDesc.media[0]`: `.url` → `url`、`.urlToken` → `url_token`、`.decodeKey` → `decode_key`（`full_url` 为精简层拼接产物，raw 需自行 `url` + `urlToken` 拼接）
- `$.data.downContinueFlag` → `down_continue`（注意 raw 顶层另有 `continueFlag`，合集翻页以 `downContinueFlag` 为准）
- `$.data.lastBuffer`（别名 `$.data.last_buffer`）→ `last_buffer`

### 重要提示（视频下载与解密）:
- 同 `fetch_video_detail`：直接访问 `url` 可能因防盗链打不开，需用 `full_url`（已拼 Token）下载；MP4 不能播即为加密文件，用**同一次响应**的 `decode_key` 解密（每次请求 `decode_key` 都变）。
- 在线解密工具: https://evil0ctal.github.io/WeChat-Channels-Video-File-Decryption/
- 可自行部署的解密 API（Docker 一键部署）: https://github.com/Evil0ctal/WeChat-Channels-Video-File-Decryption

# [English]
### Purpose:
- Given a collection `topic_id` (from `fetch_user_collections`), return the video list inside that collection.
- Each video carries a `media` object (`url` / `url_token` / `decode_key`) ready for download and decryption.
- Supports pagination for more videos.
- Price: $0.01 per request
- ⏱️ Due to WeChat server latency, this endpoint responds slowly; please set your client request timeout to 30 seconds — a timeout that is too small may result in being billed without receiving the response.
- ⚠️ Large-integer ID precision: IDs such as `id` / `topic_id` in the response are 64-bit big integers beyond JavaScript's safe-integer range (2^53-1). Always receive / pass such IDs as **strings** (parse JSON with json-bigint or read them as text), never through JS `Number`. Swagger UI rounds the trailing digits of huge integers in its docs view — this is expected and does not affect the actual data returned by the API.
### Parameters:
- topic_id: Collection ID (numeric, from `topic_id` of `fetch_user_collections`). E.g. `14616794565351966924` (People's Daily "早安中国" collection).
- topic: Optional, collection name, improves hit rate. E.g. `早安中国`.
- username: Optional, creator finder username (`v2_…@finder` format), improves hit rate.
- last_buffer: Optional pagination cursor (base64), **leave empty for the first page**; when `down_continue` is truthy, pass the previous page's `last_buffer`.
- topic_type: Optional, collection type, default 16 (align with the collection's `topic_type` from `fetch_user_collections`).
- raw: Optional, default True. True=raw response; False=simplified parsed structure (recommended for media download).
### Return:
- Video list of the collection with pagination cursor

### Response structure & JSON Path:
#### `raw=false` (simplified, snake_case, **recommended for media download**):
- `$.data.topic_id` / `$.data.title` (collection name)
- `$.data.total_count` — total videos in the collection; `$.data.count` — items on this page (e.g. 20)
- `$.data.videos[]` — video array, per item (N is the index):
    - `$.data.videos[N].id` — video objectId (feed into `fetch_video_detail` / `fetch_video_comments`)
    - `$.data.videos[N].username` / `.nickname` / `.title` (may be null) / `.create_time`
    - `$.data.videos[N].read_count` / `.like_count` / `.fav_count` / `.forward_count` / `.comment_count`
    - `$.data.videos[N].media` — media object (single), download + decrypt:
        - `$.data.videos[N].media.url` — video CDN link (without Token)
        - `$.data.videos[N].media.url_token` — Token of the CDN link (anti-hotlinking)
        - `$.data.videos[N].media.full_url` — pre-concatenated full CDN URL (= `url` + `url_token`, ready to download)
        - `$.data.videos[N].media.decode_key` — video decryption key (**different on every request**)
        - Also `cover_url` / `duration` / `width` / `height` / `media_type` etc.
- `$.data.down_continue` — has next page (1=yes)
- `$.data.last_buffer` — pagination cursor (pass back to this endpoint for the next page)
#### `raw=true` (full raw response, camelCase):
- `$.data.totalCount` → `total_count`
- `$.data.object[]` → `videos[]` (full video objects), per item:
    - `$.data.object[N].id` → `id`; `$.data.object[N].username` → `username`
    - Media at `$.data.object[N].objectDesc.media[0]`: `.url` → `url`, `.urlToken` → `url_token`, `.decodeKey` → `decode_key` (`full_url` is produced by the simplified layer; for raw, concatenate `url` + `urlToken` yourself)
- `$.data.downContinueFlag` → `down_continue` (note: raw top level also has `continueFlag`; for collection pagination use `downContinueFlag`)
- `$.data.lastBuffer` (alias `$.data.last_buffer`) → `last_buffer`

### Important Note (video download & decryption):
- Same as `fetch_video_detail`: accessing `url` directly may fail due to anti-hotlinking, download via `full_url` (Token already appended); if the MP4 cannot be played it is encrypted, decrypt with the `decode_key` from the **same response** (the `decode_key` changes on every request).
- Online decryption tool: https://evil0ctal.github.io/WeChat-Channels-Video-File-Decryption/
- Self-deployable decryption API (one-click Docker deployment): https://github.com/Evil0ctal/WeChat-Channels-Video-File-Decryption

## Request body

- FetchCollectionVideosRequest
  - `topic_id` string, required: 合集 ID（纯数字，来自 fetch_user_collections 的 topic_id）/Collection ID (numeric, from topic_id of fetch_user_collections)
  - `topic` string, nullable: 合集名（可选，提高命中）/Collection name (optional, improves hit rate)
  - `username` string, nullable: 创作者 finder username（可选，提高命中）/Creator finder username (optional, improves hit rate)
  - `last_buffer` string, nullable: 翻页游标（base64），首页留空/Pagination cursor (base64), leave empty for first page
  - `topic_type` integer: 合集类型，默认 16（与 fetch_user_collections 返回的 topic_type 对齐）/Collection type, default 16 (align with topic_type from fetch_user_collections)
  - `raw` boolean: True=原始响应；False=精简解析结构（推荐做媒体下载）/True=raw response; False=simplified parsed structure (recommended for media download)

## Response `200`

Successful Response

- ResponseModel
  - `code` integer: HTTP status code | HTTP状态码
  - `request_id` string, nullable: Unique request identifier | 唯一请求标识符
  - `message` string: Response message (EN-US) | 响应消息 (English)
  - `message_zh` string: Response message (ZH-CN) | 响应消息 (中文)
  - `support` string: Support message | 支持消息
  - `time` string: The time the response was generated | 生成响应的时间
  - `time_stamp` integer: The timestamp the response was generated | 生成响应的时间戳
  - `time_zone` string: The timezone of the response time | 响应时间的时区
  - `docs` string, nullable: Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接
  - `cache_message` string, nullable: Cache message (EN-US) | 缓存消息 (English)
  - `cache_message_zh` string, nullable: Cache message (ZH-CN) | 缓存消息 (中文)
  - `cache_url` string, nullable: The URL to access the cached result | 访问缓存结果的 URL
  - `router` string: The endpoint that generated this response | 生成此响应的端点
  - `params` unknown
  - `data` unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-08** `96a122a5f220`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-09-01** `50f9ec6e1cd3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/changes/api/v1/wechat_channels/v2/fetch_collection_videos/post.md)

---

[API](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi.md) - [All operations](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/llms.txt) - [OpenAPI document](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/revisions/86a3483c705a?raw)
