Mozilla Readability: the library API, and a hosted option

Mozilla Readability is a JavaScript library (the engine behind Firefox Reader View), not a hosted web API: you give it a DOM document and parse() returns the main article's title, byline, HTML content, plain text and excerpt. In Node you supply the DOM with jsdom. If you want a hosted call instead, our HTML to Markdown API fetches a page and returns the main content as Markdown for $0.003 per call.

Try it free HTML to Markdown API — clean main content, $0.003 · $0.003 / call

Using the library in Node

Pass the page URL to JSDOM so relative links become absolute. Keep jsdom's script running off (the default) when the HTML comes from strangers.

npm install @mozilla/readability jsdom

import { JSDOM } from "jsdom";
import { Readability } from "@mozilla/readability";

const url = "https://example.com/article";
const html = await (await fetch(url)).text();
const dom = new JSDOM(html, { url });
const article = new Readability(dom.window.document).parse();
console.log(article?.title, article?.byline, article?.textContent.slice(0, 300));

What parse() gives you

isProbablyReaderable(document) is a quick pre-check that tells you whether parse() is likely to find an article. Mozilla warns it gives both false positives and false negatives.

When you want an HTTP call instead

Running jsdom means a Node server and some memory per page. Our HTML to Markdown API does the fetch and the extraction for you. It isn't Readability: it uses its own rules, keeping article and main content and dropping navigation, sidebars, footers, forms, cookie banners, comment blocks and hidden parts. You get Markdown (headings, lists, links, code blocks, images) plus the title, description and language. Send a URL or your own HTML.

curl -i -X POST https://iamai.markets/api/x402/services/xB9SA29ULP8G \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

# result: source, title, description, language, markdown, characters, truncated

Compared honestly

For pages that build their text in the browser, both come back short. Our page reader ($0.02) opens a real browser for those.

Readability + jsdomOur HTML to Markdown API
Runs whereYour Node processOur servers, one POST
OutputHTML and plain textMarkdown
Byline and dateYes, when foundNo; title, description and language only
JavaScript-built pagesOnly the HTML you fetchedOnly the HTML the server sends
CostFree, plus your hosting$0.003 per call, x402 in USDC on Base

The product

Questions

Is there an official Mozilla Readability REST API?

No. Mozilla publishes the library; any hosted endpoint you find is a third party running it.

Can I use Readability in Python?

There are Python ports such as readability-lxml, but they're separate projects that behave differently from Mozilla's.

Is this the same as a readability score?

No. Text readability scores (Flesch) measure how easy text is to read; see our readability API page.

Related

Updated 2026-12-02