---
title: "获取公众号资料页/Get WeChat MP Account Profile"
method: POST
path: "/api/v1/wechat_mp/v2/fetch_account_profile"
tags: ["WeChat-Media-Platform-V2-API"]
---

# 获取公众号资料页/Get WeChat MP Account Profile

`POST /api/v1/wechat_mp/v2/fetch_account_profile`

## Request

- Base URL: `https://api.tikhub.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tikhub.io/api/v1/wechat_mp/v2/fetch_account_profile`
- Auth: HTTP bearer

# [中文]
### 用途:
- 传公众号 username，返回公众号资料页：昵称 / IP 属地 / 原创文章数 / 认证主体类型 / 关联视频号等。
- ⚠️ **签名（简介）与头像这条路取不到** —— 微信的资料页响应里既没有可读简介也没有头像。
  它们恒为 `null` 并列在 `$.data.unavailable[]` 里，**不会用空串冒充**，调用方可据此区分
  「这个号真的没填」和「这条路取不到」。
- 💡 **头像请改用 `/fetch_article_detail_h5`**（传该号的任意一篇文章链接，`raw=true`）：
  `$.data.content.round_head_img`（普通）/ `$.data.content.hd_head_img`（高清）。
  那条路确实有值，已实测。简介目前没有任何接口能取到。
- 价格：0.01$/次
- ⏱️ 由于微信服务器原因，本接口响应较慢，请将客户端请求超时（timeout）设置为 30 秒；timeout 设置过小会造成已扣费但收不到响应的情况。
### 参数:
- username: 公众号 username。**三种形态都支持**：`gh_…`、`gh_…@app`（关联小程序的账号）、自定义微信号（如 `nikejdi`）。来源：文章详情 `content.user_name`、或微信搜索 V2 `fetch_search`（business_type=account）结果的 `jumpInfo.userName`。示例 `gh_363b924965e9`
- raw: 可选，默认 True。True=原始；False=精简解析。
### 返回:
- 公众号资料页信息

### 响应结构与 JSON Path:
#### `raw=false`（精简解析，snake_case）:
- 公众号 username: `$.data.user_name`
- 昵称: `$.data.nick_name`（如 `量子位` / `NIKE`）
- 用户角色: `$.data.user_role`
- 服务类型（订阅号 / 服务号代码）: `$.data.service_type`
- 封禁类型（0=正常）: `$.data.ban_type`
- IP 属地: `$.data.ip_wording`（如 `北京 海淀`）
- 原创文章数: `$.data.original_article_count` / `$.data.original_content_str`
- 关联视频号: `$.data.finder_nickname` / `$.data.finder_username`
  （后者可直接喂视频号系列接口）
- 取不到的字段清单: `$.data.unavailable[]`（当前恒含 `signature` / `head_url`）
- 签名 / 简介: `$.data.signature` —— **恒为 null**，见上方说明
- 头像: `$.data.head_url` —— **恒为 null**；改用 `/fetch_article_detail_h5` 的
  `$.data.content.round_head_img` / `hd_head_img`
#### `raw=true`（原始，本接口默认）:
- `data` 为完整原始响应（几十个顶层字段），精简版字段对应其中嵌套位置:
    - 基础信息块: `$.data.baseInfo`（原创文章数 / 订阅状态等；**不含**昵称 / 头像 / 简介）
    - 昵称原始来源: `$.data.nameCard.buffer`（protobuf，精简层已解出 `nick_name`）
    - 账号信息: `$.data.accountInfo`（含 `userName` 等）
    - 统计信息: `$.data.statInfo`
    - 关联视频号: `$.data.videoFinderInfo`
    - 服务信息（自定义菜单原始来源）: `$.data.serviceInfo`
    - 文章 Tab / 消息列表: `$.data.articleTab` / `$.data.msgList`
    - IP 属地: `$.data.ipwording`
    - 其余: `liveInfo` / `nameCard` / `gender` / `setting` / `funcFlag` 等

