OSS Tanbou

parse, query, and rewrite HTML or XML with a lightweight jQuery-style selector API

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
30,513
Primary language
TypeScript
License
MIT
Repository last updated
Sep 30, 2026
On this page

Overview

Cheerio loads HTML or XML into a lightweight DOM model and exposes jQuery-like selectors for querying, modifying, and serializing markup. It uses parse5 by default and can also use htmlparser2, making it useful for server-side scraping and markup transformation without a full browser DOM.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Load markup and work with elements through jQuery-style selectors

Use cheerio.load() to parse markup, then query with $() and read or change text, attributes, classes, and structure before serializing the result back to HTML.

Sources: [2]

Choose parse5 or htmlparser2 according to parsing needs

Cheerio uses parse5 for HTML parsing and can optionally use htmlparser2, while presenting a shared selector-oriented API for HTML and XML.

Sources: [2][3]

Best fit

Fits scraping and server-side markup transformation that does not need a full browser

It works well for selector-based extraction, cleanup, and structural changes when layout, rendering, navigation, and other browser APIs are unnecessary.

Sources: [2]

Before adoption

Treat it as a lightweight DOM model rather than a browser engine

Cheerio does not reproduce browser layout, navigation, or JavaScript execution. Tests or scraping workflows that need browser behavior should use jsdom or real-browser automation where appropriate.

Sources: [2]

Cheerio 1.2.0 requires Node.js 22.19 or newer

The package engines field requires Node.js 22.19.0+. Check application, CI, and deployment runtimes before upgrading.

Sources: [3][4]

Official sources

  1. [1]cheeriojs/cheerio repository(2026-09-30)
  2. [2]Cheerio README(2026-09-30)
  3. [3]Cheerio 1.2.0 package metadata(2026-09-30)
  4. [4]Cheerio v1.2.0 release(2026-09-30)
  5. [5]Cheerio MIT license(2026-09-30)
Supplemental curator note

Cheerio is designed for lightweight HTML and XML parsing rather than browser layout or script execution. Version 1.2.0 requires Node.js 22.19 or newer, so existing scraping jobs and CI runtimes should be checked before upgrading.

Try it in 3 steps

  1. 1

    Install Cheerio 1.2.0

    Pin the stable release in a project running Node.js 22.19 or newer.

    npm install cheerio@1.2.0
  2. 2

    Load HTML

    Parse markup into Cheerio’s lightweight DOM model using the documented load API.

    import * as cheerio from 'cheerio'; const $ = cheerio.load('<h2 class="title">Hello</h2>');
  3. 3

    Query and modify elements

    Use jQuery-style selectors to update the document and inspect the serialized HTML.

    $('h2.title').text('Hello there!'); console.log($.html());
Check the official README

Growth

Growth trends · Last 30 days

30,513 Stars

Trend data is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • cheerio
  • dom
  • hacktoberfest
  • html
  • htmlparser
  • htmlparser2
  • jquery
  • parser
  • scraper
  • selector
Stars
30,513
Forks
1,722
Watchers
347
Open issues
70
Owner type
Organization
Primary language
TypeScript
License
MIT
Repository last updated
Sep 30, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?