Browser Run - New Browser Run endpoint for accessibility trees
Key Points
- Standalone /accessibilityTree endpoint
- Returns semantic accessibility tree (roles, names, hierarchy)
- Supports interestingOnly and root parameters
Summary
Browser Run now exposes a standalone /accessibilityTree endpoint that returns the browser's accessibility tree (roles, names, states, values, and hierarchy) for a rendered page. It provides a compact, semantic representation useful for accessibility tooling, AI agents, and automation workflows that need page structure without parsing raw HTML or processing screenshots. Use /snapshot when you need multiple output formats (Markdown, HTML, screenshots) in one call.
Key Points
- Endpoint: POST to
https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-run/accessibilityTreewith JSON body{ "url": "https://example.com/" }andAuthorization: Bearer <apiToken>. - Response: JSON containing an
accessibilityTreeobject with nodes that includerole,name,level,children, etc. - Parameters:
interestingOnly— return only semantically meaningful nodes;root— capture the accessibility tree for a specific subtree. - Use cases: provide structured page semantics to AI agents and automation to reduce HTML parsing and pixel-based inference, and to help identify actionable elements.
- Alternative: call
/snapshotwhen you need combined outputs (Markdown, HTML, screenshots) in a single API request.
Action
Integrate /accessibilityTree into agent or automation workflows to fetch semantic page structure directly and simplify downstream processing.