Skip to main content
Use REST quick actions when one URL-level browser operation is enough and you want to call Webcompute from any language.

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

Set WEBCOMPUTE_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 include data, 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.png or example.pdf file.
  • 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 data field and did not pipe the full JSON response into base64.
Reference: quick actions, REST API, and error codes.