Urlbox

Render Options

Every render option the Urlbox API accepts. Search, then read the description, type, default and live examples for each.

Basic Options

Aa

url

string

The URL or domain of the website you want to screenshot. We will automatically prepend http:// if it is missing.

Screenshot of urlbox.com
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com"}'
Result
Screenshot of urlbox.com
Full page screenshot of apple.com
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "apple.com",  "full_page": true}'
Result
Full page screenshot of apple.com
Using a url which contains a query string
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://github.com/puppeteer/puppeteer/issues?q=is%3Aopen+is%3Aissue+screenshot"}'
Result
Using a url which contains a query string
Aa

html

string

The HTML you want to render.

Social / OG image
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "html": "\n<!doctype html><html><head><meta charset=\"utf-8\"><style>\n*{margin:0;box-sizing:border-box}\nbody{width:1200px;height:630px;background:#123524;color:#f3efe0;overflow:hidden;position… [truncated — 1332 chars]",  "width": 1200,  "height": 630}'
Result
Social / OG image
CaptureDeck email
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "html": "\n<!doctype html><html><head><meta charset=\"utf-8\"><style>\n*{margin:0;box-sizing:border-box}\nbody{width:600px;height:800px;background:#eef1f8;font-family:system-ui,-apple-system,\"Se… [truncated — 2872 chars]",  "width": 600,  "full_page": true}'
Result
CaptureDeck email
Invoice → PDF
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "html": "\n<!doctype html><html><head><meta charset=\"utf-8\"><style>\n*{margin:0;box-sizing:border-box}\nbody{width:794px;height:1123px;background:#fff;color:#1e293b;font-family:system-ui,-appl… [truncated — 3464 chars]",  "width": 794,  "format": "pdf"}'
Result
Stat card — pull quote
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "html": "\n<!doctype html><html><head><meta charset=\"utf-8\"><style>\n*{margin:0;box-sizing:border-box}\nbody{width:1080px;height:1080px;background:#5b21b6;color:#f5f3ff;font-family:Georgia,\"Ti… [truncated — 1259 chars]",  "width": 1080,  "height": 1080}'
Result
Stat card — pull quote
≡

format

enum

The output format of the resulting render.

Acceptspng · jpeg · webp · avif · svg · pdf · html · mp4 · webm · md
PNG Image
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com"}'
Result
PNG Image
JPEG Image
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "jpeg"}'
Result
JPEG Image
PDF
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "pdf"}'
Result
SVG
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "svg"}'
Result
SVG
Markdown
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "md"}'
Result
{  "renderUrl": "https://renders.urlbox.com/ub-temp-renders/renders/.../[render-id].md",  "size": 167,  "response": {    "statusCode": 200,    "urlRequested": "http://example.com",    "urlResolved": "http://example.com/"  }}
HTML
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "html"}'
Result
{  "renderUrl": "https://renders.urlbox.com/ub-temp-renders/renders/.../[render-id].html",  "size": 1477,  "response": {    "statusCode": 200,    "urlRequested": "http://example.com",    "urlResolved": "https://example.com/"  }}
MP4
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "mp4"}'
Result
#

width

number

The viewport width of the browser, in pixels.

Default1280
Try values
Mobile
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "apple.com",  "width": 375}'
Result
width Mobile
#

height

number

The viewport height of the browser, in pixels.

Default1024
Try values
Viewport
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "apple.com",  "height": 1024,  "full_page": false}'
Result
height Viewport
T/F

full_page

boolean

Specify whether to capture the full scrollable area of the website. For PDFs, full_page mode will attempt to capture the whole website onto one single page PDF document. It's likely you'll want to also hide any cookie banners that crop up during a full page screenshot, so we recommend you use click_accept and hide_cookie_banners too.

DefaultfalseAcceptstrue · false
Full page screenshot of urlbox.com
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "full_page": true}'
Result
Full page screenshot of urlbox.com
Full page PDF of urlbox.com
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "full_page": true,  "format": "pdf",  "pdf_auto_crop": true}'
Result
Aa

selector

string

Take a screenshot of the element that matches this selector. By default, if the selector is not found, Urlbox will take a normal viewport screenshot. If you prefer Urlbox to fail the request when the selector is not found, pass fail_if_selector_missing=true.

Select only the Github logo
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "github.com",  "selector": ".octicon-mark-github"}'
Result
Select only the Github logo
Snapshotting terms and conditions
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://urlbox.com/policies/terms",  "selector": "section"}'
Result
Snapshotting terms and conditions
Aa

clip

string

Clip the screenshot to the bounding box specified by x,y,width,height.

clip=0,0,400,400
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "clip": "0,0,400,400"}'
Result
clip=0,0,400,400
clip=100,100,200,200
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "clip": "100,100,200,200"}'
Result
clip=100,100,200,200
clip=0,800,800,600
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "clip": "0,800,800,600"}'
Result
clip=0,800,800,600
T/F

gpu

boolean

Enable GPU acceleration to render 3D scenes and heavy WebGL content. This is a beta feature and requires pre-approval. Please contact support@urlbox.com to enable this feature on your account.

Requires the Ultra plan or above.

DefaultfalseAcceptstrue · false
WebGL water
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "gpu": true,  "url": "https://madebyevan.com/webgl-water/",  "wait_for": "canvas"}'
Result
WebGL water
WebGL Earth
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "gpu": true,  "url": "https://jsulpis.github.io/realtime-planet-shader/earth/",  "wait_for": "canvas.loaded"}'
Result
WebGL Earth
LLM 3D Visualisation
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "gpu": true,  "url": "https://bbycroft.net/llm"}'
Result
LLM 3D Visualisation
≡

response_type

enum

For render link requests, setting this option to json will change the response type of the Urlbox request to JSON. For the API, the default response type is JSON.

Acceptsjson · binary
response_type=json
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "response_type": "json"}'
Result
{  "renderUrl": "https://renders.urlbox.com/ub-temp-renders/renders/.../[render-id].png",  "size": 17752,  "width": 1280,  "height": 1024,  "response": {    "statusCode": 200,    "urlRequested": "http://example.com",    "urlResolved": "https://example.com/"  }}
response_type=binary
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "response_type": "binary"}'
Result
response_type=binary
T/F

secure_mode

boolean

Ensure that sensitive data remains protected throughout the process. In addition to this option, you need to use one of the storage approaches described on our blog post about secure mode.

Requires the Ultra plan or above.

Acceptstrue · false

No example for this option yet.

Blocking Options

T/F

block_ads

boolean

Blocks requests from popular advertising networks from loading.

Acceptstrue · false
With ads blocked
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "nytimes.com",  "block_ads": true}'
Result
With ads blocked
Without ads blocked
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "nytimes.com",  "block_ads": false}'
Result
Without ads blocked
T/F

click_accept

boolean

Similar to the hide_cookie_banners option, but instead of hiding the banners, this option attempts to click on the 'Accept' button, in order to accept cookies.

Acceptstrue · false
With click_accept
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "vectary.com",  "click_accept": true}'
Result
With click_accept
Without click_accept
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "vectary.com"}'
Result
Without click_accept
T/F

press_escape

boolean

Attempts to press the Escape (ESC) key before capturing the page. Useful for dismissing pop-ups, overlays, or advertising banners that appear on load.

Acceptstrue · false

No example for this option yet.

[ ]

block_urls

array

Block requests from specific domains from loading. You can use wildcard characters such as * to match subdomains.

Acceptsstring[]
Blocking chat plugin from Urlbox
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "block_urls": [    "*crisp*"  ]}'
Result
Blocking chat plugin from Urlbox
Without blocking chat plugin from Urlbox
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "delay": 2000,  "click_accept": true}'
Result
Without blocking chat plugin from Urlbox
T/F

block_images

boolean

Blocks image requests

Acceptstrue · false
Blocking all images from Unsplash
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://unsplash.com/",  "click_accept": true,  "block_images": true}'
Result
Blocking all images from Unsplash
T/F

block_fonts

boolean

Blocks font requests

Acceptstrue · false
Blocking all font downloads from Urlbox
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "block_fonts": true}'
Result
Blocking all font downloads from Urlbox
Without blocking font downloads from Urlbox
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com"}'
Result
Without blocking font downloads from Urlbox
T/F

block_medias

boolean

Block video and audio requests

Acceptstrue · false
Blocking video and audio requests from Vimeo
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "block_medias": true,  "format": "mp4",  "url": "https://vimeo.com/"}'
Result
Without blocking video and audio requests from Vimeo
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://vimeo.com/",  "format": "mp4"}'
Result
T/F

block_styles

boolean

Prevent stylesheet requests from loading

