November 19, 2026 · Cloudflare
Browser Run - Capture PDFs, links, scraped elements, and extracted JSON with /snapshot
Browser Run's /snapshot endpoint can now return four more formats from a single page load: pdf, links, scrape, and json. Before, /snapshot returned HTML, screenshots, Markdown, and the accessibility tree, so a workflow that also needed a PDF or structured data had to prepare the same page again in a second request.
Use the new formats when you need to:
- PDF: print the page, with the same
pdfOptionsas the/pdfendpoint. - Links: collect the links on the page, with the same
visibleLinksOnlyandexcludeExternalLinksoptions as/links. - Scraped elements: return the elements matched by
elements, the same payload as/scrape.elementsis required when you request it. - Extracted JSON: extract structured data from the page HTML with Workers AI, with the same
prompt,response_format, andcustom_aifields as/json.promptorresponse_formatis required, and the request incurs Workers AI usage.
Request them through formats, the same way as the existing formats. This example returns a PDF, the page links, and the text of each paragraph:
const response = await env.BROWSER.quickAction("snapshot", {
url: "https://example.com/",
formats: ["pdf", "links", "scrape"],
elements: [{ selector: "p" }],
});
const { result } = await response.json();
console.log(result.pdf);
console.log(result.links);const response = await env.BROWSER.quickAction("snapshot", {
url: "https://example.com/",
formats: ["pdf", "links", "scrape"],
elements: [{ selector: "p" }],
});
const { result } = await response.json();
console.log(result.pdf);
console.log(result.links);
Formats are captured in a fixed order rather than the order of the formats array, and the PDF is printed last because print handlers can change the page. A live page can change between captures, and any format that fails fails the whole request. For JSON snapshots, one actionTimeout budget (default 60 seconds, maximum 120 seconds) covers navigation, captures, retries, and the AI request.
You still need to request at least two distinct formats. If you only need one, use the corresponding single-format endpoint.
Refer to the /snapshot documentation for the full list of accepted values and options.
Free. Unsubscribe any time.
Related updates
Browser Run - New formats parameter for the Browser Run /snapshot endpoint
Browser Run - Use Browser Run Quick Actions directly from Workers
Browser Run - Browser Rendering REST API is Generally Available, with new endpoints and a free tier
Browser Run - New Browser Run endpoint for accessibility trees