Every render option the Urlbox API accepts. Search, then read the description, type, default and live examples for each.
The URL or domain of the website you want to screenshot. We will automatically prepend http:// if it is missing.
The HTML you want to render.
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}'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}'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"}'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}'The output format of the resulting render.
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"}'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"}'{ "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/" }}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"}'{ "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/" }}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"}'The viewport width of the browser, in pixels.
The viewport height of the browser, in pixels.
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.
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}'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.
Clip the screenshot to the bounding box specified by x,y,width,height.
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.
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.
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"}'{ "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/" }}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.
No example for this option yet.
Blocks requests from popular advertising networks from loading.
Automatically hides cookie banners from most websites, by setting their style to display: none !important;
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.
Attempts to press the Escape (ESC) key before capturing the page. Useful for dismissing pop-ups, overlays, or advertising banners that appear on load.
No example for this option yet.
Block requests from specific domains from loading. You can use wildcard characters such as * to match subdomains.
Blocks image requests
Blocks font requests
Block video and audio requests
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/"}'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"}'Prevent stylesheet requests from loading
Prevent requests for javascript scripts from loading
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}'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"}'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.
Block fetch requests from the target URL.
No example for this option yet.
Block XHR requests from the target URL.
Prevents WebSocket connections from being established, blocking real-time communication features like live chat, notifications, or dynamic updates.
No example for this option yet.
Block data URLs such as data:image/png;base64,...
No example for this option yet.
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:
Selector types supported:
h1, div, img) - Hide all elements of that type.popup, .banner) - Hide elements with specific CSS classes#header, #sidebar) - Hide elements with specific IDs.nav ul li, div.content > p) - Use any valid CSS selectorTip: 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".
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.
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);"}'Inject custom CSS into the page
Emulate dark mode on websites by setting prefers-color-scheme: dark
Prefer less animations on websites by setting prefers-reduced-motion: reduced
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}'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"}'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.
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.
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.
The width of the generated thumbnail, in pixels. Omit for a full-size screenshot.
The height of the generated thumbnail, in pixels. Omit for a full-size screenshot.
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.
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" } ]}'

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.
No example for this option yet.
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.How the image should be positioned when using an img_fit of cover or contain.
Background colour to use when img_fit is contain, or img_pad is used, defaults to black without transparency
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.
The image quality of the resulting screenshot (JPEG/WebP only)
Range: 0-100
If a website has no background color set, the image will have a transparent background (PNG/WebP only)
No example for this option yet.
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.
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
Sets the PDF page size.
Setting this option will take precedence over pdf_page_width and pdf_page_height.
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"}'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"}'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"}'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.
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"}'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"}'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"}'Sets the PDF page width, in pixels.
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}'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}'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}'Sets the PDF page height, in pixels.
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}'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}'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}'Sets the margin of the PDF document.
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"}'Sets a custom top margin on the PDF.
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}'Sets a custom right margin on the PDF.
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}'Sets a custom bottom margin on the PDF.
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}'Set a custom left margin on the PDF.
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}'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.
No example for this option yet.
Sets the scale factor of the website content in the PDF. Valid values are numbers between 0.1 and 2.
Range: 0.1 - 2
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}'Sets the orientation of the PDF.
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"}'Sets whether to print background images in the PDF
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}'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}'Prevents ligatures from being used. Useful when rendering a PDF, and you want to extract text which contains ligatures.
No example for this option yet.
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.
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"}'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"}'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"}'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"}'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.
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}'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:
datetitle of the pageurl of the pagepageNumbertotalPages in the pdf documentYou 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.
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>"}'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>"}'Whether to show the default pdf footer on each page of the pdf. The template of the footer can be changed by setting the pdf_footer option.
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_footer": true}'Change the default pdf footer that is shown on each page of the pdf when pdf_show_footer option is set.
You have the option to show the following variables in the footer (or header) of the pdf:
datetitle of the pageurl of the pagepageNumbertotalPages in the pdf documentYou 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 footer template:
<div class="date"></div><div class="url"></div>.
The pdf footer template you set are inserted as the innerHTML of a parent div which is a flex container, and has align-items set to flex-end.
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 footer is:
<div class='url text left grow'></div><div class='text right'><span class='pageNumber'></span>/<span class='totalPages'></span></div>.
You can see exactly how the pdf page is constructed by looking at the chromium pdf template in the chromium source repository.
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_footer": true, "pdf_footer": "<div class='date text left'></div><div class='url text right'></div>"}'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_footer": true, "pdf_footer": "<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>"}'Make the pdf into a readable document by removing unnecessary elements such as navigation bars, ads, etc.
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}'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.
Sets the subject metadata field of the PDF document. This is visible in PDF readers under document properties.
No example for this option yet.
Sets the author metadata field of the PDF document. This is visible in PDF readers under document properties.
No example for this option yet.
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.
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.
Generate a fresh render on each request, instead of getting a cached version.
No example for this option yet.
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.
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).
Enable stealth mode to reduce automated-browser detection on sites that block headless browsers.
No example for this option yet.
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.
No example for this option yet.
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.
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.
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.
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" ]}'Sets a cookie on the request when loading the URL.
Example: To set the cookie with key Opt-In to the value yes, you would set the value of this option to Opt-In=yes.
Cookies can be passed as an array, to allow setting multiple cookies - e.g.["Opt-In=yes","Session-Id=DMTIzNDU"].
To achieve multiple cookies with render links, just set the cookie option multiple times, like cookie=Opt-In%3Dyes&cookie=Session-Id%3DDMTIzNDU.
To set a specific domain on a cookie, you can do the following: OptIn=yes;Domain=.mydomain.com.
You can set other attributes for the cookie such as Path, HttpOnly and SameSite
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/cookies", "full_page": true, "block_ads": true, "cookie": [ "OptIn=yes", "BestScreenshots=urlbox", "SomeComplexJson={\"user\":{\"id\": 123,\"name\": \"Alice\",\"preferences\": { \"notifications\": true, \"theme\": \"dark\"},\"address\": null,\"quote\": \"She said, \"It's a beautiful day!\"\",\"complex_key\": \"Value with a space\",\"large_number\": 12345678901234567890,\"mixed_array\": [true, 123, \"text\", null, { \"nested\": \"object\" }]},\"is_active\": \"true\", // My comment\"special_characters\": \"This string has a backslash: \\ and a newline:\n\"}" ]}'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/cookies", "full_page": true, "block_ads": true, "cookie": [ "SomeCookie=value;Domain=.mydomain.com;Path=/somepath;SameSite=Lax;", "BestScreenshots=urlbox;" ]}'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 detectionmobile - Uses a modern iPhone/Safari user-agent stringdesktop - Uses a modern Chrome/macOS user-agent stringWhy use this?
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.
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"}'Sets the navigator.platform that the browser will report for the request. Useful for getting around certain scripts that detect the platform.
Sets an Accept-Language header on requests to the target URL
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.
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
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.
No example for this option yet.
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.
No example for this option yet.
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
No example for this option yet.
The amount of time to wait before Urlbox captures a render in milliseconds.
No example for this option yet.
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.
No example for this option yet.
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)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
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.
No example for this option yet.
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
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.
No example for this option yet.
Fails the request if the elements specified by selector or wait_for options are not found on the page after waiting for wait_timeout.
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}'{ "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]"}Fails the request if the element specified by wait_to_leave option is found on the page after waiting for wait_timeout.
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}'{ "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]"}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.
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"}'{ "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]"}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).
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}'{ "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]"}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).
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}'{ "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]"}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.
No example for this option yet.
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 status404, 429, 503, etc. - Retry on specific status codesEngine conditions (retry when Urlbox encounters an internal error):
timeout - Retry when the render times outcrash - Retry when the browser crashesQuality conditions:
small_size - Retry when the screenshot is smaller than min_size_bytesSpecial values:
all - Retry on any of the conditions aboveExamples:
retry_on: "4xx" - Retry when the page returns any 4xx statusretry_on: ["429", "503"] - Retry on rate limiting or service unavailableretry_on: "timeout,crash" - Retry on engine failures onlyretry_on: "5xx,timeout" - Retry on page 5xx errors or timeoutsNote: 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.
No example for this option yet.
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.
No example for this option yet.
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.
No example for this option yet.
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.
No example for this option yet.
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.
No example for this option yet.
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.
No example for this option yet.
Scroll, to either an element or to a pixel offset from the top, before taking a screenshot
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.
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.
Specifies an element selector to hover over before generating a screenshot or PDF
Example: #hoverme would hover over the element with id="hoverme"
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.
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.
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.
No example for this option yet.
Detect fixed/sticky elements (headers, footers) and capture them only once, instead of repeating them across each stitched full-page section.
No example for this option yet.
Maximum number of screenshot sections to capture when stitching a full-page screenshot.
No example for this option yet.
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.
No example for this option yet.
When full_page=true, specify whether to capture the full width of the website, for example if the site is horizontally scrolling.
No example for this option yet.
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.
No example for this option yet.
Enabling skip_scroll will speed up renders by skipping an initial scroll through the page, which is used to trigger any lazy loading elements.
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.
No example for this option yet.
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.
No example for this option yet.
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.
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.
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
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"}'Specify the text color of the highlighted word.
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"}'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)"}'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)"}'Specify the background color of the highlighted word.
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"}'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)"}'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)"}'Sets the latitude used to emulate the Geolocation API.
Sets the longitude used to emulate the Geolocation API.
Sets the accurate of the Geolocation API in metres.
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.
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.
No example for this option yet.
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.
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.
No example for this option yet.
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.
No example for this option yet.
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.
Overrides the configured bucket to use when saving the render.
Requires the HiFi plan or above.
No example for this option yet.
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.
Override the configured S3 region when saving the render.
Requires the HiFi plan or above.
No example for this option yet.
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.
Sets the s3 storage class.
Requires the HiFi plan or above.
No example for this option yet.
Use the LLM configuration setup in your project settings, or those passed into the request.
Requires the Ultra plan or above.
No example for this option yet.
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.
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.
The API access key for the given LLM provider.
Requires the Ultra plan or above.
No example for this option yet.
The LLM provider to use.
Requires the Ultra plan or above.
No example for this option yet.
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.
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.
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.
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.
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.
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.
Azure OpenAI resource name. Used to construct the endpoint URL: https://{resourceName}.openai.azure.com/
No example for this option yet.
Azure OpenAI API version. Required when using deployment URLs. E.g. '2024-02-15-preview'.
No example for this option yet.
Use legacy Azure deployment URL format. Useful for compatibility with certain Azure OpenAI models or deployments that require the legacy endpoint format.
No example for this option yet.
AWS region for Amazon Bedrock. Defaults to 'us-east-1'.
No example for this option yet.
AWS access key ID for Amazon Bedrock authentication.
No example for this option yet.
AWS secret access key for Amazon Bedrock authentication.
No example for this option yet.
Optional AWS session token for temporary credentials with Amazon Bedrock.
No example for this option yet.
Google Cloud project ID for Google Vertex AI.
No example for this option yet.
Google Cloud region for Vertex AI. Defaults to 'us-central1'.
No example for this option yet.
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.
Return the full LLM response including usage statistics and metadata, rather than just the text content.
Requires the Ultra plan or above.
No example for this option yet.
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.
No example for this option yet.
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.
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" ] }}'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" ] }}'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" ]}'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.
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" ]}'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.
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}'Distance in pixels to scroll the page during the video.
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}'How long the scroll takes, in milliseconds.
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}'Whether to scroll back up to the top after reaching the bottom.
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}'Duration of the scroll-back motion, in milliseconds.
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}'Number of page sections to scroll through during the video.
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}'Easing function applied to the scroll motion (for example ease-in-out).
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"}'Easing function applied at the end of the scroll.
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"}'Adds slight random variation (jitter) to the scroll motion.
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}'Pause before scrolling starts, in milliseconds.
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}'Pause after scrolling finishes, in milliseconds.
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}'Rest/pause between scroll segments, in milliseconds.
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}'Frames per second of the output video.
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}'Target bitrate of the output video, in bits per second.
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}'Width of the output video, in pixels.
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}'Height of the output video, in pixels.
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}'Total duration of the video, in seconds. Longer videos cost more, so set a sensible cap.
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}'Also extract and save the page as Markdown alongside the render.
Also save the page's rendered HTML.
Also save the page as MHTML (a single-file web archive).
Also extract and save page metadata (title, description, OpenGraph, etc.).
Also extract and save the list of links found on the page.
Also extract and save the page's headings.
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.