Glossary

Reader mode extraction

Reader mode extraction pulls the main article out of a web page, with its title, author, date and body text, and discards navigation, adverts and other page furniture.

Reader mode extraction is the automated process of finding the main article on a web page and returning it as clean content, usually with its title, author, publication date, lead image and body text, while discarding navigation, sidebars, adverts, cookie banners, comment sections and footers. The name comes from the reader views built into browsers, which show a simplified version of an article at the press of a button. The same technique runs on servers to prepare pages for search indexes, read-later apps, archives and AI systems, where it is one of the most effective ways to turn a cluttered page into LLM-ready data.

Where reader mode comes from

Browser reader views appeared around 2010, building on an open-source bookmarklet called Readability that stripped a page down to its article. Safari added Reader, Firefox added Reader View using Mozilla’s Readability.js library, and Chrome and Edge now have their own reading modes. Each takes the rendered page, decides which part is the article, and re-displays only that part in a plain layout. Read-later services, RSS readers and note-taking tools adopted the same approach to save articles without the surrounding site.

The server-side versions are libraries rather than buttons. Mozilla’s Readability runs in Node.js against a parsed DOM. In Python, trafilatura, readability-lxml and newspaper-style libraries do similar work, and several commercial APIs offer article extraction as a service. They differ in heuristics and in which metadata they return, but the job is the same: given a page, return the article and nothing else.

How main-content detection works

Most reader mode algorithms score parts of the page and keep the best-scoring region. After HTML parsing, the algorithm walks the tree and scores candidate containers using signals that separate prose from page furniture. Long paragraphs with sentences and commas score up. Elements whose class or id names suggest content (article, body, post, entry) score up, while names suggesting clutter (comment, sidebar, footer, promo, share) score down. Link density matters a great deal: a block where most of the text is links is almost always navigation, a related-articles rail or a tag cloud. Scores are propagated to parent elements, the highest-scoring container is chosen as the article, and nearby siblings that look like continuation (an image with a caption, a second text block) are pulled in.

Modern extractors add structural shortcuts before falling back to scoring. If the page uses an <article> or <main> element, that is a strong hint. If it carries schema.org Article markup, the headline, author and dates can be read directly. Open Graph and other meta tags supply a title, description and lead image when the body does not make them obvious, and the canonical URL tells the extractor which address to record. A good reader mode result combines the scored body with this metadata into one tidy record.

Field

Typical source

Notes

Title

Article heading, og:title, <title>

Site name often stripped from the <title> suffix

Author

Byline element, schema.org author, meta author

Frequently missing or ambiguous

Published date

schema.org datePublished, <time>, meta tags

Updated dates are easy to confuse with published ones

Lead image

og:image, first large image in the article

May be a generic site image

Body

Highest-scoring content container

Returned as HTML, Markdown or plain text

Excerpt

meta description, first paragraph

Useful for previews and search snippets

Reader mode and boilerplate removal

Reader mode extraction and boilerplate removal aim at the same thing from slightly different angles. Boilerplate removal is the general task of discarding repeated, non-content parts of a page, whatever kind of page it is. Reader mode is a specific, article-shaped version of it: it assumes the page has one main piece of writing, returns that piece, and reconstructs its metadata. For news, blogs, documentation pages and help articles the two give similar results. For pages that are not articles, such as product listings, search results, forum threads or dashboards, reader mode can be the wrong tool, because there is no single article to find.

Once the article is isolated, it is usually converted for downstream use. HTML to Markdown conversion keeps headings, lists, links and simple tables in a compact form that language models read well, and plain text is used where structure does not matter. Either way, the size reduction is large: a page that weighs hundreds of kilobytes in HTML often becomes a few kilobytes of article text.

What reader mode gets wrong

Heuristics fail in predictable ways. Short pages, such as a two-paragraph announcement, may not score high enough to be recognised as articles, so the extractor returns nothing or picks a navigation block. Pages with several articles of similar length, such as a blog index, may return the wrong one. Long-form pieces split across several pages return only the first page unless the extractor follows pagination. Content laid out in tables, code samples, callout boxes and figure captions is sometimes dropped as non-prose, which is a problem for technical documentation. Comments are usually removed, which is right for most uses but wrong if the discussion is the point.

Access problems also show up as extraction problems. If a cookie wall or paywall covers the article, the extractor faithfully returns the wall’s text. If the article is built by JavaScript after load, the raw HTML contains no article at all, and the page needs JavaScript rendering in a headless browser before reader mode can work; dynamic content covers which sites behave this way. A practical safeguard is to check the length and shape of each result: an “article” of 40 words, or one that contains “accept cookies”, should be flagged rather than stored.

