render
Render websites to images, PDFs, HTML, or markdown with full control over viewport, content blocking, and metadata extraction.
Instructions
Uses Urlbox.com's POST API for advanced rendering with side renders. Download to computer using store_renders: true. Ideal for: use of many options, converting websites to HTML/PDF/markdown, extracting metadata, saving cookies, rendering custom HTML/CSS/JS, and generating multiple output formats simultaneously (html, pdf, md, cookies etc.), while also capturing the main screenshot's format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store_renders | No | Flip this to true to save all downloadable render links | |
| url | Yes | The URL or domain of the website you want to screenshot. | |
| html | No | The HTML you want to render if not a URL. | |
| format | No | The output format of the resulting render. | |
| width | No | The viewport width of the browser, in pixels. | |
| height | No | The viewport height of the browser, in pixels. | |
| full_page | No | Specify whether to capture the full scrollable area of the website. | |
| selector | No | Take a screenshot of the element that matches this selector. | |
| clip | No | Clip the screenshot to the bounding box specified by x,y,width,height. | |
| gpu | No | Enable GPU acceleration to render 3D scenes and heavy WebGL content. | |
| block_ads | No | Blocks requests from popular advertising networks from loading. | |
| hide_cookie_banners | No | Automatically hides cookie banners from most websites. | |
| click_accept | No | Attempts to click on the 'Accept' button to accept cookies. | |
| press_escape | No | Attempts to press the Escape (ESC) key before capturing the page. | |
| block_urls | No | Block requests from specific domains from loading. You can use wildcard characters to match subdomains. | |
| block_images | No | Blocks image requests | |
| block_fonts | No | Blocks font requests | |
| block_medias | No | Block video and audio requests | |
| block_styles | No | Prevent stylesheet requests from loading | |
| block_scripts | No | Prevent requests for javascript scripts from loading | |
| block_frames | No | Block frames. | |
| block_fetch | No | Block fetch requests from the target URL. | |
| block_xhr | No | Block XHR requests from the target URL. | |
| block_sockets | No | Block websocket requests. | |
| hide_selector | No | Comma-delimited string of CSS element selectors that are hidden. | |
| js | No | Execute custom JavaScript in the context of the page. | |
| css | No | Inject custom CSS into the page | |
| dark_mode | No | Emulate dark mode on websites by setting prefers-color-scheme: dark | |
| reduced_motion | No | Prefer less animations on websites by setting prefers-reduced-motion: reduced | |
| show_timestamp | No | Shows a timestamp in a header above the rendered screenshot. | |
| show_url | No | Shows a URL in a header above the rendered screenshot. | |
| retina | No | Take a 'retina' or high-definition screenshot, equivalent to setting a device pixel ratio of 2.0. | |
| img_fit | No | How the screenshot should be resized or cropped to fit the dimensions. | |
| img_position | No | How the image should be positioned when using an img_fit of cover or contain. | |
| img_bg | No | Background colour to use when img_fit is contain, or img_pad is used. | |
| img_pad | No | Pad the screenshot, giving it a border. | |
| quality | No | The image quality of the resulting screenshot (JPEG/WebP only) | |
| transparent | No | If a website has no background color set, the image will have a transparent background. | |
| max_height | No | Limit the screenshot to a maximum height. | |
| pdf_page_size | No | Sets the PDF page size. | |
| pdf_page_range | No | Sets the PDF page range to return. | |
| pdf_page_width | No | Sets the PDF page width, in pixels. | |
| pdf_page_height | No | Sets the PDF page height, in pixels. | |
| pdf_margin | No | Sets the margin of the PDF document. | |
| pdf_outline | No | Generates an outline for the PDF. | |
| pdf_tagged | No | Generates a tagged PDF. | |
| pdf_margin_top | No | Sets a custom top margin on the PDF. | |
| pdf_margin_right | No | Sets a custom right margin on the PDF. | |
| pdf_margin_bottom | No | Sets a custom bottom margin on the PDF. | |
| pdf_margin_left | No | Set a custom left margin on the PDF. | |
| pdf_auto_crop | No | Automatically remove white space from PDF. | |
| pdf_scale | No | Sets the scale factor of the website content in the PDF. | |
| pdf_orientation | No | Sets the orientation of the PDF. | |
| pdf_background | No | Sets whether to print background images in the PDF | |
| disable_ligatures | No | Prevents ligatures from being used. | |
| media | No | By default, when generating a PDF, the print CSS media query is used. | |
| pdf_show_header | No | Whether to show the default pdf header on each page of the pdf. | |
| pdf_header | No | Change the default pdf header that is shown on each page of the pdf. | |
| pdf_show_footer | No | Whether to show the default pdf footer on each page of the pdf. | |
| pdf_footer | No | Change the default pdf footer that is shown on each page of the pdf. | |
| readable | No | Make the pdf into a readable document by removing unnecessary elements. | |
| force | No | Generate a fresh render, instead of getting a cached version. | |
| unique | No | Pass a unique string such as a UUID, hash or timestamp. | |
| ttl | No | The duration to keep a render in the cache, in seconds. | |
| proxy | No | Pass in a proxy server address to make screenshot requests via that server. | |
| header | No | Set a header on the request when loading the URL | |
| cookie | No | Sets a cookie on the request when loading the URL. | |
| user_agent | No | Sets the User-Agent string for the request | |
| platform | No | Sets the navigator.platform that the browser will report for the request. | |
| accept_lang | No | Sets an Accept-Language header on requests to the target URL | |
| authorization | No | Sets an Authorization header on requests to the target URL. | |
| tz | No | Emulate the timezone to use when rendering pages. | |
| engine_version | No | Sets the version of the urlbox rendering engine to use. Latest provides the latest bug fixes and features. | |
| certify | No | Creates a hash of the rendered file, timestamp and options providing proof. | |
| delay | No | The amount of time to wait before Urlbox captures a render in milliseconds. | |
| timeout | No | The amount of time to wait for the requested URL to load, in milliseconds. | |
| wait_until | No | Waits until the specified DOM event has fired before capturing a render. | |
| wait_for | No | Waits for the element specified by this selector to be present in the DOM. | |
| wait_to_leave | No | Waits for the element specified by this selector to be absent from the DOM. | |
| wait_timeout | No | The amount of time to wait for the wait_for element to appear. | |
| fail_if_selector_missing | No | Fails the request if the elements specified by selector or wait_for options are not found. | |
| fail_if_selector_present | No | Fails the request if the element specified by wait_to_leave option is found. | |
| fail_on_4xx | No | If true and the requested URL returns a status code between 400 and 499, Urlbox will fail. | |
| fail_on_5xx | No | If true and the requested URL returns a status code between 500 and 599, Urlbox will fail. | |
| scroll_to | No | Scroll, to either an element or to a pixel offset from the top. | |
| click | No | Specifies an element selector to click before generating a screenshot or PDF | |
| click_all | No | Specifies an element selector to click all matching elements. | |
| hover | No | Specifies an element selector to hover over before generating a screenshot or PDF | |
| bg_color | No | Specify a hex code or CSS color string to use as the background color | |
| full_page_mode | No | Whether to use scroll and stitch algorithm or native full page screenshot. | |
| full_width | No | When full_page=true, specify whether to capture the full width of the website. | |
| allow_infinite | No | Override the default behavior to prevent infinite scrolling. | |
| skip_scroll | No | Speed up renders by skipping an initial scroll through the page. | |
| detect_full_height | No | Prevent backgrounds from getting stretched when making a full page screenshot. | |
| max_section_height | No | The maximum height of each image section when taking a full_page screenshot. | |
| scroll_increment | No | Sets how many pixels to scroll when scrolling the page. | |
| scroll_delay | No | The time to wait between taking the screenshots of each individual section. | |
| highlight | No | Specify a string to highlight on the page before capturing a screenshot or PDF. | |
| highlightfg | No | Specify the text color of the highlighted word. | |
| highlightbg | No | Specify the background color of the highlighted word. | |
| latitude | No | Sets the latitude used to emulate the Geolocation API. | |
| longitude | No | Sets the longitude used to emulate the Geolocation API. | |
| accuracy | No | Sets the accuracy of the Geolocation API in metres. | |
| use_s3 | No | Save the render directly to the S3 (or S3-Compatible) bucket configured on your account. | |
| s3_path | No | Sets the S3 path, including subdirectories and the filename. | |
| no_suffix | No | By default, urlbox adds the file extension to the s3_path. | |
| s3_bucket | No | Overrides the configured bucket to use when saving the render. | |
| s3_endpoint | No | Change the endpoint URL to use an S3 compatible storage provider. | |
| s3_region | No | Override the configured S3 region when saving the render. | |
| cdn_host | No | If your custom bucket is fronted by a CDN, you can set the host name here. | |
| s3_storageclass | No | Sets the s3 storage class. | |
| save_html | No | Alongside rendering the main options.format shot, also saves the render as HTML returning a storage URL. | |
| save_metadata | No | Alongside rendering the main options.format shot, also saves render's Metadata returning a storage URL. | |
| save_markdown | No | Alongside rendering the main options.format shot, also saves render as Markdown returning a storage URL. | |
| save_mhtml | No | Alongside rendering the main options.format shot, also saves render as MHTML returning a storage URL. | |
| save_cookies | No | Alongside rendering the main options.format shot, also saves renders used cookies returning a storage URL. | |
| pov | No | Use a Point of View (PoV) to more convincingly and accurately emulate loading a website from a particular location, with better success than many other options here. This lets you view a website as if you were browsing from a less block-prone perspective, such as through a trusted, location-specific, or residential IP. - hidden - The basic level of anonymisation to mask your location (great starting place) - trusted - Using more trusted, reliable networks to get a higher success rate when emulating a country - stealth - Advanced protocols designed to bypass bot detection - premium - Emulates high-quality residential networks for maximum reliability over hidden and trusted - geo - Location-specific access from real devices in your target country This option is not compatible when trying to use authorization or cookies. | |
| pov_country | No | You can also specify a particular country for your PoV by adding a country code such as: us, gb, ca - If we don't have one available, do contact support@urlbox.com and we'll see what we can do. |