# Document to Markdown Converter

> Document to Markdown Converter is a paid API for AI agents from tools.adamhaleworks.workers.dev, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-17).

Fetches a public document (PDF, DOCX, XLSX, HTML, CSV, etc.) from a URL and converts it to Markdown text with optional metadata.

## Facts

- Endpoint: GET https://tools.adamhaleworks.workers.dev/x402/v1/document-markdown?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/document-to-markdown-converter-7a1abb9d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zoQha_00p7IDGdJJ-FHUj

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 document-to-markdown-converter-7a1abb9d
```

Example prompt: Can you fetch this PDF and convert it to markdown so I can read through it? The URL is https://bitcoin.org/bitcoin.pdf — please keep the metadata block at the top.

## When to prefer this

Use this endpoint when you need to programmatically extract and read text content from a publicly accessible document (PDF, DOCX, XLSX, HTML, CSV, etc.) without downloading or parsing it locally. It is ideal for LLM pipelines that need to ingest document content as markdown, or when you want to quickly read a remote file's text without format-specific libraries. Prefer this over generic web scrapers when the target is a document file rather than a web page.

## Known failure modes

- Document URL is not publicly accessible (private or requires auth) — fetch fails
- File exceeds 10 MB size limit — rejected
- Unsupported file format — conversion not attempted
- URL points to an internal IP or hostname — blocked for security
- Network timeout fetching the remote document
- Malformed or corrupted file — parsing error returned

## How this service works

Guides and free-to-run Apify actors for bulk tech stack lookup, sitemap URL export to CSV, TED and UK Find a Tender search, and RSS-to-JSON feed monitoring.

## Output

A JSON object containing the full markdown-converted text of the document, plus metadata: file format, MIME type, word count, character count, token count, byte size, source URL, final (redirected) URL, filename, and a truncated flag indicating if the content was cut short.

## 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 URL of the document (PDF, DOCX, XLSX/XLSM/XLSB/XLS, ODS, ODT, CSV, HTML, XML or Numbers), up to 10 MB. No IPs or internal names."
      },
      "filename": {
       "type": "string",
       "description": "Optional file name, used as a format hint and in the result."
      },
      "metadata": {
       "enum": [
        "0",
        "1"
       ],
       "type": "string",
       "description": "1 (default) keeps the PDF's metadata block at the top of the Markdown; 0 drops it."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 184292,
  "format": "PDF",
  "tokens": 5331,
  "filename": "bitcoin.pdf",
  "finalUrl": "https://bitcoin.org/bitcoin.pdf",
  "markdown": "# bitcoin.pdf\n## Contents\n### Page 1\nBitcoin: A Peer-to-Peer Electronic Cash SystemSatoshi Nakamoto\nsatoshin@gmx.com\nwww.bitcoin.orgAbstract. A purely peer-to-peer version of electronic cash would allow online\npayments to be sent directly from one party to another without going through a\nfinancial institution. …",
  "mimeType": "application/pdf",
  "sourceUrl": "https://bitcoin.org/bitcoin.pdf",
  "truncated": false,
  "wordCount": 3535,
  "characters": 21322
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/document-to-markdown-converter-7a1abb9d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.adamhaleworks.workers.dev](https://www.zero.xyz/host/tools.adamhaleworks.workers.dev/llms.txt)
