Examples
Copy-paste recipes for the four things most integrations do first — extract a page, render JS, run a bulk job to completion, and check your usage.
Every tab group on this page is linked: pick a language once and the whole page follows, across reloads.
Basic extraction
curl -X POST https://api.wellmarked.io/extract \
-H "Authorization: Bearer wm_..." \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/article"}'With JS rendering
For single-page apps and anything that assembles its content client-side. Requires Pro, Growth, or Enterprise.
curl -X POST https://api.wellmarked.io/extract \
-H "Authorization: Bearer wm_..." \
-H "Content-Type: application/json" \
-d '{"url": "https://spa-app.com/page", "render_js": true}'Bulk extraction, run to completion
# Submit
JOB=$(curl -s -X POST https://api.wellmarked.io/bulk \
-H "Authorization: Bearer wm_..." \
-H "Content-Type: application/json" \
-d '{"urls":["https://example.com/1","https://example.com/2"]}' \
| python -c "import json,sys;print(json.load(sys.stdin)['job_id'])")
# Poll until done
while :; do
RESP=$(curl -s https://api.wellmarked.io/bulk/$JOB \
-H "Authorization: Bearer wm_...")
STATUS=$(echo "$RESP" | python -c "import json,sys;print(json.load(sys.stdin)['status'])")
echo "Status: $STATUS"
[ "$STATUS" = "done" ] && break
sleep 2
done
echo "$RESP"Prefer a webhook over a poll loop
wait_for_job is convenient for scripts, but for anything long-running pass a webhook_url on
submission and let us call you. See Webhooks.
wait_for_job / waitForJob is polymorphic — the same call handles a bulk or a crawl job id.
In TypeScript it widens to BulkJob | CrawlJob, so declare the union up front if you reassign.
Check usage
curl https://api.wellmarked.io/usage \
-H "Authorization: Bearer wm_..."GET /usage does not count against your quota.
More
Compliance and policy
Every key carries an enforced policy — allowed domains, denied patterns, robots.txt handling — that a request can tighten but never loosen.
Extract clean Markdown from a URL
Fetch a single URL and return its main content as clean Markdown, with the navigation, ads, cookie banners and boilerplate stripped. This is the synchronous endpoint: one URL in, extracted content out, in a single round trip. For many URLs use `POST /bulk`; to follow links from a starting page use `POST /crawl`. `format` selects the output shape — `markdown` (default), `json` (typed blocks), `chunks` (pre-split for embedding), `html`, or `links`. `json` and `chunks` are Pro+ features, as is `render_js`, which runs the page through a headless browser first for client-side-rendered sites. Costs one request against your monthly quota.