Acceptstrue · false
Blocking stylesheets
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://news.ycombinator.com/",  "block_styles": true}'
Result
Blocking stylesheets
Without blocking stylesheets
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://news.ycombinator.com/"}'
Result
Without blocking stylesheets
T/F

block_scripts

boolean

Prevent requests for javascript scripts from loading

Acceptstrue · false
Blocking scripts
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.apple.com/uk/iphone-16-pro/",  "format": "mp4",  "block_scripts": true}'
Result
Without blocking scripts
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.apple.com/uk/iphone-16-pro/",  "format": "mp4"}'
Result
T/F

block_frames

boolean

Prevents iframe and frame content from loading by blocking non-navigation document requests. The main page will load normally, but any embedded frames/iframes will be blocked.

Acceptstrue · false
Blocking frames
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.nytimes.com",  "block_frames": true}'
Result
Blocking frames
T/F

block_fetch

boolean

Block fetch requests from the target URL.

Acceptstrue · false

No example for this option yet.

T/F

block_xhr

boolean

Block XHR requests from the target URL.

Acceptstrue · false
Blocking XHR
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.gumtree.com/",  "block_xhr": true}'
Result
Blocking XHR
T/F

block_sockets

boolean

Prevents WebSocket connections from being established, blocking real-time communication features like live chat, notifications, or dynamic updates.

Acceptstrue · false

No example for this option yet.

T/F

block_data_urls

boolean

Block data URLs such as data:image/png;base64,...

Acceptstrue · false

No example for this option yet.

Aa

hide_selector

string

Hide specific HTML elements on the page before rendering. This option accepts a comma-delimited string of CSS element selectors that will be hidden by setting their style to visibility: hidden !important; pointer-events: none !important;. This preserves the page layout while making elements invisible.

This is particularly useful for:

  • Hiding pop-ups, banners, or cookie notices
  • Removing advertisements or promotional overlays
  • Excluding navigation menus or sidebars
  • Hiding specific content sections

Selector types supported:

  • Element selectors (e.g., h1, div, img) - Hide all elements of that type
  • Class selectors (e.g., .popup, .banner) - Hide elements with specific CSS classes
  • ID selectors (e.g., #header, #sidebar) - Hide elements with specific IDs
  • Complex selectors (e.g., .nav ul li, div.content > p) - Use any valid CSS selector
  • Multiple selectors - Combine multiple selectors with commas

Tip: To find the selector for any element, open your browser's DevTools, right-click the element in the Elements tab, and select "Copy > Copy selector".

Hiding an h1 element
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "hide_selector": "h1"}'
Result
Hiding an h1 element
Without hiding any elements
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com"}'
Result
Without hiding any elements

Customize Options

Aa

js

string

Execute custom JavaScript in the context of the page. The JS gets executed after the page's dom has loaded, but before the screenshot is taken. No need to use load etc event handlers to run code, as these events will already have fired by the time this JS gets executed. You can use await to wait for promises to resolve.

Requires the Ultra plan or above.

Inject a timestamp of the screenshot into the screenshot
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "js": "var now = new Date();\n                      var dateTimeDiv = document.createElement(\"div\");\n                      dateTimeDiv.innerText = now.toLocaleString();\n                      dateTimeDiv.style.cssText = \"position: absolute; top: 10px; right: 10px; padding: 10px; background-color: lightgray; border: 2px solid black; font-weight:semibold; font-family: Arial, sans-serif; font-size: 24px; z-index: 1000;\";\n                      document.body.appendChild(dateTimeDiv);"}'
Result
Inject a timestamp of the screenshot into the screenshot
Overriding a headline
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "js": "document.querySelector(\"h1\").textContent = \"I just overrode the headline, oops!!\";"}'
Result
Overriding a headline
Aa

css

string

Inject custom CSS into the page

Highlight elements with a red border
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "css": "a {border: 4px solid red !important; padding: 4px;}"}'
Result
Highlight elements with a red border
Changing background colour
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "css": "header,main, main > section > div {background-color: cyan !important;}"}'
Result
Changing background colour
T/F

dark_mode

boolean

Emulate dark mode on websites by setting prefers-color-scheme: dark

DefaultfalseAcceptstrue · false
dark_mode=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com/docs/api",  "dark_mode": true}'
Result
dark_mode=true
dark_mode=false
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com/docs/api",  "dark_mode": false}'
Result
dark_mode=false
T/F

reduced_motion

boolean

Prefer less animations on websites by setting prefers-reduced-motion: reduced

Acceptstrue · false
With reduced motion
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://webkit.org/blog-files/prefers-reduced-motion/prm.htm",  "format": "mp4",  "reduced_motion": true}'
Result
Without reduced motion
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://webkit.org/blog-files/prefers-reduced-motion/prm.htm",  "format": "mp4"}'
Result
T/F

show_timestamp

boolean

Shows a timestamp in a header above the rendered screenshot. Can be paired with show URL. If you're rendering a PDF, you can achieve this with the show_header option.

Acceptstrue · false
With a timestamp
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://example.com",  "format": "png",  "show_timestamp": true}'
Result
With a timestamp
Without a timestamp
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://example.com",  "format": "png"}'
Result
Without a timestamp
T/F

show_url

boolean

Shows a URL in a header above the rendered screenshot. Can be paired with show timestamp. If you're rendering a PDF, you can achieve this with the show_header option.

Acceptstrue · false
With a URL
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://example.com",  "format": "png",  "show_url": true}'
Result
With a URL
With a timestamp and URL
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://example.com",  "format": "png",  "show_timestamp": true,  "show_url": true}'
Result
With a timestamp and URL
Without a URL
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://example.com",  "format": "png"}'
Result
Without a URL

Screenshot Options

T/F

retina

boolean

Take a 'retina' or high-definition screenshot, equivalent to setting a device pixel ratio of 2.0 or @2x. Please note that retina screenshots will be double the normal dimensions and will normally take slightly longer to process due to the much bigger image size.

DefaultfalseAcceptstrue · false
retina=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "retina": true}'
Result
retina=true
retina=false
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "retina": false}'
Result
retina=false
#

thumb_width

number

The width of the generated thumbnail, in pixels. Omit for a full-size screenshot.

Try values
200
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "thumb_width": 200}'
Result
thumb_width 200
#

thumb_height

number

The height of the generated thumbnail, in pixels. Omit for a full-size screenshot.

Try values
200
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "thumb_height": 200}'
Result
thumb_height 200
[ ]

thumbnails

array

Generate up to 5 additional thumbnail images from the same render, each uploaded as its own file alongside the main screenshot. thumbnails is independent of the main screenshot's own dimensions, and unrelated to the legacy thumb_width/thumb_height options above, which resize the primary screenshot itself.

Each entry in the array is an object with the following keys, all optional:

  • key — a short identifier (max 10 characters) for this thumbnail. Used as its filename suffix, and as its key in the JSON response.
  • preset — one of xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl, 1/2, 1/4, 3/4. Scales the thumbnail as a percentage of the original screenshot (e.g. md is 30%). Takes priority over size/width/height.
  • size — a single pixel value (10–2000) used as both width and height.
  • width / height — the thumbnail dimensions in pixels (10–2000).
  • fit — how the thumbnail is resized/cropped: cover, contain, fill, inside or outside. Falls back to img_fit, then cover.
  • bg — background colour used for letterboxing. Falls back to img_bg, then bg_color, then black.
  • position — how the image is positioned within its fit. Any img_position value, including attention and entropy. Falls back to img_position, then north.
  • suffix — a custom filename suffix, used when key isn't set.
  • presigned_url — a presigned URL to upload this specific thumbnail to, instead of Urlbox's own storage.

Each generated thumbnail appears in the JSON response (see response_type) as an entry in a thumbnails array, each with a key, location and size.

Generate two thumbnails alongside the render
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "png",  "thumbnails": [    {      "size": 120,      "key": "icon"    },    {      "width": 320,      "key": "card"    }  ]}'
Result
icon
icon · 120×120
card
card · 320
T/F

thumbnails_object

boolean

When true, the generated thumbnails are returned in the JSON response as an object keyed by each thumbnail's key/suffix (with key omitted from each value) instead of an array — so you can look a thumbnail up by name rather than by position.

DefaultfalseAcceptstrue · false

No example for this option yet.

≡

img_fit

enum

How the screenshot should be resized or cropped to fit the dimensions when using thumb_width and/or thumb_height options

Values:

  • cover — Preserving aspect ratio, attempt to ensure the image covers both thumb_width and/or thumb_height by cropping/clipping to fit.
  • contain — Preserving aspect ratio, contain within both thumb_width and/or thumb_height using letterboxing where necessary.
  • fill — Ignore the aspect ratio and stretch to both thumb_width and/or thumb_height.
  • inside — Preserving aspect ratio, resize the image to be as large as possible while ensuring its dimensions are less than or equal to thumb_width and/or thumb_height.
  • outside — Preserving aspect ratio, resize the image to be as small as possible while ensuring its dimensions are greater than or equal to thumb_width and/or thumb_height.
