Install¶
Get a running server and your first result in under a minute.
1. Install the binary¶
The installer detects your OS and architecture, downloads the matching
webtasks binary, and drops it on your PATH. If no prebuilt binary is
available for your platform it builds from source automatically (needs Go and
git).
Other ways to install
One prerequisite: Chrome
webtasks drives an installed Chrome or Chromium — it doesn't bundle a
browser. On a server or container, chromedp/headless-shell is the standard
base image. ffmpeg is only needed for MP4 recording.
2. Get a bundle of tasks¶
A bundle is a folder of .webtask recipes the server exposes as endpoints. The
repo ships a demo bundle with 38 example tasks — grab it to try things out:
3. Start the server¶
You should see:
Watch the browser
Add WEBTASKS_HEADLESS=false to open a visible Chrome window — handy while
learning selectors.
4. Check it's healthy¶
List every available task:
5. Run your first task¶
{
"ok": true,
"data": {
"page": {
"title": "Example Domain",
"heading": "Example Domain",
"body": "This domain is for use in documentation examples …"
}
}
}
Pass inputs in the JSON body — for example a search query:
curl -s -X POST http://127.0.0.1:8765/tasks/search/duckduckgo \
-H 'Content-Type: application/json' \
-d '{"q":"golang"}' | python3 -m json.tool
6. Stream live progress (SSE)¶
Some tasks emit progress as they go. Ask for an event stream and watch it unfold:
curl -N -X POST http://127.0.0.1:8765/tasks/streaming/progress \
-H 'Accept: text/event-stream' \
-H 'Content-Type: application/json' \
-d '{}'
Next steps¶
- Browse the examples — 38 copy-paste tasks
- Write your own task — the
.webtasklanguage - How it works — pools, hot-reload, the request lifecycle
- Deployment — ship a bundle to production