# Article & Document Extraction to Markdown

> Article & Document Extraction to Markdown is a paid API for AI agents from x402-gateway-production-1f21.up.railway.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-12).

Fetches a public article or document URL and extracts its main text content, converting it to a clean readable format suitable for RAG ingestion and AI processing.

## Facts

- Endpoint: POST https://x402-gateway-production-1f21.up.railway.app/article?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/article-document-extraction-to-markdown-68248892
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UslQqfOtoyY6bt32icBUm

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 article-document-extraction-to-markdown-68248892 -d '<json body>'
```

Example prompt: Pull the main article text from https://www.bbc.com/news/technology-article-12345 — limit it to 50000 characters — so I can feed it into my knowledge base.

## When to prefer this

Choose this endpoint when you need to extract clean readable text from a specific public article or document URL for AI processing, summarization, or RAG ingestion, especially when you want machine-payable per-call micropayment pricing via x402 without subscription overhead. Prefer this over full-site crawlers when you only need the body text of one specific URL.

## Known failure modes

- URL is not publicly accessible or requires authentication — returns error
- Timeout exceeded if page loads slowly beyond timeout_seconds — returns timeout error
- URL does not point to an article or parseable document — may return empty or minimal content
- max_text_chars below minimum (1000) or above maximum (150000) — returns validation error
- Paywalled content behind login walls cannot be extracted — returns limited or no content

## How this service works

Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.

## Output

Returns a JSON object with status 'ready' and the extracted main text content of the article or document at the given URL, stripped of HTML boilerplate, ads, and navigation elements, suitable for downstream AI processing or RAG ingestion.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Public http(s) article or document URL."
      },
      "max_text_chars": {
       "type": "integer",
       "maximum": 150000,
       "minimum": 1000
      },
      "timeout_seconds": {
       "type": "integer",
       "maximum": 60,
       "minimum": 5
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "ready"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/article-document-extraction-to-markdown-68248892/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production-1f21.up.railway.app](https://www.zero.xyz/host/x402-gateway-production-1f21.up.railway.app/llms.txt)
