微信数据接口


实时获取公众号文章留言(回复评论)

<h5>简要描述</h5> <ul> <li>实时获取公众号文章留言列表,支持分页(每页最多100条)</li> </ul> <h5>收费标准</h5> <ul> <li><code>按调用次数:2分钱/次</code></li> </ul> <h5>请求URL</h5> <ul> <li><code>http://data.wxrank.com/weixin/getcm</code></li> </ul> <pre><code>curl --location &amp;#039;http://data.wxrank.com/weixin/getcm&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;comment_id&amp;quot;: &amp;quot;4179037266066489354&amp;quot;, &amp;quot;buffer&amp;quot;: &amp;quot;&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/getcm&amp;#039; data = { &amp;quot;key&amp;quot;: apikey, &amp;quot;comment_id&amp;quot;: &amp;quot;4179037266066489354&amp;quot;, &amp;quot;buffer&amp;quot;: &amp;quot;&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> <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;">comment_id</td> <td style="text-align: left;">是</td> <td style="text-align: left;">bigint</td> <td>文章留言id</td> </tr> <tr> <td style="text-align: left;">buffer</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>分页游标,用来获取下一页</td> </tr> </tbody> </table> <p>&gt; 怎么获取comment_id呢?通过文章内容解析接口:<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=698ad9a19d3b3834d83156c0643fe49e&amp;amp;file=file.png" alt="" /></p> <h5>返回示例</h5> <pre><code>{     &amp;quot;code&amp;quot;: 0,     &amp;quot;msg&amp;quot;: &amp;quot;剩余681积分&amp;quot;,     &amp;quot;data&amp;quot;: {         &amp;quot;total_count&amp;quot;: 151,         &amp;quot;buffer&amp;quot;: &amp;quot;GEAwAA==&amp;quot;,         &amp;quot;comment_list&amp;quot;: [             {                 &amp;quot;id&amp;quot;: &amp;quot;4308035335293501536&amp;quot;,                 &amp;quot;content&amp;quot;: &amp;quot;不是你个人的问题,整个社会生态的问题。用老百姓的话说,没有盼头儿了。当下环境对于大多数来说,就是没有盼头儿,死气沉沉,得过且过。&amp;quot;,                 &amp;quot;like_num&amp;quot;: 84,                 &amp;quot;ip_wording&amp;quot;: {                     &amp;quot;city_id&amp;quot;: &amp;quot;&amp;quot;,                     &amp;quot;city_name&amp;quot;: &amp;quot;&amp;quot;,                     &amp;quot;country_id&amp;quot;: &amp;quot;156&amp;quot;,                     &amp;quot;country_name&amp;quot;: &amp;quot;中国&amp;quot;,                     &amp;quot;province_id&amp;quot;: &amp;quot;&amp;quot;,                     &amp;quot;province_name&amp;quot;: &amp;quot;河北&amp;quot;                 },                 &amp;quot;nick_name&amp;quot;: &amp;quot;远方&amp;quot;,                 &amp;quot;logo_url&amp;quot;: &amp;quot;http://wx.qlogo.cn/mmopen/m3icMKZvmGp9NjvzGAW7zMnF7149uHCfJd8js6ygR8yQWqSmygJ40rIw3wem3SeeDPrhnetHCPx8LlY6TUVCVTl3IkjmfaQ6ic/64&amp;quot;,                 &amp;quot;create_time&amp;quot;: &amp;quot;2025-09-27 11:01:37&amp;quot;,                 &amp;quot;new_reply_list&amp;quot;: {                     &amp;quot;max_reply_id&amp;quot;: 17,                     &amp;quot;reply_total_cnt&amp;quot;: 13,                     &amp;quot;reply_list&amp;quot;: [                         {                             &amp;quot;content&amp;quot;: &amp;quot;尤其结婚后&amp;quot;,                             &amp;quot;like_num&amp;quot;: 10,                             &amp;quot;create_time&amp;quot;: &amp;quot;2025-09-27 12:40:27&amp;quot;                         },                         {                             &amp;quot;content&amp;quot;: &amp;quot;还不如父母那辈子,人人都种地,比现在快咯&amp;quot;,                             &amp;quot;like_num&amp;quot;: 26,                             &amp;quot;create_time&amp;quot;: &amp;quot;2025-09-27 12:44:36&amp;quot;                         },                         {                             &amp;quot;content&amp;quot;: &amp;quot;我觉得那是你没有经历过八九十年代。我85年的,当时九十年代初去我爷爷家。晚秋很多人都是大赤脚。很多小孩子没上衣。五十多岁的老农民一嘴牙齿都掉光了,人就和行尸走肉一样,看到我笑容都是挤出去的。\n后面92、3年开始下岗潮,我们这个城市工厂倒闭了三分之二。很多工人一夜之间双职工下岗。自杀喝药的比比皆是。当时我记得很多下岗工人穿着很体面的西装,等到晚上偷偷去菜市场捡烂菜叶。\n不要总是自己没经历过就说别人的日子好过&amp;quot;,                             &amp;quot;like_num&amp;quot;: 33,                             &amp;quot;create_time&amp;quot;: &amp;quot;2025-09-27 17:56:20&amp;quot;                         }                     ]                 }             },             {                 &amp;quot;id&amp;quot;: &amp;quot;9612376162680438812&amp;quot;,                 &amp;quot;content&amp;quot;: &amp;quot;同互联网大厂,同大龄已婚育女性,同高位上车买二房,还买了个BBA,去年8月大厂毕业的,后面也焦虑了几个月,每天胡思乱想,都想去厂里打螺丝了,当时最大的感觉就是已经分辨不出自己在这个社会上的位置和价值了,后面阴差阳错找了个连之前工资零头都不到的工作,好处就是双休九到六不加班,每天到点就走,工作内容也是一天一两个的小时就能完成,但个人成就感啥的就不用再想了。现在还是在经常性的反思中,反思如何在这逆增长的环境里找到自己。楼主说的心气这个东西,我最近一直在有意识的让自己让别人看起来轻快愉悦美丽和充满朝气,我们未来要想生活的过去,我觉得还得继续工作或者说产生价值20年左右,其实相对比就是我们毕业到现在一样长的时间,我觉得有意识的好好规划下,还是可以过好的,所以加油,慢慢积攒好自己的心气,在人生之路上再出发!&amp;quot;,                 &amp;quot;like_num&amp;quot;: 14,                 &amp;quot;ip_wording&amp;quot;: {                     &amp;quot;city_id&amp;quot;: &amp;quot;&amp;quot;,                     &amp;quot;city_name&amp;quot;: &amp;quot;&amp;quot;,                     &amp;quot;country_id&amp;quot;: &amp;quot;156&amp;quot;,                     &amp;quot;country_name&amp;quot;: &amp;quot;中国&amp;quot;,                     &amp;quot;province_id&amp;quot;: &amp;quot;&amp;quot;,                     &amp;quot;province_name&amp;quot;: &amp;quot;河北&amp;quot;                 },                 &amp;quot;nick_name&amp;quot;: &amp;quot;奇珍异宝&amp;quot;,                 &amp;quot;logo_url&amp;quot;: &amp;quot;http://wx.qlogo.cn/mmopen/WTAJjoicPvd3I2t528icMRlpMfk9fjQJmEA4B8saUg8ibKibLsSWT3Sic3JYd87Wrp6dpqhWLRmmW3zD2VoxdWm2zs2cBQHHouhyia6IwGDKKtZuNib7aPRwcqicPlmf1NRTbREB/64&amp;quot;,                 &amp;quot;create_time&amp;quot;: &amp;quot;2025-09-27 12:05:54&amp;quot;             }         ],         &amp;quot;comment_total_cnt&amp;quot;: 64,         &amp;quot;continue_flag&amp;quot;: true     } }</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;">buffer</td> <td style="text-align: left;">string</td> <td>分页游标</td> </tr> <tr> <td style="text-align: left;">total_count</td> <td style="text-align: left;">int</td> <td>留言总数</td> </tr> <tr> <td style="text-align: left;">comment_total_cnt</td> <td style="text-align: left;">int</td> <td>一级留言总数(不包括回复的),可以用此参数来判断是否需要翻页</td> </tr> <tr> <td style="text-align: left;">comment_list</td> <td style="text-align: left;">list</td> <td>留言列表,包括一级留言和回复留言</td> </tr> <tr> <td style="text-align: left;">comment_list[].id</td> <td style="text-align: left;">int</td> <td>留言ID,唯一值</td> </tr> <tr> <td style="text-align: left;">comment_list[].content</td> <td style="text-align: left;">string</td> <td>留言内容</td> </tr> <tr> <td style="text-align: left;">comment_list[].like_num</td> <td style="text-align: left;">int</td> <td>留言点赞数</td> </tr> <tr> <td style="text-align: left;">comment_list[].create_time</td> <td style="text-align: left;">string</td> <td>留言时间</td> </tr> <tr> <td style="text-align: left;">comment_list[].ip_wording</td> <td style="text-align: left;">string</td> <td>IP属地信息</td> </tr> <tr> <td style="text-align: left;">comment_list[].nick_name</td> <td style="text-align: left;">string</td> <td>留言人昵称</td> </tr> <tr> <td style="text-align: left;">comment_list[].logo_url</td> <td style="text-align: left;">string</td> <td>留言人头像</td> </tr> <tr> <td style="text-align: left;">comment_list[].reply_new</td> <td style="text-align: left;">string</td> <td>回复留言,如果没有回复内容,该字段不存在</td> </tr> <tr> <td style="text-align: left;">comment_list[].reply_new.reply_total_cnt</td> <td style="text-align: left;">int</td> <td>回复留言总数</td> </tr> <tr> <td style="text-align: left;">comment_list[].reply_new.reply_list</td> <td style="text-align: left;">list</td> <td>回复留言列表</td> </tr> </tbody> </table> <h5>备注</h5> <p>&gt; <code>code 状态判断</code></p> <ul> <li>0:获取成功</li> <li>1000:积分不足</li> <li>1002:获取失败,请重试</li> <li>9999:QPS超过上限,请稍后再试(每秒不能超过3个)</li> </ul> <p>&gt; 提醒:code=0,扣积分</p>

页面列表

ITEM_HTML