Skip to content

Changelog

New updates and improvements at Cloudflare.

hero image

New formats parameter for the Browser Run /snapshot endpoint

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:

Terminal window
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"]
}'

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.