DefaultcoverAcceptscover · contain · fill · inside · outside
Try values
cover
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "cover"}'
Result
img_fit cover
≡

img_position

enum

How the image should be positioned when using an img_fit of cover or contain.

DefaultcenterAcceptsnorth · northeast · east · southeast · south · southwest · west · northwest · center · centre
img_position=north
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_position": "north"}'
Result
img_position=north
img_position=south
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_position": "south"}'
Result
img_position=south
img_position=west
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_position": "west"}'
Result
img_position=west
img_position=east
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_position": "east"}'
Result
img_position=east
img_position=center
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_position": "center"}'
Result
img_position=center
img_position=northwest
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_position": "northwest"}'
Result
img_position=northwest
img_fit=contain, img_position=north
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_position": "north"}'
Result
img_fit=contain, img_position=north
img_fit=contain, img_position=south
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_position": "south"}'
Result
img_fit=contain, img_position=south
img_fit=contain, img_position=west
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_position": "west"}'
Result
img_fit=contain, img_position=west
img_fit=contain, img_position=east
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_position": "east"}'
Result
img_fit=contain, img_position=east
img_fit=contain, img_position=center
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_position": "center"}'
Result
img_fit=contain, img_position=center
img_fit=contain, img_position=northwest
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_position": "northwest"}'
Result
img_fit=contain, img_position=northwest
Aa

img_bg

string

Background colour to use when img_fit is contain, or img_pad is used, defaults to black without transparency

img_bg=red
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_bg": "red"}'
Result
img_bg=red
img_bg=#ccc
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_bg": "#ccc"}'
Result
img_bg=#ccc
img_bg=rgb(180, 255, 200)
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_bg": "rgb(180, 255, 200)"}'
Result
img_bg=rgb(180, 255, 200)
img_bg=rgba(180, 255, 200, 0.4)
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_bg": "rgba(180, 255, 200, 0.4)"}'
Result
img_bg=rgba(180, 255, 200, 0.4)
img_bg=hsl(60, 20%, 20%)
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_fit": "contain",  "img_bg": "hsl(60, 20%, 20%)"}'
Result
img_bg=hsl(60, 20%, 20%)
Aa

img_pad

string

Pad the screenshot, giving it a border. Can either be a single pixel value that gets added to each side, or a comma delimited string of top,right,bottom,left pixel values.

img_pad=10
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_bg": "cyan",  "img_pad": 10}'
Result
img_pad=10
img_pad=30
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_bg": "cyan",  "img_pad": 30}'
Result
img_pad=30
img_pad=1,10,20,40
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "thumb_width": 400,  "thumb_height": 400,  "img_bg": "cyan",  "img_pad": "1,10,20,40"}'
Result
img_pad=1,10,20,40
#

quality

number

The image quality of the resulting screenshot (JPEG/WebP only)

Range: 0-100

Default80Accepts0-100
Try values
0
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "spotify.com",  "format": "jpeg",  "quality": 0}'
Result
quality 0
T/F

transparent

boolean

If a website has no background color set, the image will have a transparent background (PNG/WebP only)

DefaultfalseAcceptstrue · false

No example for this option yet.

#

max_height

number

For extremely lengthy websites, it may be preferable to limit the screenshot to a maximum height to prevent Urlbox from spending time scrolling and generating an enormous screenshot.

Try values
1000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "max_height": 1000,  "full_page": true}'
Result
max_height 1000
Aa

download

string

Pass in a filename which sets the content-disposition header on the response. E.g. download=myfilename.png This will make the Urlbox link downloadable, and will prompt the user to save the file as myfilename.png

With a filename
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "apple.com",  "download": "apple.png"}'
Result
With a filename

PDF Options

≡

pdf_page_size

enum

Sets the PDF page size.

Setting this option will take precedence over pdf_page_width and pdf_page_height.

DefaultA4AcceptsA0 · A1 · A2 · A3 · A4 · A5 · A6 · Legal · Letter · Ledger · Tabloid
pdf_page_size=A0
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "format": "pdf",  "url": "example.com",  "pdf_page_size": "A0"}'
Result
pdf_page_size=A4
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "format": "pdf",  "url": "example.com",  "pdf_page_size": "A4"}'
Result
pdf_page_size=Letter
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "format": "pdf",  "url": "example.com",  "pdf_page_size": "Letter"}'
Result
Aa

pdf_page_range

string

Sets the PDF page range to return.

By default, the page is split into a multi page document and returns all page. Use this option to restrict which pages should be returned.

Just the first page
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "format": "pdf",  "url": "urlbox.com",  "pdf_page_range": "1"}'
Result
The first 2 pages and the 4th page
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "format": "pdf",  "url": "urlbox.com",  "pdf_page_range": "1-2,4"}'
Result
Just the 4th page
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "format": "pdf",  "url": "urlbox.com",  "pdf_page_range": "4"}'
Result
#

pdf_page_width

number

Sets the PDF page width, in pixels.

pdf_page_width=400
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "pdf_page_width": 400}'
Result
pdf_page_width=800
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "pdf_page_width": 800}'
Result
pdf_page_width=1400
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "pdf_page_width": 1400}'
Result
#

pdf_page_height

number

Sets the PDF page height, in pixels.

pdf_page_height=400
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "pdf_page_height": 400}'
Result
pdf_page_height=800
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "pdf_page_height": 800}'
Result
pdf_page_height=2000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "pdf_page_height": 2000}'
Result
≡

pdf_margin

enum

Sets the margin of the PDF document.

DefaultnoneAcceptsnone · default · minimum
Try values
none
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "pdf",  "pdf_margin": "none"}'
Result
#

pdf_margin_top

number

Sets a custom top margin on the PDF.

pdf_margin_top=40
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "pdf",  "pdf_margin_top": 40}'
Result
#

pdf_margin_right

number

Sets a custom right margin on the PDF.

pdf_margin_right=100
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "pdf",  "pdf_margin_right": 100}'
Result
#

pdf_margin_bottom

number

Sets a custom bottom margin on the PDF.

pdf_margin_bottom=50
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "pdf",  "pdf_margin_bottom": 50}'
Result
#

pdf_margin_left

number

Set a custom left margin on the PDF.

pdf_margin_left=60
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "pdf",  "pdf_margin_left": 60}'
Result
T/F

pdf_auto_crop

boolean

Automatically remove white space from PDF. Occasionally a PDF will have a lot of trailing white space at the bottom of the page. This option will attempt to automatically crop the PDF to remove this white space.

Acceptstrue · false

No example for this option yet.

#

pdf_scale

number

Sets the scale factor of the website content in the PDF. Valid values are numbers between 0.1 and 2.

Range: 0.1 - 2

Default1Accepts0.1 - 2
Try values
0.1
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "pdf",  "pdf_scale": 0.1}'
Result
≡

pdf_orientation

enum

Sets the orientation of the PDF.

DefaultportraitAcceptsportrait · landscape
Try values
portrait
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "pdf",  "pdf_orientation": "portrait"}'
Result
T/F

pdf_background

boolean

Sets whether to print background images in the PDF

DefaulttrueAcceptstrue · false
pdf_background=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "bbc.com",  "format": "pdf",  "pdf_background": true}'
Result
pdf_background=false
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "bbc.com",  "format": "pdf",  "pdf_background": false}'
Result
T/F

disable_ligatures

boolean

Prevents ligatures from being used. Useful when rendering a PDF, and you want to extract text which contains ligatures.

Acceptstrue · false

No example for this option yet.

Aa

media

string

By default, when generating a PDF, the print CSS media query is used. To generate a PDF using the screen CSS, set this option to screen.

When generating an image, the screen CSS media query is used by default. To generate an image using the print CSS, set this option to print.

Acceptsenum
PDF using screen CSS
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://theconversation.com/wildfires-dont-just-burn-farmland-they-can-contaminate-the-water-farmers-use-to-irrigate-crops-and-support-livestock-236545",  "format": "pdf",  "media": "screen"}'
Result
PDF using print CSS
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://theconversation.com/wildfires-dont-just-burn-farmland-they-can-contaminate-the-water-farmers-use-to-irrigate-crops-and-support-livestock-236545",  "format": "pdf",  "media": "print"}'
Result
PNG using screen CSS
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://theconversation.com/wildfires-dont-just-burn-farmland-they-can-contaminate-the-water-farmers-use-to-irrigate-crops-and-support-livestock-236545",  "format": "png",  "media": "screen"}'
Result
PNG using screen CSS
PNG using print CSS
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://theconversation.com/wildfires-dont-just-burn-farmland-they-can-contaminate-the-water-farmers-use-to-irrigate-crops-and-support-livestock-236545",  "format": "png",  "media": "print"}'
Result
PNG using print CSS
T/F

