Scrape the rendered HTML of a website
render_htmlRender a page with JavaScript and return the final HTML (after scripts run), optionally also as MHTML. 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_html"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | No | 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. Assign window.customUrlboxData to return data at metadata.custom. 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. | |
| 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. | |
| 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. | |
| 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. | |
| save_mhtml | No | Also save the page as MHTML (a single-file web archive). | |
| 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. | |
| 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. |