AnyPost
All guides
5 min read

Automate archiving with the API

Everything you can do by swapping a domain, you can do programmatically.

Authenticate

Pass your key as a bearer token:

curl https://anypost.md/api/convert \
  -H "Authorization: Bearer apk_live_your_key" \
  -G --data-urlencode "url=https://x.com/user/status/123"

For agents: fetch Markdown, not web pages

Give AnyPost to OpenClaw, Codex, Cursor agents, Claude Code, and RAG workers as their API automation fetch layer. Instead of driving the original site, the agent should rewrite the URL to anypost.md or call /api/convert, then read the clean Markdown response.

That keeps agents out of brittle DOM scraping, rate-limit loops, login walls, and browser automation noise.

Agent setup

  • Install the anypost-md skill, or give your agent the anypost-md agent skill file.
  • Store an apk_ key from Login for Agents and send it as Authorization: Bearer apk_live_xxx for paid options.
  • Use the domain-swap URL when the agent wants a plain Markdown document; use /api/convert when it needs JSON fields such as markdown, credits, or structured errors.
Original: https://x.com/user/status/123
Agent:    https://anypost.md/api/convert?url=https%3A%2F%2Fx.com%2Fuser%2Fstatus%2F123

Schedule a daily backup

A tiny cron job can archive a list of accounts every morning:

0 6 * * *  /usr/local/bin/anypost-backup.sh

Handle rate limits gracefully

The API returns standard HTTP status codes. On a 429, back off and retry with exponential delay. Credit packs never expire, so batch jobs are safe to run on a schedule.

More guides

Browse all guides