Quick-action shape
- One-off scrape, screenshot, and PDF requests over HTTP.
- Base64 binary handling for screenshot and PDF responses.
- The point where a workflow should switch to a managed browser.
Setup
SetWEBCOMPUTE_API_KEY in your shell. These examples use example.com so they do not require an account or private data.
Run a scrape
Capture a screenshot
Render a PDF
Expected output
Scrape responses include page content and metadata. Screenshot responses includedata, format, width, height, elapsedMs, and _meta. PDF responses include data, pages, elapsedMs, and _meta.
Inspect
- Response metadata for final URL, timing, and browser IDs.
- The saved
example.pngorexample.pdffile. - Error codes when a quick action times out or policy blocks navigation.
Cleanup
Delete local output files when you no longer need them. REST quick actions use ephemeral browser work; there is no browser session to close.Common failures
- If the job needs login state, multiple clicks, downloads, dialogs, recordings, Debug UI, or CDP, switch to a managed browser.
- If binary output is corrupted, confirm you decoded only the
datafield and did not pipe the full JSON response intobase64.