pdf_show_header

boolean

Whether to show the default pdf header on each page of the pdf. The template of the header can be changed by setting the pdf_header option.

Acceptstrue · false
pdf_show_header=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "format": "pdf",  "pdf_show_header": true}'
Result
Aa

pdf_header

string

Change the default pdf header that is shown on each page of the pdf when pdf_show_header option is set.

You have the option to show the following variables in the header (or footer) of the pdf:

  • current date
  • title of the page
  • url of the page
  • current pageNumber
  • the totalPages in the pdf document

You can display these variables by creating empty divs or spans, with special css class names relating to the variable you want to show.

For example, if you want to show the date followed by the url, you could use the following pdf header template:

<div class="date"></div><div class="url"></div>.

The pdf header template you set are inserted as the innerHTML of a parent div which is a flex container, and has align-items set to flex-start.

There are also some helper classes for aligning the divs or spans. The following classes are available:

  • left - adds some left padding to the element and sets flex: none.
  • center - aligns the element and text to the center.
  • right - adds some right padding to the element and sets flex: none.
  • text - sets the text to 8pt.
  • grow - sets flex: auto on the element, allowing it to grow to fill the available space.

The default pdf header is:

<div class='date text left'></div><div class='title text center'></div>.

You can see exactly how the pdf page is constructed by looking at the chromium pdf template in the chromium source repository.

Showing the date and url in the pdf header
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "pdf_show_header": true,  "pdf_header": "<div class='date text left'></div><div class='url text right'></div>"}'
Result
Showing the current page and total pages in the pdf header
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "pdf_show_header": true,  "pdf_header": "<div class='' style='color:red;margin-right:2px;'>This is page</div><div class='pageNumber text'></div><div class='text' style='color:red;margin-right:2px;margin-left:2px;'> of </div><div class='totalPages text'></div>"}'
Result
T/F

readable

boolean

Make the pdf into a readable document by removing unnecessary elements such as navigation bars, ads, etc.

Acceptstrue · false
readable=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.bloomberg.com/news/articles/2023-11-21/altman-openai-board-open-talks-to-negotiate-his-possible-return?embedded-checkout=true",  "format": "pdf",  "readable": true}'
Result
Aa

pdf_title

string

Sets the title metadata field of the PDF document. This is visible in PDF readers under document properties. If not set, the page's <title> tag will be used as the PDF title.

No example for this option yet.

Aa

pdf_subject

string

Sets the subject metadata field of the PDF document. This is visible in PDF readers under document properties.

No example for this option yet.

Aa

pdf_author

string

Sets the author metadata field of the PDF document. This is visible in PDF readers under document properties.

No example for this option yet.

Aa

pdf_keywords

string

Sets the keywords metadata field of the PDF document. Pass a comma-separated list of keywords, e.g. "pdf_keywords": "screenshot,web,api". This is visible in PDF readers under document properties and can help with document organization and search.

No example for this option yet.

Aa

pdf_creator

string

Sets the creator metadata field of the PDF document. This typically indicates the application that created the original content. Visible in PDF readers under document properties.

No example for this option yet.

Cache Options

T/F

force

boolean

Generate a fresh render on each request, instead of getting a cached version.

DefaultfalseAcceptstrue · false

No example for this option yet.

Aa

unique

string

Pass a unique string such as a UUID, hash or timestamp, to have more control over when to generate a fresh screenshot or PDF.

No example for this option yet.

#

ttl

number

The duration to keep a screenshot or PDF in the cache, in seconds. ttl stands for 'time to live'. The default value is also the maximum value: 2592000 seconds (30 days).

Default2592000
1 day
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "nytimes.com",  "ttl": 86400}'
Result
1 day
1 week
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "nytimes.com",  "ttl": 604800}'
Result
1 week
1 month
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "nytimes.com",  "ttl": 2592000}'
Result
1 month

Request Options

T/F

use_stealth

boolean

Enable stealth mode to reduce automated-browser detection on sites that block headless browsers.

Acceptstrue · false

No example for this option yet.

T/F

hide_headless

boolean

A lighter-weight alternative to use_stealth for hiding that the browser is automated. It runs Chrome with a set of stealth plugins that patch the fingerprints headless Chrome normally leaks (for example navigator.webdriver, missing chrome runtime objects, and WebGL vendor strings), so pages are less likely to detect the render as a bot.

use_stealth is the stronger option and takes precedence if both are set. Reach for hide_headless when a site does light bot-detection that a plain render trips but doesn't need the full stealth browser.

DefaultfalseAcceptstrue · false

No example for this option yet.

Aa

proxy

string

Pass in a proxy server address to make screenshot requests via that server in the format [address]:[port].

If proxy authentication is required, you can use the following format: [user]:[password]@[address]:[port].

Requires the Ultra plan or above.

No example for this option yet.

Aa

use_proxy

string

This uses the proxy you have stored on your project in use to make screenshot requests via that server.

Requires the Ultra plan or above.

No example for this option yet.

[ ]

header

array

Set a header on the request when loading the URL

Example: To set the header with key X-My-Header to the value SomeValue, you would pass header=X-My-Header%3DSomeValue.

This can be set multiple times, to set more than one header - e.g. header=X-My-Header%3DSomeValue&header=X-My-Other-Header%3DSomeOtherValue.

As with all options passed via the query string, the header value must be URL encoded - so X-My-Header=SomeValue becomes X-My-Header%3DSomeValue in order to be interpreted correctly by Urlbox.

Requires the HiFi plan or above.

Acceptsstring[]
header=X-My-Header=MyHeaderValue
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/headers",  "full_page": true,  "block_ads": true,  "header": "X-My-Header=MyHeaderValue"}'
Result
header=X-My-Header=MyHeaderValue
Setting multiple headers
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/headers",  "full_page": true,  "block_ads": true,  "header": [    "X-Header-1=valueOfHeader1",    "X-Header-2=valueOfHeader2"  ]}'
Result
Setting multiple headers
Aa

user_agent

string

Sets the User-Agent string for the request. The user agent identifies what browser/device is making the request, which can affect how websites render content.

Presets:

  • random - Uses a random user-agent to help avoid bot detection
  • mobile - Uses a modern iPhone/Safari user-agent string
  • desktop - Uses a modern Chrome/macOS user-agent string

Why use this?

  • Some websites serve different content based on the user agent (e.g., mobile vs desktop layouts)
  • Certain sites block requests from unknown or bot-like user agents
  • You may want to emulate how a specific browser or crawler sees a page

Testing your user agent: Try rendering httpbin.org/user-agent to see exactly what user agent string is being sent.

For a comprehensive list of user agent strings, see useragents.me.

user_agent=random
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "httpbin.org/user-agent",  "block_ads": true,  "fail_on_4xx": true,  "user_agent": "random"}'
Result
user_agent=random
user_agent=mobile
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "httpbin.org/user-agent",  "block_ads": true,  "fail_on_4xx": true,  "user_agent": "mobile"}'
Result
user_agent=mobile
user_agent=desktop
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "httpbin.org/user-agent",  "block_ads": true,  "fail_on_4xx": true,  "user_agent": "desktop"}'
Result
user_agent=desktop
Google bot
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "httpbin.org/user-agent",  "block_ads": true,  "fail_on_4xx": true,  "user_agent": "Googlebot/2.1 (+http://www.google.com/bot.html)"}'
Result
Google bot
Facebook crawler
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "httpbin.org/user-agent",  "block_ads": true,  "fail_on_4xx": true,  "user_agent": "facebookexternalhit/1.1"}'
Result
Facebook crawler
Custom
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "httpbin.org/user-agent",  "block_ads": true,  "fail_on_4xx": true,  "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36"}'
Result
Custom
Aa

platform

string

Sets the navigator.platform that the browser will report for the request. Useful for getting around certain scripts that detect the platform.

DefaultMacIntel
platform=MacIntel
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/user-agent",  "engine_version": "latest",  "fail_on_4xx": true,  "platform": "MacIntel"}'
Result
platform=MacIntel
platform=Linux x86_64
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/user-agent",  "engine_version": "latest",  "fail_on_4xx": true,  "platform": "Linux x86_64"}'
Result
platform=Linux x86_64
platform=Linux armv81
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/user-agent",  "engine_version": "latest",  "fail_on_4xx": true,  "platform": "Linux armv81"}'
Result
platform=Linux armv81
platform=Win32
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/user-agent",  "engine_version": "latest",  "fail_on_4xx": true,  "platform": "Win32"}'
Result
platform=Win32
Aa

