# 获取微信公众号文章互动数据

`POST /api/wechat-mp-v2/fetch_mp_article_stats`

传文章 URL，返回文章的互动指标（阅读量 / 点赞 / 在看 / 分享 / 收藏 / 评论数）。

:::highlight yellow 💡
由于微信服务器原因，本接口响应较慢，请将客户端请求超时（timeout）设置为 30 秒；timeout 设置过小会造成已扣费但收不到响应的情况。
:::

## 鉴权

源接口未声明鉴权要求，请结合接入指南确认。

## 请求参数



| 字段 | 位置 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| Authorization | header | string | 是 | 在 Header 添加参数 Authorization，其值为在 Bearer 之后拼接 apikey · default: "Bearer YOUR_API_KEY" |
| Content-Type | header | string | 是 |  · default: "application/json" |

## 请求体 · application/json



| 字段 | 位置 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| url | body | string | 是 | https://mp.weixin.qq.com/s/… 或带 __biz 的长链。示例：https://mp.weixin.qq.com/s/_YFzRDdamxCQ6qxejE9khg |
| raw | body | boolean | 否 | 可选，默认 false。true=原始；false=精简。 |

```json
{
  "type" : "object",
  "properties" : {
    "url" : {
      "type" : "string",
      "title" : "文章链接",
      "description" : "https://mp.weixin.qq.com/s/… 或带 __biz 的长链。示例：https://mp.weixin.qq.com/s/_YFzRDdamxCQ6qxejE9khg"
    },
    "raw" : {
      "type" : "boolean",
      "description" : "可选，默认 false。true=原始；false=精简。"
    }
  },
  "required" : [ "url" ]
}
```

```json
{
  "url" : "https://mp.weixin.qq.com/s/_YFzRDdamxCQ6qxejE9khg",
  "raw" : false
}
```

## 响应 200 · application/json



| 字段 | 位置 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| code | body | integer | 是 |  |
| message | body | string | 是 |  |
| data | body | object | 是 |  |

```json
{
  "type" : "object",
  "properties" : {
    "code" : {
      "type" : "integer"
    },
    "message" : {
      "type" : "string"
    },
    "data" : {
      "type" : "object",
      "properties" : { }
    }
  },
  "required" : [ "code", "message", "data" ]
}
```

```json
{
  "code" : 200,
  "message" : "success",
  "data" : { }
}
```

## cURL

```sh
curl --globoff --request POST 'https://api.getoneapi.com/api/wechat-mp-v2/fetch_mp_article_stats' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "url" : "https://mp.weixin.qq.com/s/_YFzRDdamxCQ6qxejE9khg",
  "raw" : false
}'
```

