Routes for jobs, runs, events, views, and artifacts.
Base URL in local development is http://127.0.0.1:4340. Portal proxies the same routes under /api/scrape/*.
| Method | Path | Purpose |
|---|---|---|
GET | /api/scrape/health | Read server and dependency health. |
POST | /api/scrape/jobs | Create a scrape job from url, intent, auth, schema, budget, and emit options. |
POST | /api/scrape/jobs/:jobId/run | Start the queued job and return a run id. |
GET | /api/scrape/runs/:runId | Poll an in-flight run or retrieve the terminal ScrapeResult. |
GET | /api/scrape/runs/:runId/events | Stream run events as SSE. |
GET | /api/scrape/runs/:runId/view | Read the latest markdown and annotated DOM view. |
POST | /api/scrape/runs/:runId/interactions/:interactionId | Resolve an interaction-required pause. |
GET | /api/scrape/artifacts/:artifactId | Retrieve a reusable scrape artifact. |
POST | /api/scrape/artifacts/:artifactId/replay | Replay and heal an artifact against a browser session. |
GET | /api/scrape/artifacts/:artifactId/download | Download artifact JSON. |
Create and run a job
curl -sS http://127.0.0.1:4340/api/scrape/jobs \
-H 'content-type: application/json' \
-d '{"url":"https://example.com","intent":"extract the page title"}'
curl -sS -X POST http://127.0.0.1:4340/api/scrape/jobs/job_1/run