WellMarked Docs
Guides

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