accept_lang

string

Sets an Accept-Language header on requests to the target URL

Defaulten-US
accept_lang=de-CH
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/user-agent",  "full_page": true,  "block_ads": true,  "fail_on_4xx": true,  "accept_lang": "de-CH"}'
Result
accept_lang=de-CH
accept_lang=ko-KR
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/user-agent",  "full_page": true,  "block_ads": true,  "fail_on_4xx": true,  "accept_lang": "ko-KR"}'
Result
accept_lang=ko-KR
Aa

authorization

string

Sets an Authorization header on requests to the target URL. Can be used to pass an auth token through to the site in order to 'login' before rendering.

authorization=Basic my_base64_auth_token
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/headers",  "full_page": true,  "block_ads": true,  "authorization": "Basic my_base64_auth_token"}'
Result
authorization=Basic my_base64_auth_token
authorization=Bearer my_bearer_token
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/headers",  "full_page": true,  "block_ads": true,  "authorization": "Bearer my_bearer_token"}'
Result
authorization=Bearer my_bearer_token
Aa

tz

string

Emulate the timezone to use when rendering pages.

By default the rendering browser reports a US timezone (America/New_York or America/Los_Angeles, depending on which of our regions renders your screenshot) so that its clock agrees with where our renderers connect from. Set tz explicitly to pin it. Renders on the stable engine channel still report UTC until the next promotion of latest to stable (see engine_version).

This matters whenever the page derives anything from the browser's local clock: displayed dates and times, opening hours, "expires in" countdowns, and any cookie or token whose lifetime the page calculates client-side. If your renders need to be identical every time, or your page assumes UTC, set tz=UTC.

Example: tz=Europe/London. A list of timezone ID's can be found here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

DefaultAmerica/New_York
tz=Asia/Kolkata
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/time-zone",  "fail_on_4xx": true,  "tz": "Asia/Kolkata"}'
Result
tz=Asia/Kolkata
tz=Asia/Tokyo
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/time-zone",  "fail_on_4xx": true,  "tz": "Asia/Tokyo"}'
Result
tz=Asia/Tokyo
tz=America/Sao_Paulo
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/time-zone",  "fail_on_4xx": true,  "tz": "America/Sao_Paulo"}'
Result
tz=America/Sao_Paulo
tz=Europe/London
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/time-zone",  "fail_on_4xx": true,  "tz": "Europe/London"}'
Result
tz=Europe/London
≡

engine_version

enum

Sets the version of the urlbox rendering engine to use when rendering the page. This can be useful for testing how a page will render in the latest version of our rendering engine.

Acceptsstable · latest · experimental

No example for this option yet.

T/F

certify

boolean

This creates a hash of the rendered file, timestamp and options providing proof that a render was taken at a given time. Returns a hash, timestamp and the options used to hash. Checkout our guide on certifying a render for more information.

Requires the Ultra plan or above.

Acceptstrue · false

No example for this option yet.

Wait Options

#

redirect_after

number

For the synchronous endpoint, the time in milliseconds before Urlbox returns a 307 redirect for a long-running render, so the connection isn't cut by upstream timeouts.

Range: 5000-95000

Accepts5000-95000

No example for this option yet.

#

delay

number

The amount of time to wait before Urlbox captures a render in milliseconds.

Default0

No example for this option yet.

#

timeout

number

The amount of time to wait for the requested URL to load, in milliseconds. The timeout value needs to be between 5,000 and 100,000 milliseconds. The default is 30000 or 30 seconds.

Default30000

No example for this option yet.

≡

wait_until

enum

Waits until the specified DOM event has fired before capturing a render.

The available options are:

  • domloaded (the DOMContentLoaded event is fired)
  • mostrequestsfinished (consider navigation to be finished when there are no more than 2 network connections for at least 500 ms)
  • requestsfinished (there are no more than 0 network connections for at least 500 ms)
  • loaded (the load event is fired)
DefaultloadedAcceptsdomloaded · mostrequestsfinished · requestsfinished · loaded
Try values
domloaded
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "example.com",  "wait_until": "domloaded"}'
Result
wait_until domloaded
Aa

wait_for

string

Waits for the element specified by this selector to be present in the DOM before taking a screenshot or PDF.

By default, Urlbox will take a screenshot or PDF if the wait_for element is not found after waiting for the time specified by the wait_timeout option.

If you prefer Urlbox to fail the request when the wait_for element is not found, pass fail_if_selector_missing=true

Without wait_for
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/loads_in/10/seconds",  "wait_for": ""}'
Result
Without wait_for
wait_for=#loaded_element
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/loads_in/10/seconds",  "wait_for": "#loaded_element"}'
Result
wait_for=#loaded_element
≡

wait_for_state

enum

Whether the element specified by wait_for should be visible or just present in the DOM. Visible means the element is attached to the DOM and has opacity > 0 and its width and height > 0 and doesn't have visibility:hidden set.

DefaultattachedAcceptsvisible · attached

No example for this option yet.

Aa

wait_to_leave

string

Waits for the element specified by this selector to be absent from the DOM before taking a screenshot or PDF.

A typical use-case would be waiting for loading spinners to be absent before taking a screenshot.

By default, Urlbox will take a screenshot or PDF if the wait_to_leave element is still present after the time specified by the wait_timeout option.

If you prefer Urlbox to fail the request when the wait_to_leave element is still present, pass fail_if_selector_present=true

Without wait_to_leave
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/loads_in/10/seconds",  "wait_to_leave": ""}'
Result
Without wait_to_leave
wait_to_leave=#loading_element
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/loads_in/10/seconds",  "wait_to_leave": "#loading_element"}'
Result
wait_to_leave=#loading_element
#

wait_timeout

number

The amount of time to wait for the wait_for element to appear, or the wait_to_leave element to leave before continuing, in milliseconds.

Default30000

No example for this option yet.

Fail Options

T/F

fail_if_selector_missing

boolean

Fails the request if the elements specified by selector or wait_for options are not found on the page after waiting for wait_timeout.

DefaultfalseAcceptstrue · false
fail_if_selector_missing=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "wait_for": "#element-that-never-appears",  "fail_if_selector_missing": true}'
Result
Error response
{  "error": {    "code": "fail_if_selector_missing",    "message": "wait_for element did not appear before wait_timeout ms"  },  "debugScreenshot": {    "location": "https://storage.googleapis.com/ub-temp-renders/renders/.../[render-id]-debug-fail.png",    "size": 208330  },  "requestId": "[request-id]"}
T/F

fail_if_selector_present

boolean

Fails the request if the element specified by wait_to_leave option is found on the page after waiting for wait_timeout.

DefaultfalseAcceptstrue · false
fail_if_selector_present=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "wait_to_leave": "#loading-spinner",  "fail_if_selector_present": true}'
Result
Error response
{  "error": {    "code": "fail_if_selector_present",    "message": "timed out waiting for element to leave"  },  "debugScreenshot": {    "location": "https://storage.googleapis.com/ub-temp-renders/renders/.../[render-id]-debug-fail.png",    "size": 208724  },  "requestId": "[request-id]"}
[ ]

fail_on

array

Pass in a specific HTTP status code (e.g., "400", "500") or an array of status codes (e.g., ["400", "404", "500"]) as strings. Urlbox will fail the request if the final response status code matches any of the specified codes.

Acceptsstring | string[]
fail_on="404"
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/status/404",  "fail_on": "404"}'
Result
Error response
{  "error": {    "code": "fail_on_specific",    "message": "Page returned 404 and fail_on includes 404"  },  "statusCode": 404,  "statusCodeInitial": 307,  "urlRequested": "http://test-site.urlbox.com/status/404",  "urlResolved": "https://test-site.urlbox.com/status/404",  "debugScreenshot": {    "location": "https://storage.googleapis.com/ub-temp-renders/renders/.../[render-id]-debug-fail.png",    "size": 75513  },  "requestId": "[request-id]"}
T/F

fail_on_4xx

boolean

If fail_on_4xx=true and the requested URL returns a status code between 400 and 499, Urlbox fails the request with a 400 error, an error code of fail_on_4xx, and a message naming the status code (for example Page returned 404 and fail_on_4xx was true).

DefaultfalseAcceptstrue · false
fail_on_4xx=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/status/404",  "fail_on_4xx": true}'
Result
Error response
{  "error": {    "code": "fail_on_4xx",    "message": "Page returned 404 and fail_on_4xx was true"  },  "statusCode": 404,  "statusCodeInitial": 308,  "urlRequested": "http://test-site.urlbox.com/status/404",  "urlResolved": "https://test-site.urlbox.com/status/404",  "debugScreenshot": {    "location": "https://storage.googleapis.com/ub-temp-renders/renders/.../[render-id]-debug-fail.png",    "size": 75513  },  "requestId": "[request-id]"}
T/F

