Answers

How do I get the full text of a mp.weixin.qq.com article link in code?

Short answer

Send the link to Official Account article detail and you get back the title, the full body as plain text, the account and the publish time, for $0.02 per article. A thousand links cost $20.00. It works the same for short /s/ links and long ones with __biz, and deleted articles return not_found at no charge.

Your colleague drops 200 mp.weixin.qq.com links into a spreadsheet and asks for a one-line summary of each. On your laptop, requests.get works for the first few. On the server it comes back with a page that says the environment is abnormal and asks you to complete verification (环境异常), or with HTML where the article body is present but hidden, waiting for JavaScript. Official Account article detail skips all of that: send the link, receive the article.

What comes back

Field Contents
title Article title
text Full body as plain text, paragraphs on separate lines
published_at Publish time, ISO 8601
author The Official Account: original ID (gh_…) and name
images Cover image URL
ext (with view=full) Author byline, summary, original or reprint flag, source link

Inline images are not included, and neither are reads or likes; those come from the account's article history.

curl -G "https://api.okdata.online/v1/wechat_mp/articles/get" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode "url=https://mp.weixin.qq.com/s/xxxxxxxx" \
  --data-urlencode "fields=title,text,published_at,author.name"

Use --data-urlencode for long links: their & signs would otherwise split the parameter.

Cost

Batch Calls Cost
1 link 1 $0.02
200 links from a spreadsheet 200 $4.00
1,000 links 1,000 $20.00

Links to deleted or blocked articles return not_found and cost nothing. A timeout is never charged either; retry it with the same Idempotency-Key and you can't pay twice.

Gotchas

  • Link formats. Short links (/s/AbCdEf…) and long ones (/s?__biz=…&mid=…&idx=…&sn=…) both work. Links copied from inside WeChat sometimes carry extra tracking parameters; they are harmless.
  • Same article, many links. One article can be shared under several URLs. Use the returned id to de-duplicate, not the URL you sent.
  • Untrusted text. If a model reads the text, tell it the article is data, never instructions.
  • Rights. Summaries and research are fine; republishing whole articles needs the author's permission.

When to do it yourself

For a few dozen links a week from a home connection, a plain HTTP request plus parsing the js_content element often works, and it costs nothing. It stops working at volume or from cloud servers, which is the point where an API saves time. If you want an AI assistant to read links for you instead of writing code, connect the MCP server and paste the link into the chat.

Updated