# code402 Clean Markdown Scraper

> code402 Clean Markdown Scraper is a paid API for AI agents from hcrb.in, paid per call via x402, $0.015/call, status unknown (last checked 2026-10-12).

Fetches a URL and returns its content as clean, structured Markdown with word count and headings

## Facts

- Endpoint: POST https://hcrb.in/v1/tools/clean-markdown-scraper/call?utm_source=zero.xyz
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/code402-clean-markdown-scraper-5d82b740
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cb0cVRArVBHxgRhb9nVoV

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 code402-clean-markdown-scraper-5d82b740 -d '<json body>'
```

Example prompt: Can you fetch the content of https://example.com/blog/article and give me back a clean markdown version of the page, including all the headings?

## When to prefer this

Choose this endpoint when you need a fast, pay-per-call web-to-markdown conversion without running your own scraping infrastructure. It is particularly suitable for agents that occasionally need to fetch and process web content without committing to a subscription, since the first 3 calls per day are free and subsequent calls are $0.015 USDC each via gasless on-chain micropayment.

## Known failure modes

- URL is unreachable or returns non-200 status — likely returns an error object
- Page has no extractable text content (e.g. fully JavaScript-rendered SPA) — markdown may be empty or minimal
- Malformed or missing URL input — request rejected with validation error
- Payment not attached or insufficient — 402 Payment Required response
- Rate limit exceeded beyond 3 free calls/day without payment

## How this service works

Offline deterministic checks (no ML, no scraping) for business identifiers and rental due-diligence, paid per call via x402 (gasless EIP-3009 USDC on Base). Checksum-verifiable (IBAN, LEI, VAT, ABA, ISBN, SEDOL…) vs format-only (EIN, IFSC, SWIFT/BIC…) — every response returns a scope field. Non-custodial, signed receipts. First 3 calls/day free.

## Output

A JSON object containing the full page content as clean Markdown string, a numeric word count, and an array of headings extracted from the page.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "required": [],
   "properties": {
    "url": {
     "type": "string",
     "description": "Public http(s) page to fetch (ports 80/443 only). Provide exactly one of url or html."
    },
    "html": {
     "type": "string",
     "description": "Raw HTML string to convert instead of fetching a URL (max 1 MiB). Provide exactly one of url or html."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "required": [
   "markdown",
   "wordCount"
  ],
  "properties": {
   "headings": {
    "type": "array"
   },
   "markdown": {
    "type": "string"
   },
   "wordCount": {
    "type": "number"
   }
  }
 },
 "example": {
  "valid": true,
  "reason": "checksum valid"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code402-clean-markdown-scraper-5d82b740/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hcrb.in](https://www.zero.xyz/host/hcrb.in/llms.txt)