# [English]
### Purpose:
- Pass an account username to get the profile: nickname / IP region / original article count / verification entity type / linked Channels account, etc.
- NOTE: **signature and avatar are not obtainable through this path** — WeChat's profile response carries neither. They are always `null` and listed in `$.data.unavailable[]` (never faked as empty strings).
- For the **avatar**, use `/fetch_article_detail_h5` instead (pass any article URL of that account with `raw=true`): `$.data.content.round_head_img` / `$.data.content.hd_head_img`. No endpoint currently exposes the signature.
- Some accounts (like the example) have sparse fields; `nick_name` / `signature` / `head_url` may be `null`.
- Price: $0.01 per request
- ⏱️ Due to WeChat server latency, this endpoint responds slowly; please set your client request timeout to 30 seconds — a timeout that is too small may result in being billed without receiving the response.
### Parameters:
- username: Official account `gh_username` (`gh_…`). Sources: `content.user_name` from article detail, or `jumpInfo.userName` from WeChat Search V2 `fetch_search` (business_type=account) results. E.g. `gh_363b924965e9`
- raw: Optional, default True. True=raw; False=simplified parsing.
### Return:
- Official account profile info

### Response structure & JSON Path:
#### `raw=false` (simplified, snake_case):
- Account username (`gh_…`): `$.data.user_name`
- Nickname (may be null): `$.data.nick_name`
- User role: `$.data.user_role`
- Service type (subscription / service account code): `$.data.service_type`
- Signature / description (may be null): `$.data.signature`
- Avatar (may be null): `$.data.head_url`
- Ban type (0=normal): `$.data.ban_type`
#### `raw=true` (raw, default for this endpoint):
- `data` is the full raw response (dozens of top-level fields); simplified fields map to nested locations:
    - Base info block: `$.data.baseInfo` (raw source of nickname / avatar / description)
    - Account info: `$.data.accountInfo` (with `userName` etc.)
    - Stats info: `$.data.statInfo`
    - Linked Channels account: `$.data.videoFinderInfo`
    - Service info (raw source of custom menu): `$.data.serviceInfo`
    - Article tab / message list: `$.data.articleTab` / `$.data.msgList`
    - IP region: `$.data.ipwording`
    - Others: `liveInfo` / `nameCard` / `gender` / `setting` / `funcFlag` etc.

## Request body

- FetchAccountRequest
  - `username` string, required: 公众号 username。三种形态都支持：`gh_…`、`gh_…@app`（关联小程序的账号）、以及自定义微信号（如 `nikejdi`）。取自文章详情接口响应的 `$.data.content.user_name`/Official account username. Three forms are supported: `gh_…`, `gh_…@app` (mini-program-linked accounts) and custom WeChat IDs (e.g. `nikejdi`). Taken from `$.data.content.user_name` of the article detail endpoints
  - `raw` boolean: True=原始响应；False=精简解析结构/True=raw response; False=simplified parsed structure

## Response `200`

Successful Response

- ResponseModel
  - `code` integer: HTTP status code | HTTP状态码
  - `request_id` string, nullable: Unique request identifier | 唯一请求标识符
  - `message` string: Response message (EN-US) | 响应消息 (English)
  - `message_zh` string: Response message (ZH-CN) | 响应消息 (中文)
  - `support` string: Support message | 支持消息
  - `time` string: The time the response was generated | 生成响应的时间
  - `time_stamp` integer: The timestamp the response was generated | 生成响应的时间戳
  - `time_zone` string: The timezone of the response time | 响应时间的时区
  - `docs` string, nullable: Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接
  - `cache_message` string, nullable: Cache message (EN-US) | 缓存消息 (English)
  - `cache_message_zh` string, nullable: Cache message (ZH-CN) | 缓存消息 (中文)
  - `cache_url` string, nullable: The URL to access the cached result | 访问缓存结果的 URL
  - `router` string: The endpoint that generated this response | 生成此响应的端点
  - `params` unknown
  - `data` unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-08** `96a122a5f220`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-09-09** `dd6680ae8195`: 1 warning, 1 info
  - changed the pattern of the request property `username` from `^gh_[A-Za-z0-9_]+$` to `^[0-9A-Za-z][-_0-9A-Za-z]{1,63}(@[0-9A-Za-z]{1,16})?$`
  - the `username` request property's maxLength was increased from `64` to `80`
- **2026-09-01** `50f9ec6e1cd3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/changes/api/v1/wechat_mp/v2/fetch_account_profile/post.md)

---

[API](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi.md) - [All operations](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/llms.txt) - [OpenAPI document](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/revisions/86a3483c705a?raw)
