微信数据接口


实时获取公众号文章阅读

<h5>简要描述</h5> <ul> <li>实时获取公众号文章阅读、点赞、在看数</li> </ul> <h5>收费标准</h5> <ul> <li><code>按调用次数:1分钱/次</code></li> </ul> <h5>请求URL</h5> <ul> <li><code>http://data.wxrank.com/weixin/getrk</code></li> </ul> <pre><code>// 尽量采用post请求方式,减少url编码出现的问题 curl --location &amp;#039;http://data.wxrank.com/weixin/getrk&amp;#039; \ --header &amp;#039;Content-Type: application/json&amp;#039; \ --data &amp;#039;{     &amp;quot;key&amp;quot;: &amp;quot;xxx&amp;quot;,     &amp;quot;url&amp;quot;: &amp;quot;https://mp.weixin.qq.com/s?__biz=MzAwNDE0ODI4Mg==&amp;amp;mid=2650802020&amp;amp;idx=1&amp;amp;sn=871211a526b20fab9513d93f3e3e124c&amp;amp;chksm=80c4fa31b7b37327272d602bfea5fd0390c880090d74dd996c615867aba151ff0bba9262baa1&amp;amp;scene=126&amp;amp;sessionid=1728479244#rd&amp;quot; }&amp;#039;</code></pre> <p>&gt; python语言调用示例</p> <pre><code>import requests import json apikey = &amp;#039;your_api_key&amp;#039;; url = &amp;#039;http://data.wxrank.com/weixin/getrk&amp;#039; data = { &amp;quot;key&amp;quot;: apikey, &amp;quot;url&amp;quot;: &amp;quot;https://mp.weixin.qq.com/s?__biz=MzAwNDE0ODI4Mg==&amp;amp;mid=2650802020&amp;amp;idx=1&amp;amp;sn=871211a526b20fab9513d93f3e3e124c&amp;amp;chksm=80c4fa31b7b37327272d602bfea5fd0390c880090d74dd996c615867aba151ff0bba9262baa1&amp;amp;scene=126&amp;amp;sessionid=1728479244#rd&amp;quot; } headers = { &amp;#039;Content-Type&amp;#039;: &amp;#039;application/json&amp;#039; } response = requests.post(url, headers=headers, data=json.dumps(data)) print(response.text) </code></pre> <h5>请求方式</h5> <ul> <li>GET / POST</li> </ul> <p><code>如果以get方式请求,url务必要做urlencode,因为url链接中往往会有&amp;amp;连接符,需要转义处理</code></p> <h5>参数</h5> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">key</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>密钥</td> </tr> <tr> <td style="text-align: left;">url</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>文章链接,仅支持长链接(例如:<a href="https://mp.weixin.qq.com/s?__biz=xxx==&amp;mid=xxx&amp;idx=1&amp;sn=xxx">https://mp.weixin.qq.com/s?__biz=xxx==&amp;mid=xxx&amp;idx=1&amp;sn=xxx</a>)</td> </tr> <tr> <td style="text-align: left;">comment_id</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>文章留言id,如果需要返回留言数,需要提供该参数</td> </tr> </tbody> </table> <p>&gt; url若是短链,需要提前转一下长链,通过文章解析接口:<a href="https://www.showdoc.com.cn/2343746579263506/11558501783383049">https://www.showdoc.com.cn/2343746579263506/11558501783383049</a> <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=5b9e336184fa040a1a34c6fff3868ae1&amp;amp;file=file.png" alt="" /></p> <h5>返回示例</h5> <pre><code>{     &amp;quot;code&amp;quot;: 0,     &amp;quot;data&amp;quot;: {         &amp;quot;read_num&amp;quot;: 10623,         &amp;quot;like_num&amp;quot;: 11,         &amp;quot;look_num&amp;quot;: 7,         &amp;quot;share_num&amp;quot;: 33, &amp;quot;comment_num&amp;quot;: 8     },     &amp;quot;msg&amp;quot;: &amp;quot;剩余32653积分&amp;quot; }</code></pre> <h5>返回参数说明</h5> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">read_num</td> <td style="text-align: left;">int</td> <td>阅读数</td> </tr> <tr> <td style="text-align: left;">like_num</td> <td style="text-align: left;">int</td> <td>点赞数(大拇指)</td> </tr> <tr> <td style="text-align: left;">look_num</td> <td style="text-align: left;">int</td> <td>在看数(爱心图标)</td> </tr> <tr> <td style="text-align: left;">share_num</td> <td style="text-align: left;">int</td> <td>分享数(转发图标)</td> </tr> <tr> <td style="text-align: left;">comment_num</td> <td style="text-align: left;">int</td> <td>留言数,传comment_id才会返回该数据</td> </tr> </tbody> </table> <h5>备注</h5> <p>&gt; <code>code 状态判断</code></p> <ul> <li>0:获取成功</li> <li>1000:积分不足</li> <li>1001:文章链接为空(必须是公众号文章链接)</li> <li>1002:文章验证失败(文章链接解析失败)</li> <li>1003:获取失败,请重试</li> <li>1004:服务异常,请重试</li> <li>9999:QPS超过上限,请稍后再试(每秒不能超过10个)</li> </ul> <p>&gt; 提醒:code=0,扣积分</p>

页面列表

ITEM_HTML