OpenAICloudflare Developer PlatformJul 7, 2026, 12:00 AM

Browser Run - New Browser Run endpoint for accessibility trees

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

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/accessibilityTree with JSON body { "url": "https://example.com/" } and Authorization: Bearer <apiToken>.
  • Response: JSON containing an accessibilityTree object with nodes that include role, 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 /snapshot when 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.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

Browser Run - アクセシビリティツリー用の新しい Browser Run エンドポイント

概要

Browser Run に standalone の /accessibilityTree エンドポイントが追加され、エージェントや自動化ワークフローがレンダリング済みページのブラウザアクセシビリティツリーに直接アクセスできるようになりました。

アクセシビリティツリーは、レンダリングされたページの構造化ビュー(roles、names、states、values、階層など)です。アクセシビリティツール向けに有用であるだけでなく、AI エージェントや自動化ワークフローが生の HTML のノイズやスクリーンショットのコストを避けてページ構造を取得するのに役立ちます。

主な利点:

  • AI エージェント: ピクセルからの推論や HTML のパースを減らし、ページ上の利用可能な要素を直接識別して実行可能なアクションを判断しやすくなります。
  • 自動化ワークフロー: 意味的な構造のみを取得することで、不要なデータ取得や処理を削減できます。

/accessibilityTree エンドポイントは、ページのセマンティックな構造だけが必要な場合に直接リクエストしてください。複数形式(Markdown、HTML、スクリーンショットなど)が同一 API 呼び出しで必要な場合は、/snapshot エンドポイントを使用してください。


使い方(リクエスト例)

次は典型的な curl リクエスト例です。<accountId><apiToken> は適宜置き換えてください。

curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-run/accessibilityTree' \
  -H 'Authorization: Bearer <apiToken>' \
  -H 'Content-Type: application/json' \
  -d '{ "url": "https://example.com/" }'

レスポンス例

以下はサンプルの JSON レスポンスです。

{
  "success": true,
  "result": {
    "accessibilityTree": {
      "role": "RootWebArea",
      "name": "Example Domain",
      "children": [
        { "role": "heading", "name": "Example Domain", "level": 1 },
        { "role": "link", "name": "Learn more" }
      ]
    }
  }
}

パラメータ

  • interestingOnly: 意味的に重要なノードのみを返すオプション。ノイズとなる補助的ノードを除外して、主要な要素に集中できます。
  • root: 特定のサブツリーのアクセシビリティツリーをキャプチャするためのオプション。ページ全体ではなく部分ツリーを取得したい場合に使用します。

詳細な使用例やサポートされているパラメータについては、/accessibilityTree ドキュメントを参照してください。


参照

  • 複数フォーマット(Markdown、HTML、スクリーンショット等)が必要な場合: /snapshot
  • ドキュメント: /accessibilityTree(利用例とパラメータ参照)

Published: Jul 07, 2026

Browser Run - New Browser Run endpoint for accessibility trees | Cloudflare Developer Platform | DocsDigest