# get402.ai URL to Markdown Fetcher

> get402.ai URL to Markdown Fetcher is a paid API for AI agents from get402.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Fetches a public URL and returns its main article content converted to clean markdown text.

## Facts

- Endpoint: GET https://get402.ai/v1/fetch?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/get402-ai-url-to-markdown-fetcher-e5f1bdb6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4V9mVc7tIJ108xgXsf-Ap

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 get402-ai-url-to-markdown-fetcher-e5f1bdb6
```

Example prompt: Can you fetch the content of https://openai.com/blog/gpt-4o and give me the main article text as markdown?

## When to prefer this

Choose this endpoint when you need to retrieve and read the main textual content of a public webpage and want it returned in clean markdown format, without building your own scraping infrastructure. It is ideal for agents that need to ingest web articles, documentation pages, or blog posts for summarization, analysis, or knowledge base ingestion. Prefer it over raw HTTP fetch tools when you want automatic boilerplate removal and markdown conversion in a single call. Not suitable for pages behind authentication, private IP ranges, or non-HTML content like PDFs or binary files.

## Known failure modes

- payment_required (402): No payment proof provided — must include x402 payment header
- payment_invalid (402): Payment proof sent but verification failed
- invalid_url (400): URL missing, relative, or malformed — must be absolute http/https
- blocked_target (400): Target is a private, link-local, or metadata IP address, or on deny list
- blocked_by_robots (403): Target's robots.txt disallows the get402 user agent
- rate_limited (429): Per-caller, per-host, or per-payer rate limit hit — check Retry-After header
- upstream_failed (502/504): DNS, connect, TLS, or read failure before a response was received
- upstream_error (502): Target server returned a 4xx or 5xx response
- too_large (422): Body exceeded the size cap before content could be extracted
- unsupported_content (422): Body is not HTML or plain text
- extraction_empty (422): Page fetched successfully but no article body could be extracted

## How this service works

Agent-native fetch API

## Output

Returns the main readable content of the target webpage converted to markdown, stripping navigation, ads, and boilerplate. Includes the extracted article body as structured markdown text. On failure, returns a structured error with a code, HTTP status, and human-readable message describing what went wrong (e.g. payment required, blocked by robots.txt, upstream error, unsupported content type, or empty extraction).

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Absolute http or https URL to fetch."
      },
      "fresh": {
       "type": "string",
       "description": "1 or true bypasses the cache and fetches now. Same price."
      },
      "max_bytes": {
       "type": "string",
       "description": "Cap on the downloaded body size. The server enforces its own maximum regardless."
      },
      "timeout_ms": {
       "type": "string",
       "description": "Hint. The server enforces its own upper bound."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/v1/fetch",
  "price": {
   "asset": "USDC",
   "payTo": "0xB3b5Fb04B2Aef15baf18b121F49fF1DfD100Dd2E",
   "amount": "0.005",
   "network": "base"
  },
  "errors": [
   {
    "code": "payment_required",
    "when": "No payment proof was sent.",
    "status": 402,
    "message": "Payment is required."
   },
   {
    "code": "payment_invalid",
    "when": "A proof was sent but verification failed.",
    "status": 402,
    "message": "The payment proof could not be verified."
   },
   {
    "code": "invalid_url",
    "when": "Missing, relative, or malformed url.",
    "status": 400,
    "message": "The url parameter must be an absolute http or https URL."
   },
   {
    "code": "blocked_target",
    "when": "Non-http(s) scheme, a private, link-local, or metadata address, or a host on the deny list, at any redirect hop.",
    "status": 400,
    "message": "Private, link-local and metadata addresses are not fetchable."
   },
   {
    "code": "blocked_by_robots",
    "when": "robots.txt disallows the get402 user agent for the path.",
    "status": 403,
    "message": "The target's robots.txt disallows this user agent for that path."
   },
   {
    "code": "rate_limited",
    "when": "Per-caller, per-target-host, or per-payer limit hit. Retry-After gives the seconds to wait. Never charged.",
    "status": 429,
    "message": "Rate limit exceeded."
   },
   {
    "code": "upstream_failed",
    "when": "DNS, connect, TLS, or read failure. A timeout uses the same code with HTTP 504.",
    "status": 502,
    "message": "The upstream request failed before a response."
   },
   {
    "code": "upstream_error",
    "when": "The target answered with 4xx or 5xx. meta.upstream_status carries that status.",
    "status": 502,
    "message": "The target returned an error."
   },
   {
    "code": "too_large",
    "when": "The hard cap was hit before extraction could succeed.",
    "status": 422,
    "message": "The body exceeded the size cap before enough content was read to extract."
   },
   {
    "code": "unsupported_content",
    "when": "The body is not HTML or plain text.",
    "status": 422,
    "message": "Only HTML and plain text can be extracted."
   },
   {
    "code": "extraction_empty",
    "when": "The fetch succeeded but extraction found no article body.",
    "status": 422,
    "message": "The page had no usable main content."
   },
   {
    "code": "not_found",
    "when": "Unknown request_id on the receipts route.",

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/get402-ai-url-to-markdown-fetcher-e5f1bdb6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from get402.ai](https://www.zero.xyz/host/get402.ai/llms.txt)
