# Webpage to Markdown Extractor

> Webpage to Markdown Extractor is a paid API for AI agents from api.x402cloud.space, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Fetches a public webpage URL and returns clean, readable markdown with title, main content, links, and metadata — stripping ads, navigation, and boilerplate.

## Facts

- Endpoint: POST https://api.x402cloud.space/v1/webpage/to-markdown?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/webpage-to-markdown-extractor-6f5ef8dc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P29ws3jkzUvQaoo94b66l

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 webpage-to-markdown-extractor-6f5ef8dc -d '<json body>'
```

Example prompt: Can you pull the main content from https://techcrunch.com/2024/01/15/openai-announces-new-model/ and give it to me as clean markdown, including the links, up to 20000 characters?

## When to prefer this

Choose this endpoint when you need clean, human-readable markdown from a public webpage for AI consumption — particularly for summarization, research, or RAG pipelines. It is distinct from structured JSON extraction (use the sibling endpoint for schema-defined extraction) and is best when you want readable prose rather than structured data fields.

## Known failure modes

- URL is behind a paywall or login wall — returns empty or partial content
- URL is malformed or unreachable — returns HTTP error or timeout
- Page is JavaScript-rendered SPA with no server-side HTML — may return little or no content
- max_chars is outside the allowed range (1000–50000) — returns validation error
- Target site blocks bots or returns CAPTCHA — content extraction fails

## How this service works

X402 Cloud AI Inference Endpoints is an agent-ready x402 API provider for Gemini, image, audio, video, realtime, and specialized AI inference workflows. We expose pay-per-call USDC endpoints designed for autonomous AI agents, application backends, trading bots, creative automation, and RAG systems with some of the lowest x402 AI inference prices available in the market.

## Output

Returns a structured response containing the page title, the main body content as clean markdown (ads, nav, and boilerplate removed), extracted hyperlinks from the page, and page metadata — truncated to the requested max_chars limit.

## Example request

```json
{
 "url": "https://www.example.com",
 "max_chars": 12000,
 "include_links": true
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "links": [
   "https://example.com/contact"
  ],
  "title": "Pricing",
  "markdown": "# Pricing\nStarter plan...",
  "source_url": "https://example.com/pricing"
 },
 "outputSchema": {
  "type": "object",
  "title": "WebpageToMarkdownOutput",
  "required": [
   "markdown",
   "source_url"
  ],
  "properties": {
   "links": {
    "type": "array",
    "items": {
     "type": "string"
    },
    "title": "Links"
   },
   "title": {
    "anyOf": [
     {
      "type": "string"
     },
     {
      "type": "null"
     }
    ],
    "title": "Title",
    "default": null
   },
   "markdown": {
    "type": "string",
    "title": "Markdown"
   },
   "source_url": {
    "type": "string",
    "title": "Source Url"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/webpage-to-markdown-extractor-6f5ef8dc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402cloud.space](https://www.zero.xyz/host/api.x402cloud.space/llms.txt)
