# WebExtract — Web Page to Markdown + Structured JSON API

> WebExtract — Web Page to Markdown + Structured JSON API is a paid API for AI agents from api.webextract.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-04).

Fetches any public URL and returns clean Markdown plus structured JSON (title, word count, truncation status) for AI agent consumption

## Facts

- Endpoint: GET https://api.webextract.dev/v1/markdown?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/webextract-web-page-to-markdown-structured-json-api-36d4ec7b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5GR_kaBPZzO4NNVQKjKzo

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 webextract-web-page-to-markdown-structured-json-api-36d4ec7b
```

Example prompt: Can you fetch the content of https://techcrunch.com/2024/01/15/openai-news/ and give me the full article as clean markdown text with the title and word count?

## When to prefer this

Choose this endpoint when you need to convert a single public web page into LLM-ready Markdown with structured metadata (title, word count) in one API call. It is ideal for AI pipelines that need clean, readable text from arbitrary URLs without managing a browser or HTML parser. Prefer it over raw HTML fetching when your downstream task is text analysis, summarization, or RAG ingestion. It respects robots.txt, making it suitable for compliant automated agents.

## Known failure modes

- URL is not publicly accessible or requires authentication — returns error
- robots.txt disallows crawling — request may be blocked
- Invalid or malformed URL in query parameter — returns 400-level error
- Page is very large and markdown is truncated (markdown_truncated: true)
- Network timeout fetching the target URL — returns error
- URL points to non-HTML content (PDF, binary) — markdown conversion may fail or be partial

## How this service works

Markdown only: fetch a public web page (robots.txt respected) and return clean Markdown plus title/word count. Cheaper than /v1/extract when you do not need structured product/table JSON.

## Output

Returns a JSON object with the original URL, the page title, the full page content as cleaned Markdown, the final (possibly redirected) URL, word count of the markdown, and a boolean indicating whether the markdown was truncated due to length limits.

## 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": "Public http(s) URL to convert to Markdown"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "url",
      "final_url",
      "markdown"
     ],
     "properties": {
      "url": {
       "type": "string"
      },
      "title": {
       "type": [
        "string",
        "null"
       ]
      },
      "markdown": {
       "type": "string"
      },
      "final_url": {
       "type": "string"
      },
      "fetched_at": {
       "type": "string"
      },
      "word_count": {
       "type": "integer"
      },
      "content_source": {
       "enum": [
        "raw_html",
        "rendered"
       ],
       "type": "string",
       "description": "Where the content came from: raw_html = the HTTP response body, no JavaScript executed (/v1/extract, /v1/markdown); rendered = the page was loaded in a headless browser with JavaScript executed (/v1/render/extract, /v1/render/markdown)"
      },
      "markdown_truncated": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com/article",
  "title": "Example",
  "markdown": "# Example\n...",
  "final_url": "https://example.com/article",
  "word_count": 120,
  "markdown_truncated": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/webextract-web-page-to-markdown-structured-json-api-36d4ec7b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.webextract.dev](https://www.zero.xyz/host/api.webextract.dev/llms.txt)
