Side Renders
Generate extra artifacts - HTML, MHTML, markdown, metadata, extracted content and thumbnails - from the same page load as your main render
When Urlbox renders a page, it can generate more than just the main screenshot, PDF or video. Side renders are extra artifacts captured from the same page load as your main render - a markdown conversion of the page, its rendered HTML, page metadata, extracted content like headings, tables and links, resized thumbnails of the screenshot itself, and an MHTML snapshot.
Because side renders are produced while the page is already loaded, they don't trigger a second render. You get multiple outputs from a single request, without paying the render time of loading the page twice.
Each side render is saved alongside the main render and returned as an extra field in the JSON response - so use the API (which returns JSON by default), or add response_type=json to a render link, to see them.
Rendering markdown and HTML alongside a screenshot
The save_markdown and save_html options save an extra text copy of the page in one request - a screenshot for humans and machine-readable content for everything else:
save_markdownconverts the rendered page to markdown - ideal when you want a screenshot for humans and an LLM-friendly text version of the same page in one request.save_htmlsaves the page's rendered HTML - captured from the live DOM after the page has finished loading, so it includes any changes made by javascript.
Request
The response gains a markdownUrl and htmlUrl field for each artifact you requested:
Response
If you only want markdown or HTML and no screenshot, you can make it the main
render instead by setting format to md or html.
Metadata and extracted content
Urlbox can extract structured information from the page while rendering it.
Page metadata
Setting save_metadata=true extracts the page's metadata: title, description, author, canonical URL, open graph tags, twitter card tags and other meta tags, along with the requested and resolved URLs. The metadata is returned inline in the metadata field of the JSON response, and also saved as a JSON side render linked from metadataUrl:
Request
Response
Headings, tables, structured data and links
Four more options extract specific content from the page:
save_headingsextracts every heading (h1-h6) with its level, text andid. The response gains aheadingsUrlfield linking to the saved JSON.save_tablesextracts every HTML<table>, with cells organised as rows and columns plus a markdown rendering of each table. The response gains atablesUrlfield.save_structured_dataextracts structured data embedded in the page, such as JSON-LD / schema.org markup. The response gains astructuredDataUrlfield.save_linksextracts every link with its absolute URL and link text, and adds them to the page metadata underlinks(returned inline inmetadataand saved tometadataUrl).
Request
Response
There are also options to record what happened during the render:
save_cookies saves the cookies set in the
browser by the end of the render, and
save_clicks records which elements Urlbox
clicked automatically (for example cookie-banner buttons clicked by
click_accept). Both are added to the page
metadata. save_headers includes the target
page's HTTP response headers in the response object of the JSON response.
Thumbnails
The thumbnails option generates up to 5 resized versions of the main render, from the same captured image. It applies to image formats (png, jpeg, webp, avif), and each thumbnail keeps the main render's format.
Each thumbnail spec can set:
- a
key(up to 10 characters) to name the thumbnail, - a size: either explicit pixel dimensions (
size, orwidth/height, each between 10 and 2000), or apresetrelative to the main render's dimensions:xs(10%),sm(20%),md(30%),lg(40%),xl(50%),2xl(60%),3xl(70%),4xl(80%),5xl(90%), or the fractions1/4,1/2and3/4, - how to resize:
fit(cover,contain,fill,inside,outside),positionand abgcolour, with the same semantics asimg_fit,img_positionandimg_bg, - a
presigned_urlto upload the thumbnail straight to your own S3 bucket.
Because the value is an array of objects, use thumbnails with JSON POST requests to the render endpoints:
Request
By default the response contains a thumbnails array, one entry per spec:
Response
Set thumbnails_object=true to get the same results as an object keyed by each thumbnail's key instead, useful when you want to look thumbnails up by name rather than position:
Response
MHTML snapshots
If you need a self-contained archive of the page, save_mhtml=true saves an MHTML snapshot alongside the main render. MHTML bundles the page and its resources into a single file that can be opened in a browser for offline viewing. The response gains an mhtmlUrl field:
Request
Response
Where side renders are stored
Side renders are stored exactly like the main render. By default they are saved to Urlbox's own cloud storage and served from our CDN, expiring after 30 days.
If you have configured your own S3-compatible storage and set use_s3=true, side renders and thumbnails are saved to your bucket alongside the main render, and the *Url fields in the response point at your bucket (or your cdn_host, if you have set one). See the saving to S3 guide for how to set this up.
Billing
Side renders don't cost extra render time, since they reuse the page load of the main render. Their file sizes, and the file sizes of any thumbnails, do however count toward the render's total output size, which is part of the credit calculation: one render credit is used per 5MB of file size over the included allowance. In practice most side renders (markdown, HTML, metadata JSON, thumbnails) are small, so a typical request with a handful of side renders still costs a single credit.
Related options
See the Side Render Options section of the options reference for every option covered in this guide.