DataNavoAPI / GUIDES / WECHAT

Collect official-account articles from an account list

Collect official-account articles from an account list. Follow concrete contracts, examples and reviewable steps using WeChat Official Accounts.

LOCAL SIMULATIONAll displayed records are fictional fixtures. Live APIs, payments and external email are disabled.中文版 ↗
01

Task goal

Collect official-account articles from an account list. Follow concrete contracts, examples and reviewable steps using WeChat Official Accounts.

This is a local simulation. Program-generated samples are not live platform data and do not establish provider availability.

02

Inputs, goal and deliverable

Collect official-account articles from an account list. Follow concrete contracts, examples and reviewable steps using WeChat Official Accounts.

Inputs consist of explicit platforms, keywords or object identifiers. Preserve the samples, request IDs, classifications and unresolved questions in the deliverable. The task does not schedule itself or paginate indefinitely.

03

Step-by-step plan

StepCapabilityInputOutput
1wechat_mp.accounts.searchqueryaccount / items
2wechat_mp.accounts.articles.listid, tabpost / items
3wechat_mp.articles.geturlpost / item
04

Reusable task prompt

Ask the client to present a plan before you confirm each execution. This prompt bounds the sample; it does not call an external service for you.

text
Goal: Collect official-account articles from an account list
Use only DataNavoAPI local demo/simulated mode.
Planned capabilities: wechat_mp.accounts.search → wechat_mp.accounts.articles.list → wechat_mp.articles.get
Describe inputs and output fields and propose a bounded request count first.
Execute explicitly, retaining request IDs. Stop on failures or unknown outcomes.
Return a table, missing fields and sampling limits; never present fictional samples as market facts.
05

Plan, run and export

This bounded example has 3 steps. Successful customer simulation costs 5 TEST; anonymous demo costs zero. Provide each required identifier before generating a fixed plan; search results do not expand the request list automatically.

Use data.items[].id for the matching platform and object detail, account IDs for account content and comment IDs for replies. Check object types before reusing an ID. Fixture IDs do not establish a real relationship. The workbench exports per-step JSON and source-labelled CSV.

Workbench fieldMeaningExample
query研究关键词户外咖啡
step2_id步骤 2 · idgh_13c97ab93ce8
step3_url步骤 3 · urlhttps://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc
json
{
  "schemaVersion": 1,
  "templateId": "guide-wechat-official-account-articles",
  "runId": "00000000-0000-4000-8000-000000000001",
  "inputs": {
    "query": "户外咖啡",
    "step2_id": "gh_13c97ab93ce8",
    "step3_url": "https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc"
  },
  "maxTotalCredits": 5,
  "estimatedCredits": 5,
  "priceVersion": "test-credit-v1",
  "steps": [
    {
      "id": "step-1",
      "title": "微信公众号账号搜索",
      "capability": "wechat_mp.accounts.search",
      "params": {
        "query": "户外咖啡"
      },
      "maxCredits": 1,
      "idempotencyKey": "wf:00000000-0000-4000-8000-000000000001:step-1"
    },
    {
      "id": "step-2",
      "title": "获取公众号文章列表",
      "capability": "wechat_mp.accounts.articles.list",
      "params": {
        "id": "gh_13c97ab93ce8",
        "tab": "articles"
      },
      "maxCredits": 2,
      "idempotencyKey": "wf:00000000-0000-4000-8000-000000000001:step-2"
    },
    {
      "id": "step-3",
      "title": "获取公众号文章详情",
      "capability": "wechat_mp.articles.get",
      "params": {
        "url": "https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc"
      },
      "maxCredits": 2,
      "idempotencyKey": "wf:00000000-0000-4000-8000-000000000001:step-3"
    }
  ]
}
06

Review and stop conditions

  • Each conclusion links back to a sample and request ID.
  • Pagination stops at the agreed bound.
  • Missing fields remain missing rather than being invented by the model.
  • External writes, scheduled monitoring and automatic top-ups are not enabled by this workflow.
07

Python bounded-task example

By default this prints the complete plan without network access. Add --execute-demo to run these fixed samples and export source-labelled JSON. Any failure stops execution; no automatic paging or request expansion occurs.

python
import json
import sys
from urllib.request import ProxyHandler, Request, build_opener

steps = json.loads("[{\"capability\":\"wechat_mp.accounts.search\",\"method\":\"GET\",\"params\":{\"query\":\"户外咖啡\"}},{\"capability\":\"wechat_mp.accounts.articles.list\",\"method\":\"GET\",\"params\":{\"id\":\"gh_13c97ab93ce8\",\"tab\":\"articles\"}},{\"capability\":\"wechat_mp.articles.get\",\"method\":\"GET\",\"params\":{\"url\":\"https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667038683&idx=1&sn=0422127e651acd7f6cf6ef7e1cff04bc\"}}]")
# Preview only by default. Run with --execute-demo to request this fixed demo sample.
print(json.dumps(steps, ensure_ascii=False, indent=2))
if sys.argv[1:] != ["--execute-demo"]:
    raise SystemExit("Preview only. No request was sent.")
opener = build_opener(ProxyHandler({}))
results = []
for step in steps:
    request = Request("https://datanavoapi.com/api/atlas-demo",
        data=json.dumps(step).encode(), method="POST",
        headers={"Content-Type": "application/json", "Origin": "https://datanavoapi.com"})
    with opener.open(request, timeout=10) as response:
        result = json.load(response)
    if result.get("meta", {}).get("mode") != "demo" or result.get("meta", {}).get("billing", {}).get("charged"):
        raise RuntimeError("Unexpected response; stop without retrying")
    results.append({"capability": step["capability"], "response": result})
# No fan-out, automatic paging or retries. Export retains each source contract.
with open("datanavo-task-results.json", "w", encoding="utf-8") as output:
    json.dump(results, output, ensure_ascii=False, indent=2)
print("Saved datanavo-task-results.json")
TRY THE CONTRACT

Clear inputs. Inspectable output.

Each click runs a local fixture. Advanced JSON inputs are checked against the selected method. Editing does not execute a request.

Copying does not execute. CLI quote is read-only and needs a local customer TEST key. Configure MCP in demo mode first. GET and POST batches both return only fictional local fixtures.

Download contract example (no execution) ↗

For TEST budgets, Key scopes or failure scenarios, open the account console. Customer sandbox ↗