# 2s.io HTML-to-Markdown Converter

> 2s.io HTML-to-Markdown Converter is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts raw HTML into clean Markdown text, returning the markdown, plain text, title, and word count.

## Facts

- Endpoint: POST https://2s.io/api/html/to-markdown
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-html-to-markdown-converter-017480d1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_q7GHmm7EiZ4a_I8SNec9I

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 2s-io-html-to-markdown-converter-017480d1 -d '<json body>'
```

Example prompt: Can you convert this HTML into markdown for me? Here's the raw HTML: '<h1>Hello</h1><p>A <a href="https://x.com">link</a>.</p>'

## When to prefer this

Use this endpoint when you need to convert raw HTML strings to Markdown programmatically without signup or API keys, paying only per call. Ideal for agents that occasionally need HTML-to-Markdown conversion without committing to a subscription service, or when integrating into a crypto-native payment workflow via x402 on Base or Solana.

## Known failure modes

- HTML exceeds 2MB size limit — likely returns an error or truncated result
- Malformed or unparseable HTML — may return empty or partial markdown
- Payment not sent or insufficient USDC — 402 Payment Required response
- Network timeout for very large documents

## How this service works

The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.

## Output

Returns a JSON object with ok=true and an items array. Each item contains: 'markdown' (the converted markdown string), 'text' (plain text version), 'title' (extracted page title), and 'wordCount' (number of words). Also includes a 'total' count and 'source' metadata indicating the provider and license.

## Example request

```json
{
 "html": "<html><head><title>Test Page</title></head><body><h1>Hello World</h1><p>This is a simple test paragraph with <strong>bold text</strong> and <em>italic text</em>.</p><ul><li>Item 1</li><li>Item 2</li></ul></body></html>"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "description": "Raw HTML to convert (≤2MB)."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-html-to-markdown-converter-017480d1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
