WeChat Universal Search

20.65 credits/call
ae_wechat_universal_search

## WeChat universal search Search WeChat by keyword across mixed results, official accounts, articles, Channels videos, or stickers. Results are returned directly; item fields vary by category. ### Inputs Pass a required `request_body` object containing: - `keyword` (required): 1–100 characters after trimming, for example `人民日报`. - `business_type` (optional, default `all`): a string category key. Documented tested categories returning data are `all` (mixed), `account` (official/service accounts and Channels accounts), `article`, `video` (Channels videos), and `sticker`. Other accepted keys are `underline`, `encyclopedia`, `live_stream`, `comment`, `listen`, `news`, `photos`, `book`, `moments`, `image`, `mini_game`, `weixin_index`, and `ai_search`. Documentation reports these currently return empty results; availability depends on account and region. Unsupported keys or numeric category codes are rejected (422). - `sort` (optional, default `default`): `default` or integer `0` for relevance; `latest` or `1` for newest; `hot` or `2` for most liked. - `publish_time` (optional, default `all`): `all` or integer `0` for any time; `day` or `1` for the last day; `week` or `2` for the last seven days; `half_year` or `3` for the last six months. Invalid sort or publication-time values are rejected (400). - `offset` (optional, default `0`): nonnegative integer. Use `0` for the first page; changing offset alone does not paginate. - `cursor` (optional): omit or leave empty for the first page. To continue, return the previous response's `data.cursor` unchanged, retain the same `sort` and `publish_time`, and check `data.continue_flag` for more pages. - `raw` (optional, default `true`): `true` retains nested search results; `false` produces a simplified flat item list. ### Returned data - With `raw=false`, read `data.items[]` for flattened results and `data.count` for this page's item count. Account items may include `title` with `<em>` highlighting, `desc`, `docID`, `accTypeName`, and `jumpInfo`; fields differ for other categories. - With `raw=true`, read `data.results`; items occur in `data.results.data[M].items[]` and `data.results.data[M].subBoxes[K].items[]`. - Both modes include `data.keyword`, the effective numeric category code in `data.business_type`, `data.continue_flag`, `data.cursor`, and informational `data.offset`. - `data.total` is the maximum positive `totalCount` across result boxes and subBoxes, not their sum. Mixed search has no single overall total. This field is `null` when there is no positive count. - `data.categories` is the available category-tab list for `business_type=all`, and is otherwise `null`. Entries contain `type`, `word`, and `extra_kvs`. The numeric `type` values are not valid inputs to `business_type`; map them to supported string keys, for example `33554499` to `account`. - A nonempty `data.no_more` represents a normal empty result, not a failed call. In simplified mode, empty results also have `count=0` and `items=[]`. ### Limits and handling Search video items provide `exportId` and `jumpInfo.extInfo.feedNonceId`, not media URLs or decryption keys; media requires a separate video-detail lookup. Account items can provide a `jumpInfo.userName` identifier for subsequent account lookups. Preserve 64-bit IDs such as `docID` and `feedNonceId` as strings using lossless JSON parsing; do not pass them through JavaScript `Number`. Responses can be slow: allow a 30-second client timeout. Timeout is a client setting, not an input parameter.

SocialVideo
20.65 credits/call

Pricing

20.65 credits/call
ConditionCharge
Each call20.65 credits/call

Each call has a fixed charge of 20.65 credits. Charges are per query. A successful query is billed even if it returns no results.

