Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

WeChat MP Account Profile

API 文件
https://api.sandbase.ai/v1/api/wechat-mp/v2/account-profile

Retrieves the profile details of an official WeChat account, including name, avatar, signature, and verification entity type using its official account ID.

價格
$0.01美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 1 個選填

Playground

輸入
Official account `gh_username` (`gh_…`). Sources: `content.user_name` from article detail, or `jumpInfo.userName` from WeChat Search V2 `fetch_search` (business_type=account) results. E.g. `gh_363b924965e9`
Optional, default True. True=raw; False=simplified parsing.
輸出範例
回應outputs · 24.7 KB · 646 行
[
  {
    "data": {
      "accountInfo": {
        "banReason": "",
        "banType": 0,
        "pbRequestMsgInfo": null,
        "serviceType": 0,
        "userName": "gh_363b924965e9",
        "userRole": 0
      },
      "aiChatInfo": {
        "aiChatOpen": 2,
        "extInfo": "",
        "pbRequestMsgInfo": null,
        "pollInterval": 180,
        "reportExtInfo": "",
        "roomInfo": "",
        "stringBizuin": "MjM5MjAxNDM4MA=="
      },
      "aiIvrReplyInfo": {
        "aiReplyOpen": 0,
        "pbRequestMsgInfo": null,
        "wording": ""
      },
      "articleTab": {
        "msgList": {
          "featuredList": [],
          "featuredUpdateTime": 1790688730,
          "hideList": false,
          "msg": [
            {
              "appMsg": {
                "baseInfo": {
                  "appMsgId": 2667036897,
                  "bigPic": 1,
                  "createTime": 1790687968,
                  "hasExpanded": false,
                  "pbRequestMsgInfo": null,
                  "type": 9,
                  "updateTime": 1790688728
                },
                "detailInfo": [
                  "…"
                ],
                "pbRequestMsgInfo": null
              },
              "baseInfo": {
                "dateTime": 1790687967,
                "funcFlag": 0,
                "msgId": 2667036897,
                "msgType": 49,
                "pbRequestMsgInfo": null,
                "status": 0,
                "uniqueId": "0_2667036897",
                "virtualMsgType": 0
              },
              "featuredExposed": false,
              "image": null,
              "pbRequestMsgInfo": null,
              "text": null,
              "video": null,
              "voice": null
            },
            {
              "appMsg": {
                "baseInfo": {
                  "appMsgId": 2667036881,
                  "bigPic": 1,
                  "createTime": 1790685094,
                  "hasExpanded": false,
                  "pbRequestMsgInfo": null,
                  "type": 9,
                  "updateTime": 1790686415
                },
                "detailInfo": [
                  "…"
                ],
                "pbRequestMsgInfo": null
              },
              "baseInfo": {
                "dateTime": 1790685600,
                "funcFlag": 0,
                "msgId": 2667036881,
                "msgType": 49,
                "pbRequestMsgInfo": null,
                "status": 0,
                "uniqueId": "0_2667036881",
                "virtualMsgType": 0
              },
              "featuredExposed": false,
              "image": null,
              "pbRequestMsgInfo": null,
              "text": null,
              "video": null,
              "voice": null
            },
            "… 8 more items in the full response"
          ],
          "pagingInfo": {
            "isEnd": 0,
            "offset": "WABgAGiBoIC+n+PR3Wo=",
            "pbRequestMsgInfo": null
          },
          "pbRequestMsgInfo": null,
          "poiInfo": null
        },
        "pbRequestMsgInfo": null,
        "show": true,
        "topicList": {
          "pbRequestMsgInfo": null,
          "title": "Top Topics",
          "topic": []
        }
      },
      "audioTab": {
        "msgList": {
          "featuredList": [],
          "featuredUpdateTime": 1790688730,
          "hideList": false,
          "msg": [],
          "pagingInfo": {
            "isEnd": 1,
            "offset": "WABgAGgAcAA=",
            "pbRequestMsgInfo": null
          },
          "pbRequestMsgInfo": null,
          "poiInfo": null
        },
        "pbRequestMsgInfo": null,
        "show": false,
        "topicList": {
          "pbRequestMsgInfo": null,
          "title": "Top Topics",
          "topic": []
        }
      },
      "baseInfo": {
        "bizRecommendUrl": "",
        "friendSubscribeCount": 0,
        "friendSubscribeStr": "",
        "isSubscribed": 0,
        "nickNameWhenSubscribe": "",
        "originalArticleCount": 795,
        "originalContentStr": "795 original articles",
        "pbRequestMsgInfo": null
      },
      "baseResponse": {
        "errMsg": {
          "pbRequestMsgInfo": null,
          "string": ""
        },
        "pbRequestMsgInfo": null,
        "ret": 0
      },
      "brandInfo": null,
      "debug_id": "7f6fa333",
      "debug_info": "gAAAAABqu8jtfBR6tZGGZbPCiOFrlw58nRRxdbKniT2hJbtuobsz1hY44_O3YIp_twWSmWr2wsRPhVa7712o2uKsWbn5LxmcD0msZO9x1jFIrUxNs_Uwgnn30YRLxihF_sYFK_C350R_gtsTAydZaPjun1cpeWJssmTXNDgEbxyK651qbWJi0u7PrRNYD4ofHYkL00aMVdRnO-SX1NFM6xnDbNOpxTuaGmQDiAL8HBQgk6cvb2Xj13RSmuTPDfkzWCCsGe93C4TrQ1fFXNvCAd1a5TBAzmpEAw==",
      "finderVideoIsBizMode": false,
      "funcFlag": 64,
      "funcFlagWording": [
        {
          "funcFlag": 64,
          "jumpUrl": "",
          "pbRequestMsgInfo": null,
          "wording": "Follow the Official Account to watch more videos"
        }
      ],
      "gender": 0,
      "hideMsgList": false,
      "introRichContent": null,
      "ipwording": "北京",
      "liveExtInfo": null,
      "liveInfo": [],
      "liveInfoV2": null,
      "loveStatus": null,
      "msgList": {
        "featuredList": [],
        "featuredUpdateTime": 1790688730,
        "hideList": false,
        "msg": [
          {
            "appMsg": {
              "baseInfo": {
                "appMsgId": 2667036897,
                "bigPic": 1,
                "createTime": 1790687968,
                "hasExpanded": false,
                "pbRequestMsgInfo": null,
                "type": 9,
                "updateTime": 1790688728
              },
              "detailInfo": [
                {
                  "appEditJumpUrl": "",
                  "audioDuRation": 0,
                  "audioId": 0,
                  "audioPlayUrl": "",
                  "authorDesc": "",
                  "canModifyByWxa": 0,
                  "contentUrl": "http://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667036897&idx=1&sn=114b0005f5d6c47e4aa1b1d431980ba1&chksm=bc309ed1292bf53451ab6910b440beffacef5c980847b6a65445709fa619279b9c048fba6938&scene=126&sessionid=0#rd",
                  "coverImgUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXsJHOMd8MXUs8ruLTCBeRx0sqmwfMJMbzuQb3e7hzfeHeusfF4iamvCEVTWk0DN09dSnpzicibYJIUTkaXqpZTgXO6rdGOvcLo65A/640?wxtype=jpeg&wxfrom=25",
                  "coverImgUrl11": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXv9aCvIvx5OhEXmiaXTY8oNbWmqfZ2xBcVbCeKBt9D1a04MSrnRqFaUUdOqJeUyex0kNdicf805xEibWQ6bO0a1pUyHD5tlKZAhfk/300?wxtype=jpeg&wxfrom=25",
                  "coverImgUrl169": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXsJHOMd8MXUs8ruLTCBeRx0sqmwfMJMbzuQb3e7hzfeHeusfF4iamvCEVTWk0DN09dSnpzicibYJIUTkaXqpZTgXO6rdGOvcLo65A/640?wxtype=jpeg&wxfrom=25",
                  "coverImgUrl169640": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXsJHOMd8MXUs8ruLTCBeRx0sqmwfMJMbzuQb3e7hzfeHeusfF4iamvCEVTWk0DN09dSnpzicibYJIUTkaXqpZTgXO6rdGOvcLo65A/640?wxtype=jpeg&wxfrom=25",
                  "coverImgUrl2351": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXsJHOMd8MXUs8ruLTCBeRx0sqmwfMJMbzuQb3e7hzfeHeusfF4iamvCEVTWk0DN09dSnpzicibYJIUTkaXqpZTgXO6rdGOvcLo65A/640?wxtype=jpeg&wxfrom=25",
                  "coverimgurl34": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXsJHOMd8MXUs8ruLTCBeRx0sqmwfMJMbzuQb3e7hzfeHeusfF4iamvCEVTWk0DN09dSnpzicibYJIUTkaXqpZTgXO6rdGOvcLo65A/540?wxtype=jpeg&wxfrom=25",
                  "createTime": 0,
                  "digest": "",
                  "featuredInfo": "…",
                  "finderFeedXml": "",
                  "finderLive": null,
                  "isModified": 0,
                  "isPaid": 0,
                  "isPaySubscribe": 0,
                  "itemIndex": 1,
                  "itemShowType": 0,
                  "listenItem": "",
                  "listenItemExt": null,
                  "moreActionJumpUrl": "",
                  "msgid": 0,
                  "nonceId": "",
                  "pbRequestMsgInfo": null,
                  "picCount": 0,
                  "picUrls": null,
                  "poiInfo": null,
                  "preloadPictureInfo": "…",
                  "sendTime": 1790687981,
                  "shortShowDesc": "5504 likes  ",
                  "showDesc": "100k+ reads  5504 likes  ",
                  "sourceUrl": "https://www.peopleapp.com",
                  "textTitle": "",
                  "tid": "",
                  "title": "【夜读】你相信什么,就会发生什么",
                  "…": "7 more fields in the full response"
                }
              ],
              "pbRequestMsgInfo": null
            },
            "baseInfo": {
              "dateTime": 1790687967,
              "funcFlag": 0,
              "msgId": 2667036897,
              "msgType": 49,
              "pbRequestMsgInfo": null,
              "status": 0,
              "uniqueId": "0_2667036897",
              "virtualMsgType": 0
            },
            "featuredExposed": false,
            "image": null,
            "pbRequestMsgInfo": null,
            "text": null,
            "video": null,
            "voice": null
          },
          {
            "appMsg": {
              "baseInfo": {
                "appMsgId": 2667036881,
                "bigPic": 1,
                "createTime": 1790685094,
                "hasExpanded": false,
                "pbRequestMsgInfo": null,
                "type": 9,
                "updateTime": 1790686415
              },
              "detailInfo": [
                {
                  "appEditJumpUrl": "",
                  "audioDuRation": 0,
                  "audioId": 0,
                  "audioPlayUrl": "",
                  "authorDesc": "",
                  "canModifyByWxa": 0,
                  "contentUrl": "http://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667036881&idx=1&sn=653000c2b7685c29df1a90d978658625&chksm=bce8248c17752f43405410f74c9c5a982ebf8cbdd206e6033f9ac5a14788be76b7eef0017f81&scene=126&sessionid=0#rd",
                  "coverImgUrl": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXugWmGWeF2c8ovf9GMKJOheTicvJuUlOaWr9lrBdZ8ic0PqFSibsTRJibN0799COqMlO9AzO95hiczSJBRdLQJIRiaiccBt0ibSlZpfWoc/640?wxtype=jpeg&wxfrom=25",
                  "coverImgUrl11": "https://mmbiz.qpic.cn/mmbiz_jpg/QaRWjMxooXvnX00BvReUe2cgrFCgMJIrDM00j4Xb3TDkjkWQ45n9czxuHzroZyTpZauhw6G9olXRicTn00Y8TOcaNv0vElgg0luwAYosHBaE/300?wxtype=jpeg&wxfrom=25",
                  "coverImgUrl169": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXugWmGWeF2c8ovf9GMKJOheTicvJuUlOaWr9lrBdZ8ic0PqFSibsTRJibN0799COqMlO9AzO95hiczSJBRdLQJIRiaiccBt0ibSlZpfWoc/640?wxtype=jpeg&wxfrom=25",
                  "coverImgUrl169640": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXugWmGWeF2c8ovf9GMKJOheTicvJuUlOaWr9lrBdZ8ic0PqFSibsTRJibN0799COqMlO9AzO95hiczSJBRdLQJIRiaiccBt0ibSlZpfWoc/640?wxtype=jpeg&wxfrom=25",
                  "coverImgUrl2351": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXugWmGWeF2c8ovf9GMKJOheTicvJuUlOaWr9lrBdZ8ic0PqFSibsTRJibN0799COqMlO9AzO95hiczSJBRdLQJIRiaiccBt0ibSlZpfWoc/640?wxtype=jpeg&wxfrom=25",
                  "coverimgurl34": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/QaRWjMxooXugWmGWeF2c8ovf9GMKJOheTicvJuUlOaWr9lrBdZ8ic0PqFSibsTRJibN0799COqMlO9AzO95hiczSJBRdLQJIRiaiccBt0ibSlZpfWoc/540?wxtype=jpeg&wxfrom=25",
                  "createTime": 0,
                  "digest": "",
                  "featuredInfo": "…",
                  "finderFeedXml": "",
                  "finderLive": null,
                  "isModified": 0,
                  "isPaid": 0,
                  "isPaySubscribe": 0,
                  "itemIndex": 1,
                  "itemShowType": 0,
                  "listenItem": "",
                  "listenItemExt": null,
                  "moreActionJumpUrl": "",
                  "msgid": 0,
                  "nonceId": "",
                  "pbRequestMsgInfo": null,
                  "picCount": 0,
                  "picUrls": null,

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

WeChat MP Account Profile API

Returns the profile of an official WeChat account, plus its most recent published articles. It needs the account's gh_ username in username.

Use cases

  • Check how many original articles an official account has published.
  • Pull the latest article links and publish times for an account to track its posting activity.
  • Read the account's IP location label for a profile record.
  • Page through an account's message list with the returned offset cursor.

Request

curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/v2/account-profile" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "gh_363b924965e9"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
usernamestringYesOfficial account gh_username (gh_…). Sources: content.user_name from article detail, or jumpInfo.userName from WeChat Search V2 fetch_search (business_type=account) results. E.g. gh_363b924965e9
rawbooleanNoOptional, default True. True=raw; False=simplified parsing.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "accountInfo": {
    "banReason": "",
    "banType": 0,
    "pbRequestMsgInfo": null,
    "serviceType": 0,
    "userName": "gh_363b924965e9",
    "userRole": 0
  },
  "aiChatInfo": {
    "aiChatOpen": 2,
    "extInfo": "",
    "pbRequestMsgInfo": null,
    "pollInterval": 180,
    "reportExtInfo": "",
    "roomInfo": "",
    "stringBizuin": "MjM5MjAxNDM4MA=="
  },
  "aiIvrReplyInfo": {
    "aiReplyOpen": 0,
    "pbRequestMsgInfo": null,
    "wording": ""
  },
  "articleTab": {
    "msgList": {
      "featuredList": [],
      "featuredUpdateTime": 1793688509,
      "hideList": false,
      "msg": [
        {
          "appMsg": {
            "baseInfo": {
              "appMsgId": 2667043262,
              "bigPic": 1,
              "createTime": 1793687341,
              "hasExpanded": false,
              "pbRequestMsgInfo": null,
              "type": 9,
              "updateTime": 1793688161
            },
            "detailInfo": [
              {
                "appEditJumpUrl": "",
                "audioDuRation": 0,
                "audioId": 0,
                "audioPlayUrl": "",
                "authorDesc": "",
                "bizRecommendInfo": null,
                "canModifyByWxa": 0,
                "contentUrl": "http://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667043262&idx=1&sn=efc2247…"
              }
            ],
            "pbRequestMsgInfo": null
          },
          "baseInfo": {
            "dateTime": 1793687341,
            "funcFlag": 0,
            "msgId": 2667043262,
            "msgType": 49,
            "pbRequestMsgInfo": null,
            "status": 0,
            "uniqueId": "0_2667043262",
            "virtualMsgType": 0
          },
          "featuredExposed": false,
          "image": null,
          "pbRequestMsgInfo": null,
          "text": null,
          "video": null,
          "voice": null
        }
      ],
      "pagingInfo": {
        "isEnd": 0,
        "offset": "WABgAGiBpOW+74vB9Go=",
        "pbRequestMsgInfo": null
      },
      "pbRequestMsgInfo": null,
      "poiInfo": null,
      "recommendSetting": null
    },
    "pbRequestMsgInfo": null,
    "show": true,
    "topicList": {
      "pbRequestMsgInfo": null,
      "title": "Top Topics",
      "topic": []
    }
  },
  "audioTab": {
    "msgList": {
      "featuredList": [],
      "featuredUpdateTime": 1793688509,
      "hideList": false,
      "msg": [],
      "pagingInfo": {
        "isEnd": 1,
        "offset": "WABgAGgAcAA=",
        "pbRequestMsgInfo": null
      },
      "pbRequestMsgInfo": null,
      "poiInfo": null,
      "recommendSetting": null
    },
    "pbRequestMsgInfo": null,
    "show": false,
    "topicList": {
      "pbRequestMsgInfo": null,
      "title": "Top Topics",
      "topic": []
    }
  },
  "baseInfo": {
    "bizRecommendUrl": "",
    "friendSubscribeCount": 0,
    "friendSubscribeStr": "",
    "isFans": 0,
    "isSubscribed": 0,
    "nickNameWhenSubscribe": "",
    "originalArticleCount": 1133,
    "originalContentStr": "1133 original articles",
    "pbRequestMsgInfo": null
  },
  "baseResponse": {
    "errMsg": {
      "pbRequestMsgInfo": null,
      "string": ""
    },
    "pbRequestMsgInfo": null,
    "ret": 0
  },
  "bindPoiInfo": null,
  "brandInfo": null,
  "debug_id": "b7b56c11",
  "debug_info": "gAAAAABq6ZEysXRPJLLgIxJIvLQd0bAzwA_WC34pPQO1EI1FDQy_kN3H5CloQ309xS0gUmx69615uZLF…",
  "finderVideoIsBizMode": false
}

Response fields

FieldMeaning
accountInfo.userNameThe gh_ username of the account, matching the value you sent.
baseInfo.originalArticleCount / baseInfo.originalContentStrNumber of original articles the account has published, as a number and as a display string such as 1133 original articles.
ipwordingIP location label shown for the account, for example 北京.
msgList.msg[].appMsg.detailInfo[].contentUrlLink to an article published by the account.
msgList.msg[].appMsg.baseInfo.appMsgIdID of the article message. It also appears in the article link as mid.
msgList.msg[].appMsg.baseInfo.createTime / msgList.msg[].appMsg.baseInfo.updateTimeUnix timestamps in seconds for when the article was created and last updated.
msgList.msg[].baseInfo.uniqueIdUnique ID of the message in the list, formatted like 0_2667043262.
msgList.pagingInfo.isEnd / msgList.pagingInfo.offsetisEnd shows whether the list has ended (1 means it has). offset is a cursor string for the next page of messages.
articleTab.msgList.msg / audioTab.msgList.msg / pictextTab.msgList.msgThe same message list split by tab: articles, audio and picture-text posts.
baseResponse.retStatus code of the lookup. 0 appears in this response.

Notes

  • Get username from content.user_name in WeChat MP Article Detail, or from jumpInfo.userName in WeChat Search V2 fetch_search results with business_type=account.
  • username must match gh_ followed by letters, digits or underscores, up to 64 characters.
  • raw is optional and defaults to true. Set it to false for simplified parsing.
  • For a dedicated article list, call WeChat MP Account Articles.

Pricing

$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON
WeChat MP每次呼叫 $0.01JSON

指南:Best WeChat MP API in 2026: Pricing Compared

問題

常見問題

我要如何使用 WeChat MP Account Profile API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/wechat-mp/v2/account-profile。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

WeChat MP Account Profile API 的費用是多少?

每次 $0.01,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

WeChat MP Account Profile API 接受哪些參數?

必要:username (string)。 選填:raw (boolean)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

WeChat MP Account Profile API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 WeChat MP 開發者帳號或 API 金鑰嗎?

不需要。WeChat MP Account Profile 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 WeChat MP API 存取權。