htmlparser2
Fast, forgiving HTML and XML parser for Node.js, the engine under cheerio.
Scraping, browsers and parsing npm MIT
How htmlparser2 is used
htmlparser2 joined the catalog on its public numbers (57,883,028 downloads a week on npm and 4,793 GitHub stars), not on our project count: it is a dependency in 18 public GitHub projects of our scan, 9 of them set up for AI coding agents. Projects that use it most often also use jsdom (38.9%), Zod (61.1%), Playwright (JavaScript) (50.0%).
htmlparser2 popularity over time
Gid Score 60: downloads 100, use in agent projects 26, GitHub stars 38, downloads trend 58 (each 0-100). How it is calculated.
Often used with htmlparser2
| jsdom | 38.9% of htmlparser2 projects · 4.0× more than average |
|---|---|
| Zod | 61.1% of htmlparser2 projects · 2.4× more than average |
| Playwright (JavaScript) | 50.0% of htmlparser2 projects · 2.9× more than average |
| Sharp | 33.3% of htmlparser2 projects · 7.1× more than average |
| yaml | 33.3% of htmlparser2 projects · 10.7× more than average |
| Vitest | 50.0% of htmlparser2 projects · 2.4× more than average |
| Babel (JavaScript) | 27.8% of htmlparser2 projects · 7.5× more than average |
| AI SDK | 27.8% of htmlparser2 projects · 6.3× more than average |
By coding agent
| GitHub Copilot | 0.2% of projects set up for it |
|---|---|
| Claude Code | 0.2% of projects set up for it |
| Cursor | 0.2% of projects set up for it |
Share of public repos configured for each agent that list htmlparser2 as a dependency.
How htmlparser2 is funded
GitHub Sponsors
| @fb55 | 7 current sponsors |
|---|
GitHub shows how many people and companies sponsor an account, not how much they pay. Sponsors of a person back all of their work, which here includes Cheerio, parse5.
Ways to fund htmlparser2
As the maintainers list them in FUNDING.yml on GitHub and in the npm package. Checked Oct 20, 2026.
Install
| Package | npm install htmlparser2 |
|---|---|
| Main stacks | TypeScript / JavaScript (13), Next.js (4), Python (1) |
| Example projects | ajanraj/OpenChat, openclaw/docs, beep-effect/beep-effect, redchenk/tsukuyomi-space, gulagala001/oh-my-dsh |
Alternatives to htmlparser2
In our scan, none of the most used tools in Scraping, browsers and parsing does the same job as htmlparser2: they are add-ons, companions or tools for a different task.
More in Scraping, browsers and parsing: Beautiful Soup Puppeteer lxml Playwright Core Playwright (Python) Cheerio fast-xml-parser jsonc-parser