Developer Platform von 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. …