Evaluating an extractor is straightforward once you have a sample. Take fifty to a hundred pages that represent your sources, save the article text a person would consider correct, and compare each extractor’s output against it for missing paragraphs, extra clutter and wrong metadata. Precision and recall at the paragraph level give a simple score, and reading the failures teaches more than the score does. In practice no single library wins on every type of site, so many teams pair a fast heuristic extractor with a fallback for results that look too short or too noisy. Re-run the comparison when you add a new kind of source, since a library that does well on news may stumble on documentation.

Why AI pipelines use reader mode

For RAG and agent context, reader mode does three useful things. It cuts tokens, because navigation, footers and related-article lists can outweigh the article itself, and every token of clutter takes space in the context window and adds cost. It improves retrieval, because chunks that contain only article text match questions about that text, rather than matching on repeated menu items that appear on every page of a site. And it makes chunking and source attribution cleaner, since each chunk can carry the article’s title, author, date and URL as metadata.

It also removes some risk. Hidden elements, off-screen text and injected widgets are common places for indirect prompt injection, and reader mode tends to drop much of that material because it is not part of the scored article. It is not a security control on its own, since text inside the article body survives, but it narrows what an agent reads. For web archiving and protection against link rot, storing a reader-mode copy alongside the URL preserves what a page said even after it changes or disappears.

A worked example

A research assistant saves articles that a user flags during the week. One is a 2,400-word analysis on a news site. The rendered page is about 350 KB of HTML: a header with 60 navigation links, a cookie banner, three advert slots, a newsletter sign-up, the article, a related-stories rail, 140 comments and a footer. Reader mode extraction returns the headline, the author, the publication date from the schema.org markup, the lead image from og:image and a body of 2,400 words with its subheadings and two embedded charts’ captions. As Markdown it is about 15 KB. Chunked by subheading, it becomes nine passages, each tagged with the title, author, date and URL, and the assistant can later quote the right passage with a citation. The figures are illustrative.

If the same pipeline had stored the full page, the comments alone would have tripled the text, and a question about the article’s argument could easily have retrieved a reader’s comment instead.

Where Exabase fits

Reader mode is built into how Exabase stores web pages. When you save a URL as a bookmark through Resources, Exabase fetches the page and stores a web page capture that includes the title, description, site name, favicon, a screenshot and a reader-mode version of the page, then indexes the content for Deep Search so an agent can find the passage it needs by meaning. The create bookmark endpoint takes a URL, optional tags and a parent folder, and creating resources walks through the flow.

If you want the clean content returned to your own system instead of stored, submit the URL to Extract, which renders the page with JavaScript and returns the title, site name and text chunks as JSON, or Markdown with ?format=markdown. The free website to Markdown tool runs on the same pipeline, and the Link Preview API returns just the title, description, image and favicon when you only need a preview. Exabase provides the extraction and storage; which pages to save and how your agent uses them stays in your application. Exabase vs Diffbot and Jina Reader alternatives compare other services that return article content from URLs.

Frequently asked questions

What is reader mode in a browser?

It is a view that shows only an article’s text, headings and images in a clean layout, hiding navigation, adverts and other page elements. Safari, Firefox, Chrome and Edge all include one.

How does reader mode decide what the article is?

It scores parts of the page by signals such as paragraph length, punctuation, link density and class names, keeps the highest-scoring container, and adds metadata from structured data and meta tags.

Is reader mode extraction the same as boilerplate removal?

They overlap. Boilerplate removal discards non-content parts of any page, while reader mode specifically returns one main article and its metadata, so it suits article-like pages best.

Why does reader mode return nothing on some pages?

The page may be too short to score as an article, built by JavaScript the extractor did not run, covered by a cookie or paywall, or not an article at all, such as a listing or dashboard.

Which library should I use for reader mode extraction?

Mozilla’s Readability is the common choice in JavaScript, and trafilatura is widely used in Python. Test them on your own pages, since accuracy varies by site type.

Does reader mode help with RAG?

Yes. It removes clutter that wastes tokens and pollutes retrieval, and it supplies titles, authors, dates and URLs that make chunks easier to cite.

Does Exabase store a reader-mode version of saved pages?

Yes. Bookmarks saved through Resources include a reader-mode version of the page along with its title, description, site name, favicon and a screenshot, and the content is indexed for Deep Search.

Related pages: Boilerplate removal, HTML to Markdown, HTML parsing, LLM-ready data, Web archiving, Web scraping, Resources, Exabase vs Diffbot, Best HTML to Markdown API, Research agents use case, Jina Reader alternatives, Jina pricing

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.