🏕️
ohwxapi
  • 😀OHwxapi简介
  • 前言
    • 😁部分风控说明(必读)
    • 😄搭建环境指南(必读)
  • 基础
    • 🐶获取二维码
    • 🐱推送登录
  • 好友接口
    • 🐭获取通讯录好友
    • 🤩搜索账号
    • 🤌添加好友
    • 👌同意好友
    • 👜删除好友
    • 💩拉黑好友
    • 👩‍🌾备注好友
    • 👨‍🚒好友资料
  • 群聊接口
    • 🍏创建群聊
    • 🧑‍🎄邀请进群
    • 👩‍🌾移除群聊
    • 🧕群二维码
    • 🫢退出群聊
    • 🫲修改群名
    • 👴自动进群
    • 🗣️扫码进群
    • 👱‍♂️保存通讯录
    • 🧚设置管理员
    • 👩‍🍼设置群聊公告
    • 🤰获取群资料
    • 🦸‍♂️群聊邀请设置
    • 👨‍🍼转让群聊设置
    • 🦧获取群成员资料
    • 🪷获取群成员资料2
  • 发消息接口
    • 🪮发送文本消息
    • 🚴发送图片消息
    • 🌳发送APP消息
    • 🧙发送语音消息
    • 🧑‍🔬发送CDN小视频
    • 🙅‍♀️发送名片消息
  • 小程序相关
    • 🌨️搜索小程序
    • 🦍小程序Code
    • 🌳SessionID
    • 🧎‍♀️授权手机号
  • 其他
    • 🤙确认收款
    • 👨‍🌾获取在线列表
  • cdn
    • 😋上传CDN图片
    • 🥹上传CDN文件
    • 👨‍🦰发送CDN图片
    • 🙅下载CDN资源
    • 👩‍🎨下载语音消息
  • 朋友圈
    • 😉发送朋友圈
    • 🦊拉取朋友圈
    • 😛获取朋友圈
  • webSocket
    • 🥦通过websocket获取消息
Powered by GitBook
On this page
  1. 小程序相关

搜索小程序

  • URL: v2/api

  • 方法: POST

  • 功能: 搜索小程序,支持分页显示结果。

查询参数

参数
类型
必需性
示例值
描述

funcname

string

必需

MagicCgi

指定的函数名

timeout

string

必需

10

请求超时时间

wxid

string

必需

Wxid_xxxxx

微信ID

请求体:

  • CgiCmd: 整数,必需,表示特定的命令,示例中为719。

  • CgiRequest: 对象,必需,包含具体的请求信息。

    • SearchString: 字符串,必需,搜索关键词。

    • Scene: 整数,必需,搜索场景码,示例为262208。

    • Index: 整数,必需,分页索引,0表示第一页,以20的倍数递增。

示例

{
  "CgiCmd": 719,
  "CgiRequest": {
    "SearchString": "玩具",
    "Scene": 262208,
    "Index": 0
  }
}

请求示例

curl --location -g --request POST 'v2/api?funcname=MagicCgi&timeout=10&wxid=Wxid_xxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
  "CgiCmd": 719,
  "CgiRequest": {
    "SearchString": "玩具",
    "Scene": 262208,
    "Index": 0
  }
}'

返回响应

  • HTTP 状态码: 200 表示成功。

  • 内容格式: JSON。

  • 数据结构: 根据请求成功与否,返回数据结构可能包含错误信息或搜索结果。


成功示例

{
  "CgiBaseResponse": {
    "ErrMsg": "string",
    "Ret": 0
  },
  "ResponseData": {
    "continueFlag": 0,
    "cookies": "string",
    "data": [
      {
        "boxExtraInfo": {
          "real_type": 0,
          "resultType": 0,
          "subType": 0,
          "title": "string"
        },
        "type": 0,
        "boxID": "string",
        "boxPos": 0,
        "boxPosMerge": 0,
        "count": 0,
        "items": [
          {
            "commerceFlag": 0,
            "desc": "string",
            "docID": "string",
            "foldHide": 0,
            "iconUrl": "string",
            "jumpInfo": {
              "appVersion": 0,
              "jumpType": 0,
              "userName": "string"
            },
            "reportId": "string",
            "report_extinfo_str": "string",
            "service": {
              "serviceList": null
            },
            "source": {
              "auth": 0,
              "tag": [
                {
                  "iconSize": 0,
                  "iconUrl": "string",
                  "noBg": true,
                  "title": "string",
                  "type": 0
                }
              ],
              "title": "string",
              "assuredBuy": 0
            },
            "style": 0,
            "title": "string",
            "titleTag": {
              "append": [
                {
                  "iconSize": 0,
                  "iconUrl": "string",
                  "noBg": true,
                  "title": "string",
                  "type": 0
                }
              ]
            }
          }
        ],
        "real_type": 0,
        "resultType": 0,
        "subType": 0,
        "title": "string",
        "totalCount": 0
      }
    ],
    "direction": 0,
    "isDivide": 0,
    "isHomePage": 0,
    "lang": "string",
    "offset": 0,
    "pageNumber": 0,
    "query": "string",
    "resultType": 0,
    "ret": 0,
    "searchID": "string",
    "timeStamp": 0
  }
}

Previous发送名片消息Next小程序Code

Last updated 1 year ago

🌨️