
Cheerio is a fast, flexible HTML and XML parsing library that brings jQuery's elegant syntax to server-side JavaScript.
Key Features:
Whether you're building web scrapers, processing HTML templates, or extracting structured data from web pages, Cheerio provides HTML and XML parsing for JavaScript.
Cheerio is for JavaScript teams that need fast jQuery-style HTML or XML parsing after they fetch pages themselves. It does not run browser JavaScript, so dynamic sites need another tool.
Growing a website? Track its keywords, Google rankings, Search Console insights, and share of voice with bisibility. Free during beta.
Our productSource code
cheeriojs/cheerio
Stars
30.6KForks
1.8KLast commit
2026-11-30License
MITLanguage
TypeScriptMetrics recorded 2026-12-01
License source: Repository license file
Cheerio parses the HTML you supply. It does not execute JavaScript, load external resources, or render the application. Save the response body and check whether it contains the expected records before sending it to an LLM. If the records are present, investigate selectors and transformations. If the response is only an application shell, use a permitted data endpoint or a browser step to obtain the missing content. Validate each pipeline stage with required fields and record identifiers; finishing without an exception does not establish complete extraction.
Sources (checked ): Welcome to Cheerio! | Cheerio
Cheerio can select relevant elements, read attributes or text, and remove unwanted nodes. Its text() includes script and style contents; prop("innerText") skips them. Neither option makes Cheerio calculate CSS visibility. Preserve useful structured-data scripts before removing scripts wholesale. Build an explicit input with the source URL, relevant text, and fields you already extracted deterministically. Retain the raw response for comparison and validate the model output against that source. Leave missing values missing and test preprocessing choices on your own pages.
Sources (checked ): Welcome to Cheerio! | Cheerio; Manipulating the DOM | Cheerio
Verified against the cheeriojs/cheerio repository and the npm package.
Compiled from public GitHub and npm data; confirm current package and license details before relying on them.