# Readability Content Extraction from HTML

> Readability Content Extraction from HTML is a paid API for AI agents from markup-tools.x402tookit.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-02).

Extracts the main article content from raw HTML using heuristic text-density and tag scoring, returning cleaned text, title, byline, and a confidence score.

## Facts

- Endpoint: GET https://markup-tools.x402tookit.com/readability-extract?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/readability-content-extraction-from-html-57e9286c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JuLnLVZDvx_W3r8bsVFnC

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 readability-content-extraction-from-html-57e9286c
```

Example prompt: I have the raw HTML of a news article — can you extract just the main article text, the title, and the author byline from it, and tell me how confident the extraction is?

## When to prefer this

Choose this endpoint when you have raw HTML and need to isolate the main readable content without running a full browser or JavaScript engine. It is ideal for server-side pipelines that scrape static or server-rendered HTML and need article text for downstream NLP, summarization, or indexing. Prefer this over generic HTML-to-text converters when you also need metadata like byline, title, confidence score, and container identification — the scoring heuristics make it more robust than simple tag stripping.

## Known failure modes

- HTML longer than 20,000 characters returns 400 Bad Request
- Highly JavaScript-rendered pages with minimal static HTML may yield low confidence or null text
- Pages with no discernible content block may return null text with low confidence score
- Malformed HTML may cause degraded=true with partial results
- Missing or ambiguous byline results in null byline field
- Payment failure or missing x402 payment returns 402 Payment Required

## How this service works

Heuristic main-content extraction from supplied HTML by text density and tag scoring; returns text, title, byline, confidence.

## Output

Returns a JSON object with: extracted plain text of the main content, page title, byline/author, confidence level (e.g. high/medium/low), word count, language, link density ratio, the HTML container element that was identified as main content (tag, id, class), counts of elements removed by tag or class/id heuristics, an optional summary, verdict string, and degraded flag indicating partial extraction. Null fields are returned when data is unavailable.

## 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": [
      "html"
     ],
     "properties": {
      "base": {
       "type": "string",
       "description": "Optional absolute http(s) URL of the page (kept in the answer for context)"
      },
      "html": {
       "type": "string",
       "description": "Full page HTML, up to 20000 characters (longer is refused with 400)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "text": {
       "type": [
        "null",
        "string"
       ]
      },
      "score": {
       "type": [
        "null",
        "number"
       ]
      },
      "title": {
       "type": [
        "null",
        "string"
       ]
      },
      "byline": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "pageUrl": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "removed": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "byTag": {
         "type": [
          "null",
          "number"
         ]
        },
        "hidden": {
         "type": [
          "null",
          "number"
         ]
        },
        "byClassOrId": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "language": {},
      "container": {
       "type": [
       
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/readability-content-extraction-from-html-57e9286c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from markup-tools.x402tookit.com](https://www.zero.xyz/host/markup-tools.x402tookit.com/llms.txt)
