API reference · WeChat Search

wechat-search/v2/search

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

APISynchronousOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/run
Model IDwechat-search/v2/search
01

Input Schema

7 parameters · 1 required · 6 optional

ParameterTypeRequiredDescription
keywordstringRequired搜索关键词(1-100 字)/Search keyword (1-100 chars) · Min length: 1 · Max length: 100
rawbooleanOptionalTrue=原始搜索响应;False=精简解析结构/True=raw search response; False=simplified parsed structure · Default: true
sortunionOptional排序(结果页「排序」下拉,综合与各垂类通用):不限(相关性) 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 integer · Default: "default"
cursorunionOptional翻页游标:首页留空;翻页时把上一页响应返回的 cursor 原样传回/Pagination cursor: leave empty for the first page; for the next page pass back the cursor returned in the previous response
offsetintegerOptional首页传 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) · Min: 0 · Default: 0
publish_timeunionOptional发布时间(结果页「时间」下拉,通用):不限 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 integer · Default: "all"
business_typestringOptional垂类字符串键:综合 all / 公众号 account / 文章 article / 视频 video / 直播 live_stream / 朋友圈 moments / 新闻 news / 读书 book / 听书 listen / 图片 image / 百科 encyclopedia / 微信指数 weixin_index,传其他值将直接报错/Vertical key: all / account / article / video / live_stream / moments / news / book / listen / image / encyclopedia / weixin_index, other values are rejected · Options: all, account, article, video, live_stream, moments, news, book, listen, image, encyclopedia, weixin_index · Default: "all"
allaccountarticlevideolive_streammomentsnewsbooklistenimageencyclopediaweixin_index
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description
03

Code Examples

Ready-to-run snippets

curl -X POST https://api.sandbase.ai/v1/run \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "model": "wechat-search/v2/search",
  "raw": true,
  "sort": "default",
  "offset": 0,
  "publish_time": "all",
  "business_type": "all",
  "prompt": "a beautiful sunset over mountains"
}'