# Cheerio: Fast and Flexible HTML/XML Parsing and Manipulation Library

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/cheeriojs-cheerio
Generated for open source discovery and AI-assisted research.

Cheerio is a popular library for parsing and manipulating HTML and XML documents in Node.js. It provides a jQuery-like API, making it easy to select, traverse, and modify elements with proven syntax. Known for its blazingly fast performance and incredible flexibility, Cheerio is an excellent choice for web scraping and server-side DOM manipulation.

GitHub: https://github.com/cheeriojs/cheerio
OSRepos URL: https://osrepos.com/repo/cheeriojs-cheerio

## Summary

Cheerio is a popular library for parsing and manipulating HTML and XML documents in Node.js. It provides a jQuery-like API, making it easy to select, traverse, and modify elements with proven syntax. Known for its blazingly fast performance and incredible flexibility, Cheerio is an excellent choice for web scraping and server-side DOM manipulation.

## Topics

- cheerio
- html-parser
- web-scraping
- dom-manipulation
- typescript
- jquery-like
- xml-parser

## Repository Information

Last analyzed by OSRepos: Wed May 13 2026 01:29:17 GMT+0100 (Western European Summer Time)
Detail views: 1
GitHub clicks: 2

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introdução
Cheerio is a lightweight and efficient library designed for parsing and manipulating HTML and XML documents. It brings a familiar jQuery-like syntax to the server-side, allowing developers to interact with the DOM without the overhead of a full browser environment. Built with speed and flexibility in mind, Cheerio is an ideal tool for tasks such as web scraping, content parsing, and server-side rendering. It leverages `parse5` for robust HTML parsing and can optionally use `htmlparser2`.

## Instalação
To get started with Cheerio, you can install it using your preferred package manager:

bash
npm install cheerio
# or
bun add cheerio


## Exemplos
Here's a quick example demonstrating how to load HTML, manipulate elements, and render the result:

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

$('h2.title').text('Hello there!');
$('h2').addClass('welcome');

$.html();
//=> <html><head></head><body><h2 class="title welcome">Hello there!</h2></body></html>


This snippet shows how easy it is to select elements using CSS selectors, modify their text content, add classes, and then retrieve the updated HTML.

## Porquê usar
Cheerio stands out for several compelling reasons:
*   **Proven Syntax:** It implements a subset of core jQuery, offering a familiar and powerful API without browser inconsistencies.
*   **Blazingly Fast:** With a simple and consistent DOM model, Cheerio ensures incredibly efficient parsing, manipulation, and rendering.
*   **Incredibly Flexible:** Wrapping around `parse5` and optionally `htmlparser2`, Cheerio can parse nearly any HTML or XML document and works seamlessly in both browser and server environments.

## Links
*   **GitHub Repository:** [https://github.com/cheeriojs/cheerio](https://github.com/cheeriojs/cheerio){:target="_blank"}
*   **Chinese Readme (????):** [https://github.com/cheeriojs/cheerio/wiki/Chinese-README](https://github.com/cheeriojs/cheerio/wiki/Chinese-README){:target="_blank"}
*   **Cheerio in Production Wiki:** [https://github.com/cheeriojs/cheerio/wiki/Cheerio-in-Production](https://github.com/cheeriojs/cheerio/wiki/Cheerio-in-Production){:target="_blank"}