A normal response with no results is still billed as one call. Each request for another page using a cursor is billed separately.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYes微信搜一搜的请求体对象,包含必填的搜索关键词 keyword,以及可选的垂类 business_type、排序 sort、发布时间筛选 publish_time、分页字段 offset 和 cursor、结果格式开关 raw。翻页使用 cursor,raw 控制返回原始嵌套结果或精简解析结果。/Request body object for WeChat search, containing the required search keyword (keyword) and optional category (business_type), sorting (sort), publication-time filter (publish_time), pagination fields (offset and cursor), and result-format switch (raw). Use cursor for pagination; raw selects raw nested results or simplified parsed results.—
request_body.rawbooleanNoTrue=原始搜索响应;False=精简解析结构/True=raw search response; False=simplified parsed structuretrue
request_body.sortinteger | stringNo排序(结果页「排序」下拉,综合与各垂类通用):不限(相关性) default/0 / 最新(发布时间降序) latest/1 / 最热(点赞降序) hot/2,字符串键或整数均可/Sort (result page 'sort' dropdown, common to all verticals): default/0 (relevance) / latest/1 (newest) / hot/2 (most liked); string key or integerdefault
request_body.cursorstring | nullNo翻页游标:首页留空;翻页时把上一页响应返回的 cursor 原样传回/Pagination cursor: leave empty for the first page; for the next page pass back the cursor returned in the previous response—
request_body.offsetintegerNo首页传 0;翻页请用 cursor(只传 offset 无效,每页都回到第一页)/Pass 0 for the first page; use cursor to paginate (offset alone does not work — it returns the first page every time)0
request_body.keywordstringYes搜索关键词(1-100 字)/Search keyword (1-100 chars)—
request_body.publish_timeinteger | stringNo发布时间(结果页「时间」下拉,通用):不限 all/0 / 最近一天 day/1 / 最近七天 week/2 / 最近半年 half_year/3,字符串键或整数均可/Publish time (result page 'time' dropdown, common): all/0 / day/1 / week/2 / half_year/3; string key or integerall
request_body.business_typeenum (all | account | article | video | sticker | underline | encyclopedia | live_stream | comment | listen | news | photos | book | moments | image | mini_game | weixin_index | ai_search)No垂类字符串键(共 18 个)。**实测有结果**:综合 all / 公众号·服务号·视频号 account / 文章 article / 视频 video / 表情 sticker。其余键(underline / encyclopedia / live_stream / comment / listen / news / photos / book / moments / image / mini_game / weixin_index / ai_search)由微信服务端按账号与地区下发,当前实测恒返回空结果(count=0 + no_more 文案,仍按一次正常调用计费)。当前账号真正可用的 tab 以综合搜索响应里的 categories 为准;传列表外的值直接报错(422)/Vertical key (18 total). **Verified to return data**: all / account / article / video / sticker. The rest (underline / encyclopedia / live_stream / comment / listen / news / photos / book / moments / image / mini_game / weixin_index / ai_search) are gated server-side per account & region and currently always come back empty (count=0 plus a no_more message — still billed as a normal call). Use the `categories` field of an `all` search for the authoritative per-account tab list. Values outside this list are rejected (422)all

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_wechat_universal_search' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "business_type": "account",
      "keyword": "稳定器",
      "offset": 0,
      "raw": false,
      "sort": "default"
    }
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "code": 200,
  "data": {
    "business_type": 33554499,
    "continue_flag": 1,
    "count": 14,
    "cursor": "IghLgbguLxfijIecL-Mn4G_CHvetxXWxJiRJfaWAdKcqjyFjbBEjgC1GD87y0OrxGxe0EC72ORWoW3zVHb67c5F6J-ba9vWoDnj1wNbEcjiEGGUPzjVayCfoCD94rEIGUpuhoXaK3Dt7DmhO1QOcsDcKjbYy97DrpjiA24mP91x_XeCfy5JHwxqZRiqDLHroyhpvTwHon49uzdwOT5T6mfPZWGxBtk4Eij7jlZpFD3ciuDT9uMuHY34zbNvYP_wE",
    "items": [
      {
        "accTypeName": "公众号",
        "acctDesc": "697篇原创内容",
        "desc": "连接摄影与创意,换个方式拍世界。飞宇与你,创造更多可能!",
        "docID": "3078760315",
        "extraDesc": "7小时前更新",
        "foldHide": 0
      }
    ],
    "keyword": "稳定器"
  },
  "docs": "https://api.tikhub.io/#/WeChat-Search-V2-API/fetch_search_api_v1_wechat_search_v2_fetch_search_post",
  "message": "Request successful. This request will incur a charge.",
  "message_zh": "请求成功,本次请求将被计费。",
  "request_id": "3aeb5930-3017-4098-b1d8-361d03568db4"
}

This example shows part of the response. Copied content is valid JSON.