# 2s.io Headless Browser URL Renderer

> 2s.io Headless Browser URL Renderer is a paid API for AI agents from 2s.io, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-15, last successful call 2026-07-14).

Renders a URL in a real headless browser (with JavaScript execution) and returns cleaned article content stripped of clutter, for client-rendered/SPA pages that require JS to produce content.

## Facts

- Endpoint: GET https://2s.io/api/url/render
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Last successful call: 2026-07-14
- Success rate: 100% of calls made through Zero
- Activations on Zero: 2
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-headless-browser-url-renderer-3f6bad3f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YZoy6437NKTTFyvAWKHok

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 2s-io-headless-browser-url-renderer-3f6bad3f
```

Example prompt: Fetch the article content from https://example.com/some-react-app-page — it's a client-rendered SPA so you'll need to run JavaScript to get the actual content; return it as markdown and wait until the network is idle.

## When to prefer this

Use this endpoint when the target page is a client-rendered single-page application (React, Vue, Angular, Next.js CSR, etc.) whose content only appears after JavaScript executes — meaning a raw HTTP fetch returns an empty or skeletal HTML shell. If the page is server-rendered and returns full HTML content on initial fetch, use /api/url/clean instead, which is ~10x cheaper (Tier 0). Reserve this endpoint for JS-rendering cases only due to its higher cost and latency.

## Known failure modes

- Timeout exceeded (timeoutMs limit reached before JS settles — try increasing timeoutMs or switching waitUntil strategy)
- Invalid or unreachable URL returns an error
- Page has no extractable article content (returns empty or minimal content)
- Bot detection or anti-scraping measures on the target site block rendering
- Page requires authentication and content is behind a login wall

## How this service works

Render a URL in a real headless browser (JavaScript executed) and return its article content with the clutter stripped — same cleaning + output formats as /api/url/clean, but for client-rendered / SPA pages whose content only appears after JS runs (where a raw HTTP fetch returns an empty shell). `format`: markdown (default), text, both (JSON envelope), html (self-contained reader page, raw text/html), or pdf (typeset reading doc, raw application/pdf). Optional `waitUntil` (load|domcontentloaded|networkidle0|networkidle2, default networkidle2) and `timeoutMs` (1000-15000, default 12000) control how long to let JS settle. Use /api/url/clean instead for server-rendered pages — it is faster and cheaper; only reach for render when JS rendering is required.

## Output

Returns cleaned, clutter-free article content from the rendered page in the requested format: markdown (default), plain text, a JSON envelope with both, a self-contained HTML reader page (text/html), or a typeset PDF (application/pdf). JavaScript is fully executed before content is extracted.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "url": "https://example.com",
   "format": "markdown",
   "timeoutMs": 12000,
   "waitUntil": "networkidle2"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string"
      },
      "format": {
       "enum": [
        "markdown",
        "text",
        "both",
        "html",
        "pdf"
       ],
       "type": "string",
       "default": "markdown"
      },
      "timeoutMs": {
       "type": "integer",
       "default": 12000,
       "maximum": 15000,
       "minimum": 1000
      },
      "waitUntil": {
       "enum": [
        "load",
        "domcontentloaded",
        "networkidle0",
        "networkidle2"
       ],
       "type": "string",
       "default": "networkidle2"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-headless-browser-url-renderer-3f6bad3f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
