Urlbox

Rendering

Capture screenshots, PDFs and videos from the terminal with the Urlbox CLI, covering formats, presets, viewport, full-page, and the common render flags.

render is the workhorse. There's a friendly alias for each common job, and the general render command underneath them all.

Your first render

urlbox screenshot https://urlbox.com --output hello.png

screenshot (alias: shot) is short for render --format png. The positional URL is all that's required; --output saves the result to disk. See Output & scripting for where files are allowed to land.

Want to see what would be sent without spending a credit?

urlbox screenshot https://urlbox.com --dry-run    # prints the validated payload, no API call
urlbox screenshot https://urlbox.com --curl       # prints an equivalent curl command

Choosing a format

urlbox screenshot https://stripe.com --output shot.png         # render --format png
urlbox pdf        https://stripe.com/pricing --output p.pdf    # render --format pdf --full-page
urlbox video      https://theverge.com --output clip.mp4       # render --format mp4
urlbox render     https://nike.com --format webp --width 1280 --output nike.webp
  • pdf defaults to --full-page because a PDF usually means "the whole document". Pass --full-page=false for a viewport-sized slice.
  • video renders MP4 and is typically slower than a screenshot, so consider async + webhook for production workflows.
  • render takes any --format the API supports (png, jpeg, webp, pdf, mp4, …).

Urlbox uses a single /v1/screenshot endpoint for every format, so urlbox pdf --curl and urlbox video --curl will show /v1/screenshot in the URL. That's correct, not a bug; the output format is set in the request body.

Presets

Presets layer in sensible defaults so you don't have to remember a stack of flags:

urlbox render https://example.com --preset mobile    # mobile viewport
urlbox render https://example.com --preset desktop   # desktop viewport
urlbox render https://example.com --preset pdf-a4    # PDF + A4
urlbox render https://example.com --preset article   # block ads, retina, wait for requests

Anything you set with an explicit flag or --json overrides the preset.

Common flags

FlagWhat it does
--full-pageCapture the whole scrollable page, not just the viewport
-w, --width / --heightViewport size in pixels
-f, --formatOutput format (png, jpeg, webp, pdf, mp4, …)
--retina2× device pixel ratio
-s, --selectorCapture a single element by CSS selector
--block-adsBlock ads via uBlock filterlists
--dark-modeForce prefers-color-scheme: dark
--delayWait N ms after load before capturing
--wait-untilPage-ready signal: domloaded, loaded, requestsfinished, mostrequestsfinished
--user-agentOverride the browser User-Agent
-q, --qualityOutput quality 1–100 (format-dependent)
--openOpen the rendered URL in your browser after success
--timeoutPer-attempt timeout (e.g. 60s, 3m); fails fast, doesn't retry
--max-retries / --no-retryTune automatic retries on 429 / 5xx (default 3)

For any option that isn't a dedicated flag, including ones the dashboard just shipped, use --json passthrough.

On this page