fail_on_5xx

boolean

If fail_on_5xx=true and the requested URL returns a status code between 500 and 599, Urlbox fails the request with a 400 error, an error code of fail_on_5xx, and a message naming the status code (for example Page returned 500 and fail_on_5xx was true).

DefaultfalseAcceptstrue · false
fail_on_5xx=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "test-site.urlbox.com/status/500",  "fail_on_5xx": true}'
Result
Error response
{  "error": {    "code": "fail_on_5xx",    "message": "Page returned 500 and fail_on_5xx was true"  },  "statusCode": 500,  "statusCodeInitial": 307,  "urlRequested": "http://test-site.urlbox.com/status/500",  "urlResolved": "https://test-site.urlbox.com/status/500",  "debugScreenshot": {    "location": "https://storage.googleapis.com/ub-temp-renders/renders/.../[render-id]-debug-fail.png",    "size": 83428  },  "requestId": "[request-id]"}
[ ]

fail_on_except

array

Specify status codes to exclude from fail_on, fail_on_4xx, or fail_on_5xx checks. For example, if you want to fail on all 5xx errors except 503, use fail_on_5xx=true with fail_on_except=503.

Acceptsstring | string[]

No example for this option yet.

[ ]

retry_on

array

Automatically retry renders when specific conditions occur. Pass a single condition, a comma-separated string, or an array of conditions.

When a condition matches, Urlbox will retry with exponential backoff (the delay doubles each time, starting at 1 second by default and capped at 30 seconds per wait) up to 2 times by default (3 total attempts including the original render). Use max_retries or max_attempts to change this. Retrying stops early if the request approaches the overall 5 minute render budget.

HTTP status conditions (retry based on the page's response):

  • 4xx - Retry when the page returns any 4xx status. This range deliberately skips retrying when the failure looks like a problem with the request itself rather than a block (for example a missing selector or an invalid option), since those would fail identically on every attempt. List codes like 403/429 explicitly to always retry them.
  • 5xx - Retry when the page returns any 5xx status
  • 404, 429, 503, etc. - Retry on specific status codes

Engine conditions (retry when Urlbox encounters an internal error):

  • timeout - Retry when the render times out
  • crash - Retry when the browser crashes

Quality conditions:

  • small_size - Retry when the screenshot is smaller than min_size_bytes

Special values:

  • all - Retry on any of the conditions above

Examples:

  • retry_on: "4xx" - Retry when the page returns any 4xx status
  • retry_on: ["429", "503"] - Retry on rate limiting or service unavailable
  • retry_on: "timeout,crash" - Retry on engine failures only
  • retry_on: "5xx,timeout" - Retry on page 5xx errors or timeouts

Note: If a condition matches both retry_on and fail_on, the request will be retried first. Use fail_on_except to mark specific status codes as acceptable (won't retry or fail).

Requires the Ultra plan or above.

Acceptsstring | string[]

No example for this option yet.

[ ]

retry_with

array

Change render options on retry attempts triggered by retry_on. Instead of retrying with the exact same options, each retry re-runs the render with the retry_with options merged over the original request, so you can escalate progressively: try a cheap, plain render first, and only add stealth or a proxy if the render fails.

retry_with has no effect on its own; it only applies when retry_on triggers a retry. Because the value is a nested object, use it with JSON POST requests to the render endpoints.

Single object - applied to every retry attempt. Array of objects - progressive escalation: the first retry uses the first element, the second retry the second, and so on; the last element is reused if there are more retries than elements.

Merging rules: each retry's options are the original request options with that attempt's retry_with entry merged on top. Setting an option to null removes it for that attempt; options you don't mention are left unchanged. Only options that affect how the page is fetched and rendered can be changed on retry (proxy, stealth, waiting, viewport, headers/cookies and similar) - options that change the output itself (like format or full_page) cannot.

Requires the Ultra plan or above.

Acceptsobject | object[]

No example for this option yet.

#

max_retries

number

Maximum number of retry attempts when using retry_on. Must be between 0 and 5. If max_attempts is also set, max_attempts takes precedence.

Requires the Ultra plan or above.

Default2

No example for this option yet.

#

max_attempts

number

Maximum total number of render attempts (the original render plus retries) when using retry_on. Must be between 0 and 5. An alternative to max_retries: max_attempts is equivalent to max_retries + 1, and takes precedence over it when both are set.

Requires the Ultra plan or above.

Default3

No example for this option yet.

#

retry_delay_ms

number

Base delay in milliseconds between retry attempts. The delay doubles with each retry (exponential backoff), with each individual wait capped at 30 seconds. Must be between 100 and 60000.

Requires the Ultra plan or above.

Default1000

No example for this option yet.

#

min_size_bytes

number

Minimum expected file size in bytes. Used with retry_on: "small_size" to retry when the screenshot is smaller than expected, which may indicate an error page was captured instead of the intended content.

Requires the Ultra plan or above.

Default1000

No example for this option yet.

Page Options

Aa

scroll_to

string

Scroll, to either an element or to a pixel offset from the top, before taking a screenshot

Acceptsstring | number
scroll_to=#playground
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "scroll_to": "#playground"}'
Result
scroll_to=#playground
scroll_to=1024
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "scroll_to": 1024}'
Result
scroll_to=1024
scroll_to=5000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "scroll_to": 5000}'
Result
scroll_to=5000
Aa

click

string

Specifies an element selector to click before generating a screenshot or PDF

Example: #clickme would click an element with id="clickme".

Can be used multiple times to simulate multiple sequential click events.

If the selector matches multiple elements, only the first element will be clicked.

Minimizing the overlay
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.wikipedia.org/",  "click": "#overlay-banner-toggle"}'
Result
Minimizing the overlay
Without minimizing the overlay
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.wikipedia.org/"}'
Result
Without minimizing the overlay
[ ]

click_all

array

Specifies an element selector to click before generating a screenshot or PDF

Example: .clickme would click all elements with class="clickme".

Can be used multiple times to simulate multiple sequential click events.

If the selector matches multiple elements, all elements will be clicked.

Acceptsstring[]
Navigate to a Sign-up page, and agree to policies.
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.npmjs.com/",  "click_all": [    "#signup",    "#signup_eula-agreement"  ]}'
Result
Navigate to a Sign-up page, and agree to policies.
Aa

hover

string

Specifies an element selector to hover over before generating a screenshot or PDF

Example: #hoverme would hover over the element with id="hoverme"

Hovering over the ruby-on-rails logo
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://rubyonrails.org/",  "hover": ".nav__logo"}'
Result
Hovering over the ruby-on-rails logo
Without hovering over the ruby-on-rails logo
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://rubyonrails.org/"}'
Result
Without hovering over the ruby-on-rails logo
Aa

bg_color

string

Specify a hex code or CSS color string to use as the background color

Some websites don't set a body background colour, and will show up as transparent backgrounds with PNG, or black when using JPG. Use this setting to set a background colour. If the website explicitly sets a transparent background on the html or body elements, this setting will be overridden.

No example for this option yet.

T/F

disable_js

boolean

Turns off javascript on the target URL.

~> Enabling this option will prevent full_page=true and many other options, because having javascript disabled prevents Urlbox from evaluating code inside the page's context.

DefaultfalseAcceptstrue · false
disable_js=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "nytimes.com",  "disable_js": true}'
Result
disable_js=true
disable_js=false
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "nytimes.com",  "disable_js": false}'
Result
disable_js=false
T/F

show_certificate_errors

boolean

Shows browser certificate errors for pages with invalid HTTPS certificates. By default, Urlbox ignores certificate errors so pages with expired, self-signed, or otherwise invalid certificates can still render.

DefaultfalseAcceptstrue · false

No example for this option yet.

Full Page Options

T/F

freeze_fixed

boolean

Detect fixed/sticky elements (headers, footers) and capture them only once, instead of repeating them across each stitched full-page section.

DefaulttrueAcceptstrue · false

No example for this option yet.

#

max_sections

number

Maximum number of screenshot sections to capture when stitching a full-page screenshot.

No example for this option yet.

≡

full_page_mode

enum

Whether to use scroll and stitch algorithm (the default) to render a full page screenshot, or to use the native full page screenshot algorithm, which is faster, but can be less accurate on some sites.

DefaultstitchAcceptsstitch · native

No example for this option yet.

T/F

full_width

boolean

When full_page=true, specify whether to capture the full width of the website, for example if the site is horizontally scrolling.

DefaultfalseAcceptstrue · false

