视频号号内搜索/Search Videos Within a WeChat Channel
WeChat Channelsapi
About
视频号号内搜索/Search Videos Within a WeChat Channel
Documentation
视频号号内搜索/Search Videos Within a WeChat Channel
[中文]
用途:
- 号内搜:在指定创作者的视频号内,按关键词搜索其发布的视频(只在该号内部检索)。
- 本接口仅做首页检索(请求侧不暴露 cursor 参数,单页返回),但响应仍带
next_cursor/continue_flag,供需要时自行接续翻页参考。 - 价格:0.01$/次
- ⏱️ 由于微信服务器原因,本接口响应较慢,请将客户端请求超时(timeout)设置为 30 秒;timeout 设置过小会造成已扣费但收不到响应的情况。
- ⚠️ 大整数 ID 精度:响应中的
doc_id等为 64 位大整数,超出 JavaScript 安全整数范围(2^53-1)。请始终以字符串方式接收 / 传递这类 ID(解析 JSON 用 json-bigint 或按文本取值),勿让其经过 JSNumber。Swagger UI 文档页对超大整数会末位舍入显示,属正常现象,不影响接口实际返回的数据。
参数:
- username: 创作者 finder username(
v2_…@finder格式)。示例v2_060000231003b20faec8c6e4811dc1d4c602ee30b0771bbcf220c67926bb76ab7702ac335a53@finder(人民日报)。 - keyword: 在该号内搜索的关键词(去空白后 1-100 字)。示例
新闻。 - raw: 可选,默认 True。True=原始搜索响应;False=精简解析结构。
返回:
- 号内搜索命中列表
响应结构与 JSON Path:
raw=false(精简,snake_case):
$.data.username/$.data.keyword—— 回显入参$.data.count—— 本页命中数(示例 20)$.data.items[]—— 命中数组,逐个(N 为下标):$.data.items[N].type—— 结果类型(如video)$.data.items[N].doc_id—— 文档 id$.data.items[N].title—— 标题(已去搜索高亮标记)$.data.items[N].desc/.thumb_url/.username/.nickname—— 简介 / 缩略图 / 作者(部分项可能为 null)
$.data.continue_flag—— 是否还有更多(1=有)$.data.next_cursor—— 翻页游标对象(携带检索上下文与offset等;本路由首页检索不消费它)
raw=true(完整原始响应,camelCase):
$.data.query→keyword;$.data.offset—— 下一页偏移(示例 20)$.data.data[]—— 结果分组数组;命中项嵌在$.data.data[N].subBoxes[M].items[](亦可能在$.data.data[N].items[]),由精简层拍平成items[]$.data.continueFlag→continue_flag$.data.searchID—— 翻页所需上下文,精简层归并进next_cursor(顶层另注入$.data.next_cursor)
提示:
- 命中视频要拿媒体(下载地址 / decode_key):本接口不直接给
media,请用命中项走fetch_video_detail取media(url/url_token/decode_key),链路与解密说明见fetch_video_detail文档。
[English]
Purpose:
- In-channel search: search a creator's published videos by keyword within that channel only.
- This endpoint performs first-page retrieval only (no cursor parameter exposed, single-page result), but the response still carries
next_cursor/continue_flagfor reference. - 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
doc_idin 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 JSNumber. 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:
- username: Creator finder username (
v2_…@finderformat). E.g.v2_060000231003b20faec8c6e4811dc1d4c602ee30b0771bbcf220c67926bb76ab7702ac335a53@finder(People's Daily). - keyword: Keyword to search within the channel (1-100 chars after trimming). E.g.
新闻. - raw: Optional, default True. True=raw search response; False=simplified parsed structure.
Return:
- In-channel search hit list
Response structure & JSON Path:
raw=false (simplified, snake_case):
$.data.username/$.data.keyword— input echo$.data.count— hits on this page (e.g. 20)$.data.items[]— hit array, per item (N is the index):$.data.items[N].type— result type (e.g.video)$.data.items[N].doc_id— document id$.data.items[N].title— title (search highlight markers stripped)$.data.items[N].desc/.thumb_url/.username/.nickname— description / thumbnail / author (may be null for some items)
$.data.continue_flag— has more (1=yes)$.data.next_cursor— pagination cursor object (carries search context andoffsetetc.; not consumed by this first-page-only route)
raw=true (full raw response, camelCase):
$.data.query→keyword;$.data.offset— next page offset (e.g. 20)$.data.data[]— result group array; hit items are nested at$.data.data[N].subBoxes[M].items[](or possibly$.data.data[N].items[]), flattened intoitems[]by the simplified layer$.data.continueFlag→continue_flag$.data.searchID— context required for pagination, merged intonext_cursorby the simplified layer ($.data.next_cursoris also injected at top level)
Tip:
- To get media (download address / decode_key) of a hit video: this endpoint does not return
mediadirectly; feed the hit intofetch_video_detailto getmedia(url/url_token/decode_key). Seefetch_video_detaildocs for the chain and decryption notes.
Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.
Try 视频号号内搜索/Search Videos Within a WeChat Channel
Test this model in the Sandbase Playground with your own prompts.
Open in PlaygroundRelated Models
视频号ID转finder username/Convert Channel ID to Finder UsernameWeChat Channelsapi获取视频号账号信息/Get WeChat Channels Account InfoWeChat Channelsapi获取视频号合集内视频/Get WeChat Channels Collection VideosWeChat Channelsapi获取视频号直播间详情/Get WeChat Channels Live DetailWeChat Channelsapi获取视频号直播回放列表/Get WeChat Channels Live HistoryWeChat Channelsapi获取视频号合集列表/Get WeChat Channels User CollectionsWeChat Channelsapi获取视频号账号主页资料+统计/Get WeChat Channels User Profile & StatsWeChat Channelsapi获取视频号用户作品列表/Get WeChat Channels User VideosWeChat Channelsapi