# 获取微信公众号文章列表

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

手动翻页：首页 offset 留空 → 从响应取 next_offset（base64 游标）→ 下次请求放进 offset 取下一页；is_end 为真即末页。

:::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



| 字段 | 位置 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| username | body | string | 是 | gh_… 示例：gh_d29e0d22a6f9 |
| page_size | body | integer | 否 | 可选，默认 20，范围 10-20 |
| offset | body | string | 否 | 可选，翻页游标（base64），首页留空；翻页时传上一页响应的 next_offset。示例 CAMQChiS5KfRBiAKOJLkp9EGQABIAVgAYABwAQ== |
| item_show_type | body | string | 否 | 可选，内容栏目（对应公众号主页的「文章 / 视频 / 音频」分栏）。留空 / 0=文章（默认）、5=视频、7=音频、8=贴图。默认不传=文章 |
| raw | body | boolean | 否 | 可选，默认 false。true=原始；false=精简解析。 |

```json
{
  "type" : "object",
  "properties" : {
    "username" : {
      "type" : "string",
      "title" : "公众号原始ID",
      "description" : "gh_… 示例：gh_d29e0d22a6f9"
    },
    "page_size" : {
      "type" : "integer",
      "title" : "每页文章数",
      "description" : "可选，默认 20，范围 10-20"
    },
    "offset" : {
      "type" : "string",
      "title" : "翻页游标",
      "description" : "可选，翻页游标（base64），首页留空；翻页时传上一页响应的 next_offset。示例 CAMQChiS5KfRBiAKOJLkp9EGQABIAVgAYABwAQ=="
    },
    "item_show_type" : {
      "type" : "string",
      "description" : "可选，内容栏目（对应公众号主页的「文章 / 视频 / 音频」分栏）。留空 / 0=文章（默认）、5=视频、7=音频、8=贴图。默认不传=文章"
    },
    "raw" : {
      "type" : "boolean",
      "description" : "可选，默认 false。true=原始；false=精简解析。"
    }
  },
  "required" : [ "username" ]
}
```

```json
{
  "username" : "gh_d29e0d22a6f9",
  "page_size" : 20,
  "offset" : "",
  "item_show_type" : 0,
  "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_list' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "username" : "gh_d29e0d22a6f9",
  "page_size" : 20,
  "offset" : "",
  "item_show_type" : 0,
  "raw" : false
}'
```

