公众号信息
公众号信息
海量微信公众号信息可供获取
2.00元/100次 100.00元/10000次 1000.00元/200000次
(约元/天) 立即申请
公众号信息采集神器

覆盖海量公众号

覆盖海量公众号,包括服务号与订阅号

请求极速响应

高性能,速度快,支持高并发访问

检索方式灵活

支持以账号和关键词方式进行检索

function

功能介绍

海量微信公众号信息可供获取,公众号信息采集神器

功能介绍

方便获取公众号信息,基于关键词与微信公众号

功能介绍

索引海量公众号信息,并持续增加中

developer's

guide

开发指南
接口地址http://api-wx.abuyun.com/weixin/mp/account
返回格式JSON
请求方式GET/POST
请求示例http://api-wx.abuyun.com/weixin/mp/account?apiKey=您申请的apiKey&wxGuid=公众号ID
接口备注
请求参数说明
字段必填类型说明
apiKeystring申请的apiKey
wxGuidstring公众号ID,与关键词二选一。
keywordstring关键词,与公众号ID二选一。
pagestring第几页,默认第一页,每页20条
返回参数说明
字段类型说明
codestring状态码
messagestring错误提示
resultobject业务结果返回,参见json返回示例
JSON返回示例
                              
/****失败示例**/
{
	"message": "valid api key desired",
	"code": 10001
}

/****成功示例**/
{
	"code": 0,
	"result": [{
	  "WxGuid": "公众号ID",
	  "Name": "公众号名称",
	  "Logo": "公众号Logo",
	  "Owner": "认证主体",
	  "Intro": "简介"
	}]
}
                              
                            
系统级错误码参照
错误码说明
10001该服务需要apiKey
10002无效apiKey
10003该apiKey无请求权限
服务级错误码参照
错误码说明
60000201apiKey无此api请求权限
60000202缺少公众号或关键字参数
PHP
                              
    $apiUrl = "http://api-wx.abuyun.com/weixin/mp/account";

    $params = array(
        'apiKey' => '*******', //申请的apiKey
        'wxGuid' => '*******', //公众号ID
        'keyword' => '*******', //关键词
        'page' => '*******', //第几页
    );

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
    curl_setopt($ch, CURLOPT_TIMEOUT, 3);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
    curl_setopt($ch, CURLOPT_URL, $apiUrl);

    $response = curl_exec($ch);

    if ($response === FALSE) {
        return false;
    }
    curl_close( $ch );

    print_r($response);                              
                            
Java
                              
  import java.io.BufferedReader;
  import java.io.DataOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.io.UnsupportedEncodingException;
  import java.net.HttpURLConnection;
  import java.net.URL;
  import java.net.URLEncoder;
  import java.util.HashMap;
  import java.util.Map;

  import net.sf.json.JSONObject;

  public class Demo {
      public static final String DEF_CHATSET = "UTF-8";
      public static final int DEF_CONN_TIMEOUT = 30000;
      public static final int DEF_READ_TIMEOUT = 30000;

      //配置您申请的apiKey
      public static final String APIKEY ="*************************";

      public static void getRequest1(){
          String result = null;
          String url = "http://api-wx.abuyun.com/weixin/mp/account"; //接口地址

          Map params = new HashMap();//请求参数
          params.put("apiKey",APIKEY);
          params.put("wxGuid","");//公众号ID
          params.put("keyword","");//关键词
          params.put("page","");//第几页

          try {
              result = httpRequest(url, params, "GET");
              JSONObject object = JSONObject.fromObject(result);

              if(object.getInt("code") == 0) {
                  System.out.println(object.get("result"));
              } else {
                  System.out.println(object.get("code")+":"+object.get("message"));
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
      }

      public static void main(String[] args) {
      }

      /**
       *
       * @param strUrl 请求地址
       * @param params 请求参数
       * @param method 请求方法
       * @return  网络请求字符串
       * @throws Exception
       */
      public static String httpRequest(String strUrl, Map params,String method) throws Exception {
          HttpURLConnection conn = null;
          BufferedReader reader = null;
          String rs = null;

          try {
              StringBuffer sb = new StringBuffer();
              if (method == null || method.equals("GET")) {
                  strUrl = strUrl+"?"+urlencode(params);
              }

              URL url = new URL(strUrl);
              conn = (HttpURLConnection) url.openConnection();

              if (method == null || method.equals("GET")) {
                  conn.setRequestMethod("GET");
              } else {
                  conn.setRequestMethod("POST");
                  conn.setDoOutput(true);
              }

              conn.setUseCaches(false);
              conn.setConnectTimeout(DEF_CONN_TIMEOUT);
              conn.setReadTimeout(DEF_READ_TIMEOUT);
              conn.setInstanceFollowRedirects(false);
              conn.connect();

              if (params!= null && method.equals("POST")) {
                  try {
                      DataOutputStream out = new DataOutputStream(conn.getOutputStream());
                          out.writeBytes(urlencode(params));
                  } catch (Exception e) {
                      // TODO: handle exception
                  }
              }

              InputStream is = conn.getInputStream();
              reader = new BufferedReader(new InputStreamReader(is, DEF_CHATSET));
              String strRead = null;

              while ((strRead = reader.readLine()) != null) {
                  sb.append(strRead);
              }

              rs = sb.toString();
          } catch (IOException e) {
              e.printStackTrace();
          } finally {
              if (reader != null) {
                  reader.close();
              }
              if (conn != null) {
                  conn.disconnect();
              }
          }
          return rs;
      }

      //将map型转为请求参数型
      public static String urlencode(Mapdata) {
          StringBuilder sb = new StringBuilder();

          for (Map.Entry i : data.entrySet()) {
              try {
                  sb.append(i.getKey()).append("=").append(URLEncoder.encode(i.getValue()+"","UTF-8")).append("&");
              } catch (UnsupportedEncodingException e) {
                  e.printStackTrace();
              }
          }

          return sb.toString();
      }
  }                              
                            
Python
                              
    # -*- coding: utf-8 -*-

    import json, urllib
    from urllib import urlencode

    def main():
        #配置您申请的apiKey
        apiKey = "*********************"

        request1(apiKey,"GET")

    def request1(apiKey, m="GET"):
        url = "http://api-wx.abuyun.com/weixin/mp/account"
        params = {
            "apiKey" : apiKey,
            "wxGuid" : "",
            "keyword" : "",
            "page" : "",
        }
        params = urlencode(params)
        if m == "GET":
            f = urllib.urlopen("%s?%s" % (url, params))
        else:
            f = urllib.urlopen(url, params)

        content = f.read()
        res = json.loads(content)
        if res:
            code = res["code"]
            if code == 0:
                #成功请求
                print res["result"]
            else:
                print "%s:%s" % (res["code"],res["message"])
        else:
            print "request api error"

    if __name__ == '__main__':
        main()                              
                            
体验服务
现在开始,体验阿布云大数据服务
计算、网络、大数据、人工智能,阿布云助您飞跃发展