# x402-web-extract /fetch — Web Page to Markdown

> x402-web-extract /fetch — Web Page to Markdown is a paid API for AI agents from x402-web-extract.senpi-agent.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Fetches any public URL and returns its content as clean, readable markdown, paid per-call via x402 USDC micropayment on Base mainnet

## Facts

- Endpoint: GET https://x402-web-extract.senpi-agent.workers.dev/fetch?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-web-extract-fetch-web-page-to-markdown-9e89a743
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SNI6FR4M6eu-ksfYj6uVR

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 x402-web-extract-fetch-web-page-to-markdown-9e89a743
```

Example prompt: Fetch the article at https://techcrunch.com/2024/01/15/openai-news/ and give me the clean readable text from it.

## When to prefer this

Choose this endpoint when an AI agent needs to read and process the text content of any public URL on-the-fly without setting up API keys or managing scraping infrastructure. It is ideal for agentic workflows that need ad-hoc web content access paid via USDC micropayments on Base, especially when the agent already participates in the x402 payment protocol. Prefer it over general-purpose browser automation when you just need clean readable text rather than screenshots or DOM interaction.

## Known failure modes

- Non-200 HTTP status from target URL (e.g. 404, 403, 500) — returned in status field with empty or partial markdown
- Target URL is behind authentication or a paywall — returns 200 but markdown will contain login-wall content rather than article body
- HTTP 402 returned before content if payment not yet made — agent must complete x402 USDC micropayment flow first
- Malformed or missing `url` query parameter — likely returns 4xx error
- JavaScript-rendered single-page apps may return incomplete content if JS is not executed
- Rate limiting or bot-blocking by the target site may result in empty or error markdown

## How this service works

Fetch any public URL and return a clean, readable markdown or JSON extract for AI agents. Pass the target as ?url=<encoded>. Ideal when you need to read webpages, docs, or articles without a browser. Blocks script/style tags, normalizes links and images, strips HTML.

## Output

A JSON object containing the original URL, the HTTP status code of the fetched page, and the page's main content rendered as clean markdown with headings, paragraphs, and links preserved — HTML boilerplate, ads, and navigation stripped away.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "The URL to fetch (http/https). Returned as clean markdown."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/article",
  "status": 200,
  "markdown": "# Title\n\nClean extracted text..."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-web-extract-fetch-web-page-to-markdown-9e89a743/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-web-extract.senpi-agent.workers.dev](https://www.zero.xyz/host/x402-web-extract.senpi-agent.workers.dev/llms.txt)
