Readability.js is a content extraction library that isolates article text and metadata from web pages.
The tool solves the problem of extracting clean, readable article content from cluttered web pages. It works by analyzing the DOM structure of a document, scoring candidate elements based on content density and structure, and extracting the most likely article container along with associated metadata like title, author, and publication date. The library originated from Firefox Reader View and is now available as a standalone module for use in Node.js and browser environments.
Readability suits projects that need to programmatically extract article content from arbitrary web pages, such as feed readers, content aggregators, or archival tools. It works with both server-side Node.js applications using external DOM libraries and client-side browser code. The tool offers fine-grained control through options like `maxElemsToParse` to limit processing scope, `charThreshold` to filter out minimal content, `keepClasses` to preserve styling information, and `allowedVideoRegex` to control which embedded videos are retained. The `serializer` option allows returning either HTML strings or DOM elements for downstream processing. For use cases where DOM modification is undesirable, the library can operate on a cloned document instead of the original.
The project maintains active engagement with pull requests and issues, showing responsiveness to bug reports and feature requests. Development includes regular updates to parsing heuristics and metadata extraction logic. The codebase receives ongoing refinement to handle edge cases in content extraction across diverse website structures.