WeChat-Channels-V2-API
获取视频号作品详情/Get WeChat Channels Video Detail
Changed on[中文]
用途:
- 获取视频号作品详情,返回作品完整详情(媒体地址 media + decode_key)。
- 支持三种入参,三选一、优先级 object_id > export_id > share_url。
- 价格:0.01$/次
- ⏱️ 由于微信服务器原因,本接口响应较慢,请将客户端请求超时(timeout)设置为 30 秒;timeout 设置过小会造成已扣费但收不到响应的情况。
- ⚠️ 大整数 ID 精度:响应中的 id 等为 64 位大整数,超出 JavaScript 安全整数范围(2^53-1)。请始终以字符串方式接收 / 传递这类 ID(解析 JSON 用 json-bigint 或按文本取值),勿让其经过 JS Number。Swagger UI 文档页对超大整数会末位舍入显示,属正常现象,不影响接口实际返回的数据。
参数:
- object_id: 最优先,可选。作品 objectId(纯数字),示例 14941130915890399732。可从 fetch_user_videos / fetch_collection_videos 的视频 id 获取。
- export_id: 其次,可选。搜索结果里的 exportId(须以 export/ 开头)。搜索返回的视频项往往只有 exportId、没有明文 object_id —— 此时直接传 export_id(会过期,需尽快用)。
- object_nonce_id: 可选。搜索结果里的 feedNonceId(纯数字),搭配上面两者提升命中率。
- share_url: 最后,可选。视频号分享短链(https://weixin.qq.com/sph/…),示例 https://weixin.qq.com/sph/AH3sCoIPhH。仅在 object_id 与 export_id 都为空时使用。
- raw: 可选,默认 True。True=原始响应;False=精简解析结构(推荐做媒体下载)。
- 三者须至少传一个;share_url 需为视频号分享短链(https://weixin.qq.com/sph/…)。
返回:
- 作品完整详情(含媒体下载地址与解密密钥)
典型链路(从作品到账号 / 更多作品):
- 本接口 fetch_video_detail → 响应含明文 id(objectId)、username(v2_…@finder)、media(url / url_token / decode_key)
- 拿到的 username 再喂 → fetch_channel_info(账号资料 / 认证)、fetch_user_videos(该号更多作品)、fetch_user_profile(主页统计)、fetch_video_comments(本视频评论,用第 1 步的 id)
响应结构与 JSON Path:
raw=false(精简,推荐):
- data 即单个视频对象:
- id(作品 objectId): $.data.id
- username(v2_…@finder)/ nickname / title: $.data.username 等
- 互动计数: $.data.read_count / .like_count / .fav_count / .forward_count / .comment_count
- 发布时间 / 类型 / 位置: $.data.create_time / $.data.object_type / $.data.location
- 媒体对象: $.data.media(见下方下载/解密)
raw=true(原始):
- 状态码: $.data.baseResponse.ret
- 命中回执: $.data.objectResponses[0].objectId / .exportId
- 视频对象(注意是 objects 复数,camelCase): $.data.objects[0]
- 对应关系: raw=false 的扁平字段对应 raw=true 的 objects[0]。
重要提示(视频下载与解密):
- 直接访问响应返回的 url 字段可能无法正确打开视频页面 —— 微信对视频号页面做了防盗链处理。把 url 和 url_token 拼成一个完整 URL 再在浏览器 / HTTP 客户端打开。(注:能打开 = HTTP 200,不代表视频能正常播放,因为视频文件是加密的。)
- ⚠️ 视频文件加密说明: MP4 无法播放即为加密。请使用接口返回的 decode_key 字段和加密视频文件进行解密。
- ⚠️ 重要: 微信接口每次请求都会返回新的加密文件链接和 decode_key,即使是同一个视频。请确保用于解密的 decode_key 与下载的加密视频文件来自同一次 API 响应,否则解密会失败。
- JSON Path(区分 raw):
- raw=false(推荐做媒体下载)—— $.data.media 是单个对象:
- 视频 CDN 链接(不带 Token): $.data.media.url
- 视频 CDN 链接的 Token: $.data.media.url_token
- 拼接好的完整 CDN URL(= url + url_token,可直接用): $.data.media.full_url
- 视频解密密钥(每次请求都不一样): $.data.media.decode_key
- raw=true —— $.data.objects[0].objectDesc.media[0]:
- 视频 CDN 链接(不带 Token): $.data.objects[0].objectDesc.media[0].url
- Token: $.data.objects[0].objectDesc.media[0].urlToken
- 完整 URL = url + urlToken(拼接)
- 视频解密密钥: $.data.objects[0].objectDesc.media[0].decodeKey
- raw=false(推荐做媒体下载)—— $.data.media 是单个对象:
- 在线解密工具: https://evil0ctal.github.io/WeChat-Channels-Video-File-Decryption/
- 可自行部署的解密 API(Docker 一键部署): https://github.com/Evil0ctal/WeChat-Channels-Video-File-Decryption
[English]
Purpose:
- Get the full detail of a WeChat Channels video (media address media + decode_key).
- Three input options, choose one, priority object_id > export_id > share_url.
- 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 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:
- object_id: Highest priority, optional. Video objectId (numeric), e.g. 14941130915890399732. Obtainable from the video id of fetch_user_videos / fetch_collection_videos.
- export_id: Second priority, optional. exportId from search results (must start with export/). Search results often only carry exportId without a plain object_id — pass export_id directly in that case (it expires, use it soon).
- object_nonce_id: Optional. feedNonceId (numeric) from search results, pairs with the above to improve hit rate.
- share_url: Last, optional. Channels share URL (https://weixin.qq.com/sph/…), e.g. https://weixin.qq.com/sph/AH3sCoIPhH. Used only when both object_id and export_id are empty.
- raw: Optional, default True. True=raw response; False=simplified parsed structure (recommended for media download).
- At least one of the three must be provided; share_url must be a Channels share URL (https://weixin.qq.com/sph/…).
Return:
- Full video detail (including media download address and decryption key)
Typical chain (from a video to the account / more videos):
- This endpoint fetch_video_detail → response contains plain id (objectId), username (v2_…@finder), media (url / url_token / decode_key)
- Feed the obtained username into → fetch_channel_info (account info / verification), fetch_user_videos (more videos of the account), fetch_user_profile (homepage stats), fetch_video_comments (comments of this video, using id from step 1)
Response structure & JSON Path:
raw=false (simplified, recommended):
- data is a single video object:
- id (video objectId): $.data.id
- username (v2_…@finder) / nickname / title: $.data.username etc.
- Interaction counts: $.data.read_count / .like_count / .fav_count / .forward_count / .comment_count
- Publish time / type / location: $.data.create_time / $.data.object_type / $.data.location
- Media object: $.data.media (see download/decryption below)
raw=true (raw):
- Status code: $.data.baseResponse.ret
- Hit receipt: $.data.objectResponses[0].objectId / .exportId
- Video object (note: plural objects, camelCase): $.data.objects[0]
- Mapping: flat fields of raw=false correspond to objects[0] of raw=true.
Important Note (video download & decryption):
- Accessing the url field directly may fail to open the video page — WeChat applies anti-hotlinking to Channels pages. Concatenate url and url_token into a complete URL, then open it in a browser / HTTP client. (Note: opening = HTTP 200, does not mean playable, the video file is encrypted.)
- ⚠️ Video Encryption Notice: If the MP4 cannot be played, it is encrypted. Use the decode_key field from the response together with the encrypted video file to decrypt it.
- ⚠️ Important: The WeChat API returns a new encrypted file link and decode_key on every request, even for the same video. Make sure the decode_key used for decryption and the downloaded encrypted file come from the same API response, otherwise decryption will fail.
- JSON Path (by raw):
- raw=false (recommended for media download) — $.data.media is a single object:
- Video CDN link (without Token): $.data.media.url
- Token of the video CDN link: $.data.media.url_token
- Pre-concatenated full CDN URL (= url + url_token, ready to use): $.data.media.full_url
- Video decryption key (different on every request): $.data.media.decode_key
- raw=true — $.data.objects[0].objectDesc.media[0]:
- Video CDN link (without Token): $.data.objects[0].objectDesc.media[0].url
- Token: $.data.objects[0].objectDesc.media[0].urlToken
- Full URL = url + urlToken (concatenate)
- Video decryption key: $.data.objects[0].objectDesc.media[0].decodeKey
- raw=false (recommended for media download) — $.data.media is a single object:
- 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
post/api/v1/wechat_channels/v2/fetch_video_detail
Request
- Base URLhttps://api.tikhub.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Request body
Example request
{
"object_id": "14941130915890399732"
}Response
Successful Response
Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- info
endpoint added
- info