公众号文章更新监测
公众号文章更新监测
实时监测公众号文章更新并向用户进行推送
1元/100次 100元/20000次 500元/200000次
(约元/天) 立即申请
公众号文章数据监测神器

方便快捷监测

支持获取多种方式获取公众号数据

覆盖海量文章

覆盖绝大部分热门公众号,且不断增加中

请求快速响应

支持高并发且响应极速

function

功能介绍

实时监测公众号文章更新并向用户进行推送,公众号文章数据监测神器

功能介绍

微信公众号文章采集,速度快,支持高并发访问

功能介绍

支持两种方式监测:1.关键词搜索 2.微信号搜索

功能介绍

方便用于舆情监测等各方面应用场景

developer's

guide

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

/****成功示例**/
{
    "code": 0,
    "result": {
        "page": 1,
        "pageSize": 10,
        "total": 20,
        "list":[
            "Account": { //公众号信息
                "WxGuid": "公众号ID",
                "Intro": "公众号简介",
                "Name": "公众号名称",
                "Owner": "公众号认证主体"
            },
            "Title": "文章标题",
            "Abstract": "简介",
            "PublishTime": "发布时间",
            "Content": "内容",
            "Source": "来源",
            }
        ]
}
                              
                            
系统级错误码参照
错误码说明
10001该服务需要apiKey
10002无效apiKey
10003该apiKey无请求权限
服务级错误码参照
错误码说明
60000301apiKey无此api请求权限
60000302缺少公众号或关键字参数
60000303查询结束时间错误或者小于开始时间
PHP
                              
    $apiUrl = "http://api-wx.abuyun.com/weixin/mp/article";

    $params = array(
      'apiKey' => '*******', //申请的apiKey
      'wxGuid' => '*******', //公众号ID
      'keyword' => '*******', //关键词
      'pageSize' => 20,
      'page' => 1,
      'beginDate' => '2018-03-01', //查询开始时间
      'endDate' => '2018-03-01', //查询结束时间
    );

    $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/article"; //接口地址

            Map params = new HashMap();//请求参数
            params.put("domain","");//需要监测的域名
            params.put("apiKey",APIKEY);
            params.put("wxGuid","");
            params.put("keyword","");
            params.put("pageSize",20);
            params.put("page",1);
            params.put("beginDate","2018-03-01");
            params.put("endDate","2018-03-01");

            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/article"
        params = {
            "apiKey" : apiKey,
            "wxGuid" : "",
            "keyword" : "",
            "pageSize" : 20,
            "page" : 1,
            "beginDate" : "2018-03-01",
            "endDate" : "2018-03-01",
        }
        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()                              
                            
体验服务
现在开始,体验阿布云大数据服务
计算、网络、大数据、人工智能,阿布云助您飞跃发展