megachangelog
Feature

Browser Run /snapshot endpoint now supports multiple formats parameter

The Browser Run /snapshot endpoint now accepts a formats parameter to return multiple page formats in a single API call, including Markdown and accessibility tree alongside screenshots. This enables more efficient workflows for AI agents by providing token-efficient content representation and structured page element data.

Browser Run's /snapshot endpoint now supports a formats parameter that lets you return multiple page formats in a single API call. Previously, /snapshot returned only HTML content and a screenshot. You can now also include Markdown and the accessibility tree in the same response.

These formats are particularly useful for AI agent workflows:

  • Markdown provides a token-efficient representation of page content that LLMs can process directly, without parsing HTML markup.
  • The accessibility tree provides a structured representation of a page's elements, including roles, labels, and hierarchy, helping LLMs understand page structure and navigate its contents.

The following example returns a screenshot, Markdown, and the accessibility tree in one call:

  • curl

    curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/snapshot' \  -H 'Authorization: Bearer <apiToken>' \  -H 'Content-Type: application/json' \  -d '{    "url": "https://example.com/",    "formats": ["screenshot", "markdown", "accessibilityTree"]  }'
  • TypeScript SDK

    import Cloudflare from "cloudflare";
    const client = new Cloudflare({  apiToken: process.env["CLOUDFLARE_API_TOKEN"],});
    const snapshot = await client.browserRendering.snapshot.create({  account_id: process.env["CLOUDFLARE_ACCOUNT_ID"],  url: "https://example.com/",  formats: ["screenshot", "markdown", "accessibilityTree"],});
    console.log(snapshot.markdown);console.log(snapshot.accessibilityTree);
  • Workers Bindings

    interface Env {  BROWSER: BrowserRun;}
    export default {  async fetch(request, env): Promise<Response> {    return await env.BROWSER.quickAction("snapshot", {      url: "https://example.com/",      formats: ["screenshot", "markdown", "accessibilityTree"],    });  },} satisfies ExportedHandler<Env>;

You must request at least two formats. If you only need one, use the respective single-format endpoint such as /screenshot or /markdown.

Refer to the /snapshot documentation for the full list of accepted values.

apibrowser-runai-agentsfeature-expansion

Source: original entry ↗

More from Cloudflare

Follow Cloudflare to get its new changes in your feed and email digest.

Improvement2026.8.2100.0

Cloudflare One Client for macOS 2026.8.2100.0

GA release for macOS Cloudflare One Client with improved split tunnel handling that no longer briefly blocks traffic during reconnects, support for non-RFC 1918 local IPv4 networks, faster connects with lower memory use, and numerous reliability fixes across DNS, reauthentication, and client stability.

macosvpnreliabilityperformancedns
Improvement2026.8.2100.0

Cloudflare One Client for Windows 2026.8.2100.0

This GA release improves split tunnel reliability, adds support for non-RFC 1918 local networks, optimizes connection performance with faster reconnections and lower memory usage, and includes numerous bug fixes for DNS, registration, and network handling. The client now features a service recovery mechanism that automatically restarts on system unlock and better handles large hosts files without blocking traffic.

windowsvpnclienttunneldns
Improvement2026.8.2100.0

Cloudflare One Client for Linux 2026.8.2100.0

New GA release for Linux with improved split tunnel handling that no longer briefly blocks traffic during reconnects, support for non-RFC 1918 local IPv4 networks, faster tunnel reconnections, and lower memory usage. Includes numerous stability and reliability fixes for DNS, reconnection behavior, and crash issues.

linuxvpnclientperformancestability
See all Cloudflare changes →