No example for this option yet.

T/F

allow_infinite

boolean

By default, when Urlbox detects an infinite scrolling page, it does not attempt to continue scrolling to the bottom, as this could result in infinite scrolling! If you want to override this behaviour, pass true for this option.

DefaultfalseAcceptstrue · false

No example for this option yet.

T/F

skip_scroll

boolean

Enabling skip_scroll will speed up renders by skipping an initial scroll through the page, which is used to trigger any lazy loading elements.

DefaultfalseAcceptstrue · false
skip_scroll=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "full_page": true,  "skip_scroll": true}'
Result
skip_scroll=true
skip_scroll=false
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "full_page": true,  "skip_scroll": false}'
Result
skip_scroll=false
T/F

detect_full_height

boolean

Some pages have full-height backgrounds whose heights are set to 100% of the viewport. This can cause the backgrounds to get stretched when making a full page screenshot. If you are seeing this behaviour in your full page screenshots, pass true for this option.

DefaultfalseAcceptstrue · false

No example for this option yet.

#

max_section_height

number

When Urlbox takes a full_page screenshot, the maximum height of each image section is set to 4096 pixels. If a sites height is greater than this value, Urlbox will start splitting the screenshot into sections. Sometimes it is worthwhile experimenting with this number.

Default4096

No example for this option yet.

#

scroll_increment

number

Sets how many pixels to scroll when scrolling the page to trigger lazy loading elements. By default, the scroll increment is set to the browser viewport height. Some pages' lazy loading elements only trigger when the scroll increment is smaller than this, however, e.g. 400px.

No example for this option yet.

#

scroll_delay

number

When Urlbox decides to split a screenshot into multiple sections, the scroll delay is the time to wait between taking the screenshots of each individual section, in milliseconds. While Urlbox does detect animations, and attempts to wait for them before taking a screenshot, this option could be used to force Urlbox to wait for a certain amount of time after scrolling to the next section, to wait for things like animations to finish.

No example for this option yet.

Highlighting Options

Aa

highlight

string

Specify a string to highlight on the page before capturing a screenshot or PDF. To highlight multiple words, separate words with a pipe character e.g. Hello|World

highlight=urlbox|api
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "highlight": "urlbox|api"}'
Result
Aa

highlightfg

string

Specify the text color of the highlighted word.

Defaultwhite
Using color name
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "highlight": "urlbox|api",  "highlightbg": "black",  "highlightfg": "blue"}'
Result
Using rgb
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "highlight": "urlbox|api",  "highlightbg": "black",  "highlightfg": "rgb(42,160,68)"}'
Result
Using rgba
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "highlight": "urlbox|api",  "highlightbg": "black",  "highlightfg": "rgba(255,255,0,1)"}'
Result
Aa

highlightbg

string

Specify the background color of the highlighted word.

Defaultred
Using color name
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "highlight": "urlbox|api",  "highlightfg": "black",  "highlightbg": "blue"}'
Result
Using rgb
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "highlight": "urlbox|api",  "highlightfg": "black",  "highlightbg": "rgb(42,160,68)"}'
Result
Using rgba
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "format": "pdf",  "highlight": "urlbox|api",  "highlightfg": "black",  "highlightbg": "rgba(255,255,0,1)"}'
Result

Geolocation Options

#

latitude

number

Sets the latitude used to emulate the Geolocation API.

latitude=74.006
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.infobyip.com/browsergeolocation.php",  "longitude": 40.7128,  "latitude": 74.006}'
Result
latitude=74.006
#

longitude

number

Sets the longitude used to emulate the Geolocation API.

longitude=40.7128
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.infobyip.com/browsergeolocation.php",  "latitude": 74.006,  "longitude": 40.7128}'
Result
longitude=40.7128
#

accuracy

number

Sets the accurate of the Geolocation API in metres.

accuracy=100
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.infobyip.com/browsergeolocation.php",  "latitude": 74.006,  "longitude": 40.7128,  "accuracy": 100}'
Result
accuracy=100
accuracy=5000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://www.infobyip.com/browsergeolocation.php",  "latitude": 74.006,  "longitude": 40.7128,  "accuracy": 5000}'
Result
accuracy=5000

Storage Options

Aa

s3_presigned_url

string

Return a time-limited presigned URL to the render in your S3 bucket, instead of the default response. The URL grants temporary access without exposing your credentials.

No example for this option yet.

T/F

use_s3

boolean

Save the render directly to the S3 (or S3-Compatible) bucket configured on your account.

Mutually exclusive with use_azure - a request setting both fails.

Requires the HiFi plan or above.

DefaultfalseAcceptstrue · false

No example for this option yet.

Aa

s3_path

string

Sets the S3 path, including subdirectories and the filename, to use when saving the render in your S3-compatible bucket.

~> The extension (e.g. .png, .jpg or .pdf) will be provided automatically, and should not be included in s3_path.

Requires the HiFi plan or above.

No example for this option yet.

T/F

no_suffix

boolean

By default, urlbox adds the file extension (e.g. .png, .jpg, .pdf etc) to the s3_path (or azure_path).

If no_suffix=true, the file extension will NOT be added to the path.

Requires the HiFi plan or above.

Acceptstrue · false

No example for this option yet.

T/F

use_azure

boolean

Save the render directly to the Azure Blob Storage container configured on your project. Azure is not S3-compatible, so it has its own credentials (storage account, container and SAS token) and options - see the Azure Blob Storage guide for setup.

Mutually exclusive with use_s3 - a request setting both fails.

Requires the HiFi plan or above.

DefaultfalseAcceptstrue · false

No example for this option yet.

Aa

azure_path

string

Sets the blob path, including subdirectories and the filename, to use when saving the render in your Azure container - the Azure equivalent of s3_path. Defaults to renders/{year}/{month}/{day}/{renderId}.

~> The extension (e.g. .png, .jpg or .pdf) will be provided automatically, and should not be included in azure_path.

Requires the HiFi plan or above.

No example for this option yet.

Aa

s3_bucket

string

Overrides the configured bucket to use when saving the render.

Requires the HiFi plan or above.

No example for this option yet.

Aa

s3_endpoint

string

You can change the endpoint URL to use an S3 compatible storage provider e.g. DigitalOcean Spaces, Minio, Wasabi, Cloudflare R2 and more.

Requires the HiFi plan or above.

No example for this option yet.

Aa

s3_region

string

Override the configured S3 region when saving the render.

Requires the HiFi plan or above.

No example for this option yet.

Aa

cdn_host

string

If your custom bucket is fronted by a CDN, you can set the host name here.

Requires the HiFi plan or above.

No example for this option yet.

≡

s3_storageclass

enum

Sets the s3 storage class.

Requires the HiFi plan or above.

DefaultstandardAcceptsstandard · standard_ia · reduced_redundancy · onezone_ia · intelligent_tiering · glacier · deep_archive · outposts

No example for this option yet.

LLM Options

T/F

use_llm

boolean

Use the LLM configuration setup in your project settings, or those passed into the request.

Requires the Ultra plan or above.

Acceptstrue · false

No example for this option yet.

Aa

llm_prompt

string

The prompt to give the LLM EG "Analyse this image and its associated HTML, giving me back a summary of what the website contents are and a list of all of the links it has "

Requires the Ultra plan or above.

No example for this option yet.

Aa

llm_system_prompt

string

This can be used to provide more overall context for the AI's response.

Requires the Ultra plan or above.

No example for this option yet.

Aa

llm_key

string

The API access key for the given LLM provider.

Requires the Ultra plan or above.

No example for this option yet.

≡

llm_provider

enum

The LLM provider to use.

Requires the Ultra plan or above.

Acceptsanthropic · openai · google · azure · mistral · cohere · amazon-bedrock · google-vertex · groq · xai · deepseek · perplexity · togetherai · fireworks · cerebras · openrouter

No example for this option yet.

Aa

llm_model

string

The LLM model to use for the given provider. E.g. 'gpt-5.1' for OpenAI, 'claude-sonnet-4-5-20250929' for Anthropic.

Requires the Ultra plan or above.

No example for this option yet.

#

llm_temperature

number

The temperature (creativity) for the LLM prompt. Defaults to 0 for less creative responses.

Requires the Ultra plan or above.

No example for this option yet.

#

llm_max_tokens

number

The max number of output tokens the LLM can generate a response with. Defaults to 1000.

Requires the Ultra plan or above.

No example for this option yet.

#

llm_height

number

The height of the thumbnail image that is sent to the LLM. Defaults to 512.

Requires the Ultra plan or above.

No example for this option yet.

#

llm_width

number

The width of the thumbnail image that is sent to the LLM. Defaults to 512.

Requires the Ultra plan or above.

