Screenshot a website
render_screenshotTake a screenshot of a URL or of HTML (HTML to image): full page, a single element, retina, dark mode, without ads or cookie banners. Returns the image and its URL. One render can also save the page's markdown, HTML and metadata: set save_markdown, save_html or save_metadata instead of making a second call. The markdown and metadata come back with the result. Any other Urlbox option (proxies, cookies, headers, user agent and many more) goes in options: look it up with describe_options.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"intent": "<intent>"
},
"name": "render_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gpu | No | 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. | |
| url | No | The URL or domain of the website you want to screenshot. We will automatically prepend http:// if it is missing. | |
| html | No | HTML to render instead of a URL (HTML to PDF, HTML to image). | |
| delay | No | The amount of time to wait before Urlbox captures a render in milliseconds. | |
| force | No | Generate a fresh render on each request, instead of getting a cached version. | |
| width | No | The viewport width of the browser, in pixels. | |
| format | No | Output format: png, jpeg, webp. Defaults to png. | |
| height | No | The viewport height of the browser, in pixels. | |
| intent | Yes | Required. In one or two sentences, what you are trying to achieve for the user with this call and why (for example: 'Screenshot the pricing page so the user can compare plans'). Recorded for analytics and audit; do not include secrets. | |
| retina | No | 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. | |
| options | No | Any other Urlbox render option by name, e.g. { "gpu": true }. For an option this tool doesn't list, look it up with describe_options first (it covers every option); don't search the web. Validated by the Urlbox API. | |
| project | No | Project id (proj_…) or exact name to render with. Defaults to your default project. | |
| quality | No | The image quality of the resulting screenshot (JPEG/WebP only) Range: 0-100. | |
| selector | No | 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. | |
| wait_for | No | 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 | |
| block_ads | No | Blocks requests from popular advertising networks from loading. | |
| dark_mode | No | Emulate dark mode on websites by setting prefers-color-scheme: dark | |
| full_page | No | 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. | |
| save_html | No | Also save the page's rendered HTML. | |
| wait_until | No | 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); One of: domloaded, mostrequestsfinished, requestsfinished, loaded. | |
| thumb_width | No | The width of the generated thumbnail, in pixels. Omit for a full-size screenshot. | |
| click_accept | No | 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. | |
| thumb_height | No | The height of the generated thumbnail, in pixels. Omit for a full-size screenshot. | |
| wait_seconds | No | How long to wait for the render before returning. 0 queues it and returns a render id at once. If the wait runs out the render keeps going; fetch it with get_render. | |
| hide_selector | No | 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". | |
| save_markdown | No | Also extract and save the page as Markdown alongside the render. | |
| save_metadata | No | Also extract and save page metadata (title, description, OpenGraph, etc.). | |
| engine_version | No | 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. One of: stable, latest, experimental. | |
| hide_cookie_banners | No | Automatically hides cookie banners from most websites, by setting their style to display: none !important; |