# Web Page to Markdown Converter (d402 Gateway)

> Web Page to Markdown Converter (d402 Gateway) is a paid API for AI agents from gateway.d402.xyz, paid per call via x402 or MPP, $0.01/call, status down (last checked 2026-10-12, last successful call 2026-05-20).

Fetches a public web page URL and converts its content to clean markdown, returning metadata such as title, author, word count, and content hash via the d402 paid gateway.

## Facts

- Endpoint: POST https://gateway.d402.xyz/v1/web/page-to-markdown?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402, MPP
- Status: down
- Last checked: 2026-10-12
- Last successful call: 2026-05-20
- Success rate: 100% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 12
- Provider: gateway.d402.xyz
- Website: https://gateway.d402.xyz
- Canonical page: https://www.zero.xyz/c/gateway-d402-xyz-web-page-to-markdown-converter-d402-gateway-259854aa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lO40V261xrcIzMG6Cx7A0

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 gateway-d402-xyz-web-page-to-markdown-converter-d402-gateway-259854aa -d '<json body>'
```

Example prompt: Can you fetch the page at https://en.wikipedia.org/wiki/Markdown and convert it to markdown so I can read the clean text content?

## When to prefer this

Use this endpoint when you need to convert an arbitrary public web page (not necessarily an article) to markdown with rich metadata including content hash and schema.org data. It is broader than the article-specific extractor and is ideal for any public URL. Prefer over raw HTML fetching when clean, agent-readable markdown output is needed, and when payment via d402/x402 is acceptable.

## Known failure modes

- URL is not a valid public http/https URI — returns validation error
- Page is blocked or inaccessible — blockedReason field populated in result
- Timeout exceeded (max 45000ms) — returns error status
- Non-public or login-gated page — workers cannot access content, error or empty markdown returned
- Gateway payment/settlement failure — task rejected with error status
- Transient worker error — status set to error with error field populated

## How this service works

Paid d402 capability alias for web.page_to_markdown@1. The gateway handles worker discovery, validation, settlement, receipts, and evidence.

## Output

Returns a taskId and status, plus a result object containing the full markdown body, content hash, page title, author, domain, language, word count, published date, favicon URL, meta tags, schema.org data, and optional snapshot CID. Also includes settlement and validation receipt objects from the d402 payment gateway.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "Public http(s) URL to fetch and convert to markdown."
  },
  "sync": {
   "type": "boolean",
   "description": "Optional d402 sync flag. Defaults to gateway policy."
  },
  "timeoutMs": {
   "type": "number",
   "maximum": 45000,
   "minimum": 1,
   "description": "Optional per-request timeout, capped by gateway policy."
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "taskId",
  "status"
 ],
 "properties": {
  "error": {
   "type": [
    "string",
    "null"
   ]
  },
  "links": {
   "type": "object",
   "properties": {
    "task": {
     "type": "string"
    },
    "result": {
     "type": "string"
    },
    "receipt": {
     "type": "string"
    }
   }
  },
  "result": {
   "type": "object",
   "required": [
    "markdown",
    "contentHash"
   ],
   "properties": {
    "url": {
     "type": "string"
    },
    "site": {
     "type": "string"
    },
    "image": {
     "type": "string"
    },
    "title": {
     "type": "string"
    },
    "author": {
     "type": "string"
    },
    "domain": {
     "type": "string"
    },
    "favicon": {
     "type": "string"
    },
    "language": {
     "type": "string"
    },
    "markdown": {
     "type": "string"
    },
    "metaTags": {
     "type": "array"
    },
    "published": {
     "type": "string"
    },
    "wordCount": {
     "type": "number"
    },
    "contentHash": {
     "type": "string"
    },
    "contentHtml": {
     "type": "string"
    },
    "description": {
     "type": "string"
    },
    "serviceName": {
     "type": "string"
    },
    "snapshotCid": {
     "type": "string"
    },
    "qualityFlags": {
     "type": "array"
    },
    "serviceBuild": {
     "type": "string"
    },
    "blockedReason": {
     "type": "string"
    },
    "extractorType": {
     "type": "string"
    },
    "schemaOrgData": {
     "type": "array"
    },
    "workerRuntime": {
     "type": "string"
    },
    "serviceVersion": {
     "type": "string"
    },
    "converterVersion": {
     "type": "string"
    },
    "extractionEngine": {
     "type": "string"
    },
    "snapshotterVersion": {
     "type": "string"
    }
   }
  },
  "status": {
   "enum": [
    "accepted",
    "rejected",
    "running",
    "error"
   ],
   "type": "string"
  },
  "taskId": {
   "type": "string"
  },
  "settlement": {
   "type": [
    "object",
    "null"
   ],
   "additionalProperties": true
  },
  "x402Settlement": {
   "type": [
    "object",
    "null"
   ],
   "additionalProperties": true
  },
  "validationReceipt": {
   "type": [
    "object",
    "null"
   ],
   "additionalProperties": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gateway-d402-xyz-web-page-to-markdown-converter-d402-gateway-259854aa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.d402.xyz](https://www.zero.xyz/host/gateway.d402.xyz/llms.txt)
