For AI

Answers

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

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

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 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 takes the gh_ ID, or the WeChat ID, as id and lists published articles newest first. It does not take __biz.
  • Article detail 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

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; a full export in exporting an account's articles.

Sources

  1. WeChat open tags (微信开放文档): appid is the ID starting with wx, username the original ID starting with gh_developers.weixin.qq.com · read
  2. Feed request listing an account's name, gh_ ID and biz together (feeddd/feeds issue #3438)github.com · read

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

Updated

Connect once, then just ask.

Every new key comes with $0.10 to try it. One sentence connects your agent.

Start free
Connect your AI

Paste this into your agent

Read https://okdata.online/agents.md and set up okdata for me; my key is in the OKDATA_API_KEY environment variable.

Claude Code, Cursor, Codex and other agents that can open a link set themselves up from it.

MCP serverhttps://api.okdata.online/mcp