# Machine Shop – HTML Document Preparation

> Machine Shop – HTML Document Preparation is a paid API for AI agents from api.pay-forge.online, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-20).

Parses and chunks raw HTML into clean text, extracts entities (URLs, dates, money, emails, EVM addresses), and returns structured document metadata ready for downstream analysis.

## Facts

- Endpoint: POST https://api.pay-forge.online/v1/html-prepare-document?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/machine-shop-html-document-preparation-a9c133bb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JdQQmbHklGzQeOnl5ZUNc

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 machine-shop-html-document-preparation-a9c133bb -d '<json body>'
```

Example prompt: Parse this HTML page into clean text chunks of 1500 characters each with 150-character overlap, and pull out any emails, dates, money amounts, and Ethereum addresses you find in it.

## When to prefer this

Choose this endpoint when you have raw HTML content in hand and need to prepare it for downstream tasks such as embedding, entity extraction, or evidence finding — particularly when you want chunked output with overlap for RAG pipelines. Prefer this over generic text extractors when you need EVM address extraction or SHA-256 document fingerprinting alongside standard NLP entities. Not suitable when you need JavaScript rendering, live web fetching, or scheduled monitoring.

## Known failure modes

- HTML exceeding 50,000 characters is rejected
- JavaScript-rendered content will not be visible — only static HTML is processed
- CSS-hidden elements may appear in output
- No table reconstruction or microdata parsing — complex layouts lose structure
- Invalid or malformed JSON body returns a 422 validation error
- chunk_size below 64 or above 10,000 is rejected with a validation error

## How this service works

Turn Apify product scrape results into safe catalog updates with Catalog Update Gate. Find evidence in supplied documents, compare snapshots, extract typed JSON fields, inspect x402 quotes and assess API migrations. Preview inputs, evidence and cost for free. No live web search, scheduled monitoring or third-party purchasing.

## Output

Returns a JSON object containing: clean plain text, an array of overlapping text chunks with start/end character positions and index, a SHA-256 hash of the document, extracted entities (URLs, dates, money amounts, emails, EVM addresses), a markdown rendering, page metadata (title, description, language, canonical URL), any detected structured data, and a list of parser limitations.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "title": "Html",
   "maxLength": 50000
  },
  "overlap": {
   "type": "integer",
   "title": "Overlap",
   "default": 150,
   "maximum": 9999,
   "minimum": 0
  },
  "base_url": {
   "type": "string",
   "title": "Base Url",
   "default": "",
   "maxLength": 2048
  },
  "chunk_size": {
   "type": "integer",
   "title": "Chunk Size",
   "default": 1500,
   "maximum": 10000,
   "minimum": 64
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "Hello\nAgent documents.",
  "links": [],
  "document": {
   "text": "Hello\nAgent documents.",
   "chunks": [
    {
     "end": 22,
     "text": "Hello\nAgent documents.",
     "index": 0,
     "start": 0
    }
   ],
   "sha256": "ad5d70c4710c7e4d89fd61cc8a948080c97155017935a37327b3c88d4ed9f88f",
   "entities": {
    "urls": [],
    "dates": [],
    "money": [],
    "emails": [],
    "evm_addresses": []
   },
   "removed_duplicate_lines": 0
  },
  "markdown": "# Hello\n\nAgent documents.",
  "metadata": {
   "meta": {},
   "title": "Example",
   "language": "en",
   "canonical": "",
   "description": ""
  },
  "limitations": [
   "Static HTML only; no JavaScript, CSS visibility, article detection, table reconstruction or microdata parsing."
  ],
  "structured_data": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/machine-shop-html-document-preparation-a9c133bb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.pay-forge.online](https://www.zero.xyz/host/api.pay-forge.online/llms.txt)
