# Browser Context Snapshot API

> Browser Context Snapshot API is a paid API for AI agents from x402-canary.nicolas-x402-16f380a7.workers.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15).

Fetches a JavaScript-rendered browser snapshot of any URL, returning its title, HTTP status, markdown content, and accessibility tree

## Facts

- Endpoint: POST https://x402-canary.nicolas-x402-16f380a7.workers.dev/v1/agent/browser-context
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/browser-context-snapshot-api-5a3cedc4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qD067q5fB5MB1lsRwAaXd

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability browser-context-snapshot-api-5a3cedc4 -d '<json body>'
```

Example prompt: Can you fetch the fully rendered content of https://npmjs.com/package/react and give me the markdown text — wait until the page is fully loaded with no network activity (networkidle0)?

## When to prefer this

Use this endpoint when you need the fully JavaScript-rendered content of a webpage — especially SPAs, React/Vue/Angular apps, or pages that load data asynchronously. Unlike plain HTTP fetch, this endpoint uses a real browser engine, so dynamic content, lazy-loaded elements, and client-side routing are all captured. Prefer this over static scrapers when the target page requires JS execution to show meaningful content.

## Known failure modes

- URL is unreachable or returns a network error — status field will reflect non-200 code
- JavaScript-heavy pages may timeout if wait_until strategy is too strict (networkidle0 on pages with persistent WebSocket connections)
- Pages behind authentication walls return login page content instead of protected content
- Accessibility tree may be truncated for very large pages (accessibility_tree_truncated: true)
- Invalid URL format causes request rejection

## How this service works

Free need-to-tool routing plus pay-per-call npm docs and TypeScript API signatures, npm breaking-change diffs, JavaScript-rendered browser snapshots and deterministic coding-agent checks via AgentCash/x402.

## Output

Returns a JSON object with a data field containing the final resolved URL, page title, HTTP status code, full page content as markdown, and a flag indicating whether the accessibility tree was truncated. Also includes a meta field with the engine name used.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "example": "https://example.com"
  },
  "wait_until": {
   "enum": [
    "domcontentloaded",
    "networkidle0",
    "networkidle2"
   ],
   "type": "string",
   "default": "domcontentloaded"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "url": "https://example.com/",
   "title": "Example Domain",
   "status": 200,
   "markdown": "# Example Domain",
   "accessibility_tree_truncated": false
  },
  "meta": {
   "engine": "browser-context"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/browser-context-snapshot-api-5a3cedc4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-canary.nicolas-x402-16f380a7.workers.dev](https://www.zero.xyz/host/x402-canary.nicolas-x402-16f380a7.workers.dev/llms.txt)