No example for this option yet.

Aa

llm_base_url

string

Override the default API endpoint for the LLM provider. Useful for proxies, self-hosted models, or custom endpoints.

Requires the Ultra plan or above.

No example for this option yet.

Aa

llm_azure_resource_name

string

Azure OpenAI resource name. Used to construct the endpoint URL: https://{resourceName}.openai.azure.com/

No example for this option yet.

Aa

llm_azure_api_version

string

Azure OpenAI API version. Required when using deployment URLs. E.g. '2024-02-15-preview'.

No example for this option yet.

T/F

llm_azure_use_deployment_urls

boolean

Use legacy Azure deployment URL format. Useful for compatibility with certain Azure OpenAI models or deployments that require the legacy endpoint format.

Acceptstrue · false

No example for this option yet.

Aa

llm_aws_region

string

AWS region for Amazon Bedrock. Defaults to 'us-east-1'.

No example for this option yet.

Aa

llm_aws_access_key_id

string

AWS access key ID for Amazon Bedrock authentication.

No example for this option yet.

Aa

llm_aws_secret_access_key

string

AWS secret access key for Amazon Bedrock authentication.

No example for this option yet.

Aa

llm_aws_session_token

string

Optional AWS session token for temporary credentials with Amazon Bedrock.

No example for this option yet.

Aa

llm_gcp_project

string

Google Cloud project ID for Google Vertex AI.

No example for this option yet.

Aa

llm_gcp_location

string

Google Cloud region for Vertex AI. Defaults to 'us-central1'.

No example for this option yet.

Aa

llm_gcp_service_account_json

string

Google Cloud service account JSON key for Vertex AI authentication. Pass the entire JSON key file contents as a string.

No example for this option yet.

T/F

llm_full_response

boolean

Return the full LLM response including usage statistics and metadata, rather than just the text content.

Requires the Ultra plan or above.

Acceptstrue · false

No example for this option yet.

≡

llm_output

enum

You can provide a structured output type and schema to Urlbox, and we will prompt your LLM to give back that response structure. By passing an llm_schema without this option, it will default to responding with an object specified by your JSON Schema. If you choose Array, the response will be an array of your provided JSON Schema. If you choose enum, you can provide an array of strings as your schema, and your LLM will respond only with a value from that enum.

Requires the Ultra plan or above.

Acceptsobject · array · enum

No example for this option yet.

Aa

llm_schema

string

This is the JSON schema or string[] provided which we will pass over to your LLM. Your LLM provider will respond with a structured output (if supported by your provider) according to that schema. Please take a look at the various resources on the JSON Schema website for more information on designing and validating a JSON schema.

Requires the Ultra plan or above.

AcceptsJSON
Screenshot of urlbox.com
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "use_llm": true,  "llm_prompt": "Please analyse this image, respecting the structured output provided.",  "llm_output": "object",  "llm_schema": {    "type": "object",    "properties": {      "url": {        "type": "string",        "format": "uri",        "description": "The original URL of the webpage"      },      "title": {        "type": "string",        "description": "The title of the webpage"      },      "description": {        "type": "string",        "description": "A short summary of what is visible in the screenshot"      }    },    "required": [      "url",      "title",      "description"    ]  }}'
Result
Screenshot of urlbox.com
Screenshot of urlbox.com
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "use_llm": true,  "llm_prompt": "Please analyse this image, respecting the structured output provided.",  "llm_output": "array",  "llm_schema": {    "type": "object",    "properties": {      "url": {        "type": "string",        "format": "uri",        "description": "The original URL of the webpage"      },      "title": {        "type": "string",        "description": "The title of the webpage"      },      "description": {        "type": "string",        "description": "A short summary of what is visible in the screenshot"      }    },    "required": [      "url",      "title",      "description"    ]  }}'
Result
Screenshot of urlbox.com
Screenshot of urlbox.com
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "use_llm": true,  "llm_prompt": "Analyse this website screenshot, and tell me what category of site it is based on my structured output schema.",  "llm_output": "enum",  "llm_schema": [    "website",    "blog",    "ecommerce",    "documentation",    "social",    "news"  ]}'
Result
Screenshot of urlbox.com

Video Options

[ ]

video_scroll_to

array

Scroll to and pause on specific page sections in turn while recording, instead of a constant scroll. Each stop is a CSS selector or a text=... locator, optionally followed by ;wait=... and ;duration=... (over a render link), or given as { selector | text, wait, duration, ease, offset } objects (in a JSON body). See the Recording videos guide.

Acceptsstring | string[]
Scroll to sections in turn
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll_to": [    "text=Pricing;wait=2s",    "text=Enterprise;wait=2s"  ]}'
Result
T/F

video_scroll

boolean

Smoothly scroll down the page while recording, section by section, then scroll back to the top. Scroll speed, easing, pauses and distance are controlled by the options below.

DefaultfalseAcceptstrue · false
video_scroll=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true}'
Result
#

video_scroll_distance

number

Distance in pixels to scroll the page during the video.

video_scroll_distance=3000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_scroll_distance": 3000}'
Result
#

video_scroll_duration

number

How long the scroll takes, in milliseconds.

video_scroll_duration=6000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_scroll_duration": 6000}'
Result
T/F

video_scroll_back

boolean

Whether to scroll back up to the top after reaching the bottom.

Acceptstrue · false
video_scroll_back=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_scroll_back": true}'
Result
#

video_scroll_back_duration

number

Duration of the scroll-back motion, in milliseconds.

video_scroll_back_duration=3000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_scroll_back": true,  "video_scroll_back_duration": 3000}'
Result
#

video_sections_to_scroll

number

Number of page sections to scroll through during the video.

video_sections_to_scroll=3
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_sections_to_scroll": 3}'
Result
Aa

video_ease

string

Easing function applied to the scroll motion (for example ease-in-out).

video_ease="ease-in-out"
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_ease": "ease-in-out"}'
Result
Aa

video_ease_end

string

Easing function applied at the end of the scroll.

video_ease_end="ease-out"
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_ease_end": "ease-out"}'
Result
#

video_jitter

number

Adds slight random variation (jitter) to the scroll motion.

video_jitter=5
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_jitter": 5}'
Result
#

video_prescroll_duration

number

Pause before scrolling starts, in milliseconds.

video_prescroll_duration=2000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_prescroll_duration": 2000}'
Result
#

video_postscroll_duration

number

Pause after scrolling finishes, in milliseconds.

video_postscroll_duration=2000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_postscroll_duration": 2000}'
Result
#

video_rest_duration

number

Rest/pause between scroll segments, in milliseconds.

video_rest_duration=1000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_rest_duration": 1000}'
Result
#

video_fps

number

Frames per second of the output video.

video_fps=60
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_fps": 60}'
Result
#

video_bits_per_second

number

Target bitrate of the output video, in bits per second.

video_bits_per_second=4000000
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_bits_per_second": 4000000}'
Result
#

video_width

number

Width of the output video, in pixels.

video_width=1280
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_width": 1280}'
Result
#

video_height

number

Height of the output video, in pixels.

video_height=720
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_height": 720}'
Result
#

video_time

number

Total duration of the video, in seconds. Longer videos cost more, so set a sensible cap.

video_time=8
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "stripe.com",  "format": "mp4",  "video_scroll": true,  "video_time": 8}'
Result

Extraction Options

T/F

save_markdown

boolean

Also extract and save the page as Markdown alongside the render.

Acceptstrue · false
save_markdown=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "save_markdown": true}'
Result
save_markdown=true
T/F

save_html

boolean

Also save the page's rendered HTML.

Acceptstrue · false
save_html=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "save_html": true}'
Result
save_html=true
T/F

save_mhtml

boolean

Also save the page as MHTML (a single-file web archive).

Acceptstrue · false
save_mhtml=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "urlbox.com",  "save_mhtml": true}'
Result
save_mhtml=true
T/F

save_metadata

boolean

Also extract and save page metadata (title, description, OpenGraph, etc.).

Acceptstrue · false
save_metadata=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "bbc.co.uk",  "save_metadata": true}'
Result
save_metadata=true
T/F

save_headings

boolean

Also extract and save the page's headings.

Acceptstrue · false
save_headings=true
Request
curl -X POST \  https://api.urlbox.com/v1/render/sync \  -H 'Authorization: Bearer YOUR_URLBOX_SECRET' \  -H 'Content-Type: application/json' \  -d '{  "url": "en.wikipedia.org/wiki/Screenshot",  "save_headings": true}'
Result
save_headings=true

Webhook Options

Aa

webhook_url

string

A URL that Urlbox will POST the render result to once the render completes, when using the asynchronous render endpoint. Verify the request signature with your project's webhook secret.

No example for this option yet.