---
title: What boilerplate_ratio Counts, and What It Cannot See | NanoParse
url: https://www.nanoparse.app/blog/2026-10-31-boilerplate-ratio
description: "Litmus returns twenty signal groups in the same response body as the markdown. Two of them look like verdicts on the page: boilerplate_ratio and content_density. Both names promise more than…"
---

Litmus returns twenty signal groups in the same response body as the markdown. Two of them look like verdicts on the page: `boilerplate_ratio` and `content_density`. Both names promise more than the code delivers, and a developer ranking sources by either will rank them wrong.

Fourteen URLs were submitted to the endpoint on 2026-10-31, across six page classes. Eleven completed, three were refused as blocked. Every payload is committed beside this post, and every number below reproduces from those files — except the word counts on pages that rotate their own content, which moved by a few words on a re-run an hour later while every ratio stayed identical.

The result, sorted by `boilerplate_ratio`:

```
ratio density words content_type url 0.67 0.73 1510 documentation kubernetes.io/docs/concepts/overview/ 0.57 0.93 470 tutorial developer.mozilla.org/.../Fetch_API 0.27 0.71 555 tutorial usa.gov/ 0.15 0.96 533 academic_paper en.wikipedia.org/wiki/Boilerplate_(text) 0.09 0.86 4156 tutorial en.wikipedia.org/wiki/Web_scraping 0.05 0.70 3852 academic_paper docs.python.org/3/library/json.html 0.02 1.00 1311 news_article bbc.com/news 0.01 0.81 1375 product_page stripe.com 0.00 0.50 135 general example.com 0.00 1.00 949 blog_post news.ycombinator.com 0.00 0.79 554 documentation docs.anthropic.com/en/docs/overview
```

Read as a quality ranking, that table says the Kubernetes documentation page is two-thirds junk and the Hacker News front page is perfectly clean. Both readings are wrong, and the reasons are in twenty lines of source.

## What the code counts

Three selectors, one denominator:

```
const navLen = ($("nav").text() || "").length; const footerLen = ($("footer").text() || "").length; const cookieLen = ($('[class*="cookie"], [id*="cookie"], [class*="consent"], [id*="consent"]').text() || "").length; const totalLen = ($("body").text() || "").length || 1; const boilerLen = navLen + footerLen + cookieLen; const ratio = Math.round((boilerLen / totalLen) * 100) / 100; return { ratio: Math.min(1, ratio), confidence: "high" };
```

Percentage of all page text that sits inside a

Litmus1,660 words

Copy link to this post

Test the page your agent just read.

Clean Markdown and 20 trust signals, $0.002 per parse.

[Run a test](https://www.nanoparse.app/#parse)

On this page

Share

Copy link

Keep reading

## More on litmus.

[All posts](https://www.nanoparse.app/blog)

[Nov 13, 2026The Page Says Where It Lives. The Fetcher Echoes What You Asked.A parse returns the Markdown and twenty signal groups beside it. One of those groups, structured_data, is five fields with four booleans and a single string. The booleans say whether a page…](https://www.nanoparse.app/blog/2026-11-13-canonical-and-fetch)

[Nov 10, 2026Page Not Found, Twice, and the Field That Called It a DocumentAn earlier survey of the six signal groups added in October reported that page_status fired on none of ten pages, and drew the right conclusion from it: the wall is usually caught upstream b…](https://www.nanoparse.app/blog/2026-11-10-page-status-default)

![](https://www.nanoparse.app/brand/nanoparse-logo-official.svg)

## Your agent deserves better data.

Clean Markdown and twenty deterministic trust signals, priced per parse.

[Run a free test](https://www.nanoparse.app/#parse)[See the 20 signals](https://www.nanoparse.app/litmus)

10 free parses a month · no account · no API key
