# What is a WeChat Official Account's original ID (gh_…)?

> The original ID (原始ID) is gh_ plus a short hex string, fixed when the account is created. How it differs from the WeChat ID, AppID and __biz, and how APIs take and return it.

Canonical page: https://okdata.online/answers/wechat-gh-original-id/

**Short answer: **It is the account's permanent internal name: gh_ followed by a hexadecimal string, usually 12 characters, such as gh_7a41c09e2b5d, set at registration and never changed. Unlike the WeChat ID it cannot be edited, and unlike the AppID it is not a developer credential. okdata's Official Account search returns it as id ($0.058 per account found) and article history takes it to list articles for $0.02 a page.

Every WeChat Official Account gets an original ID (原始ID) when it is registered: the letters `gh_` followed by a hexadecimal string, usually 12 characters, for example `gh_7a41c09e2b5d`. The owner sees it in the account's settings on mp.weixin.qq.com, listed as 原始ID among the registration details. Readers almost never see it, which is why a list of account names from a media plan cannot be fed straight into monitoring tools: those tools key on the gh_ ID because it is the one identifier that never changes. Names can be edited, WeChat IDs can be set or changed, but the original ID stays with the account for life.

## The four account identifiers

| Identifier | Looks like | Set by | Changes? | Used for |
|---|---|---|---|---|
| Original ID (原始ID) | `gh_7a41c09e2b5d` | WeChat, at registration | No | Monitoring tools, article history, third-party data |
| WeChat ID (微信号) | `brand_news` | The owner, optional | Can be set later | Telling people how to find the account |
| AppID | starts with `wx` | WeChat, for developers | No | Calling WeChat's official API for your own account |
| `__biz` | `MzA5NTI3MjIwMA==` | WeChat | No | Web links to articles and the profile page; see [what __biz is](/answers/wechat-biz-parameter/) |

Two cautions. A gh_ ID is not proof of an Official Account: mini programs have original IDs in the same `gh_` form, and WeChat's own docs ask for a mini program's gh_ ID when a web page links into one. And the AppID is a credential for your own account, not a way to look up anyone else's.

## How the API takes it and returns it

- [Official Account search](/apis/wechat_mp/accounts/search/) turns a name or keyword into accounts, each with `id` (the gh_ ID), `username` (the WeChat ID, when set) and `name`. It is charged per account returned.
- [Official Account article history](/apis/wechat_mp/accounts/articles/list/) takes the gh_ ID, or the WeChat ID, as `id` and lists published articles newest first. It does not take `__biz`.
- [Article detail](/apis/wechat_mp/articles/get/) returns `author.id`, the gh_ ID of the account behind any article link.

| Task | Calls | Cost |
|---|---|---|
| A name to its gh_ ID | 1 | $0.058 per account returned, at most $0.58 |
| One article link to its account's gh_ ID | 1 | $0.02 |
| The latest 10 articles of a gh_ ID | 1 | $0.02 |

## Example

```bash
curl -G "https://api.okdata.online/v1/wechat_mp/accounts/articles/list" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=gh_7a41c09e2b5d' \
  --data-urlencode 'fields=id,title,published_at,url'
```

## Limits

- An account that went through WeChat's account migration (账号迁移) has a new original ID afterwards. If article history for a stored gh_ ID suddenly goes quiet, search the name again.
- Search can return lookalike accounts for a common name. Check `name` before you store an ID.
- Turning a list of names into gh_ IDs, or reading them from an article's page source for free, is covered in [finding an account's biz or original ID](/answers/find-wechat-official-account-id/); a full export in [exporting an account's articles](/answers/export-wechat-official-account-articles/).

## Endpoints used

- [Official Account search](https://okdata.online/apis/wechat_mp/accounts/search/) `wechat_mp.accounts.search`: $0.058 per account · at most $0.58 per call
- [Official Account article history](https://okdata.online/apis/wechat_mp/accounts/articles/list/) `wechat_mp.accounts.articles.list`: $0.02 per call · about 10 articles per page
- [Official Account article detail](https://okdata.online/apis/wechat_mp/articles/get/) `wechat_mp.articles.get`: $0.02 per call

## More about WeChat Official Accounts

- [WeChat Official Accounts API](https://okdata.online/apis/wechat_mp/)
- [WeChat Official Account API in Python for RAG (2026)](https://okdata.online/guides/wechat-official-account-api-python/)
- [How to get a WeChat Official Account's articles and full text](https://okdata.online/guides/wechat-official-account-articles/)
- [Why can't ChatGPT or Claude read a WeChat article link, and how do I fix it?](https://okdata.online/answers/ai-read-wechat-article-link/)
- [How do I export all articles of a WeChat Official Account without logging in?](https://okdata.online/answers/export-wechat-official-account-articles/)
- [How do I monitor competitors' WeChat Official Accounts for new articles?](https://okdata.online/answers/monitor-competitor-wechat-official-accounts/)
- [What is __biz in a WeChat article link?](https://okdata.online/answers/wechat-biz-parameter/)
- [How much does a WeChat Official Account article API cost?](https://okdata.online/answers/wechat-official-account-api-price/)
- [Official platform APIs vs third-party data APIs (2026)](https://okdata.online/compare/official-apis-vs-data-apis/)
- [MCP servers for social media data: self-hosted vs hosted](https://okdata.online/compare/social-media-data-mcp-servers/)
- [WeChat article APIs: official vs third-party vs open-source (2026)](https://okdata.online/compare/wechat-article-data-apis/)
- [Ways to get WeChat Official Account data: the official API, RSS bridges and data APIs](https://okdata.online/compare/wechat-official-account-data-apis/)
- [Xiaohongshu, Douyin and WeChat MCP servers: self-hosted vs hosted](https://okdata.online/compare/xiaohongshu-douyin-wechat-mcp-servers/)
- [Account posts API](https://okdata.online/roles/accounts-posts-list/)

## Sources

- [WeChat open tags (微信开放文档): appid is the ID starting with wx, username the original ID starting with gh_](https://developers.weixin.qq.com/doc/service/guide/h5/opentag.html) (read 2026-11-12)
- [Feed request listing an account's name, gh_ ID and biz together (feeddd/feeds issue #3438)](https://github.com/feeddd/feeds/issues/3438) (read 2026-11-12)

Where people asked this (read 2026-11-12): 

- https://developers.weixin.qq.com/community/personal/oCJUswyaeSsHJf1a36Pk7VXvxtCc/question
- https://github.com/feeddd/feeds/issues/3438

Updated 2026-11-12
