$npx skillfedfor your agent

parsel

Parsel is a library to extract data from HTML and XML using XPath and CSS selectors

Worth itPyPI MarkupReleased Jan 20264.9M downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — parsel-1.11.0-py3-none-any.whl
v1.11.0 · released 2026-01-29 · Python >=3.10 · 5 runtime deps: cssselect, jmespath, lxml, packaging, w3lib

Yes. Parsel is actively maintained, widely used (top 5000 PyPI), has no known vulnerabilities, and offers a clean API for a common task. Install it if you need to extract data from HTML, XML, or JSON documents in a Python application. The low install friction and permissive license make it a straightforward choice.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; lxml is a compiled C dependency that may require build tools on some systems.
  • Low friction install with five runtime dependencies (cssselect, jmespath, lxml, packaging, w3lib).
  • Active maintenance with recent commits and stable production status.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows commercial and private use with minimal restrictions.

last release 2026-01-29 (197 days) · last repo commit 2026-08-10 · 1,349 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,934,763 downloads/mo, #2,196 on PyPI

Verify before relying

pip install parsel

from parsel import Selector

text = '<h1>Hello</h1><ul><li><a href="http://example.com">Link</a></li></ul>'
selector = Selector(text=text)
print(selector.css('h1::text').get())
print(selector.xpath('//a/@href').get())
  • Whether lxml compilation is seamless on all target platforms or if pre-built wheels are reliably available.
  • Performance characteristics when parsing very large documents or applying complex selector chains.
Same gist for agents: .md · .json

What it is and what it does

Parsel is a data extraction library that wraps HTML, JSON, and XML documents in a unified selector interface. It lets you query documents using CSS selectors and XPath expressions for markup, JMESPath for JSON, and regular expressions across all formats. The library is commonly used in web scraping pipelines and data processing workflows where you need to pull structured information from semi-structured documents.

The package depends on lxml for markup parsing, cssselect for CSS-to-XPath translation, jmespath for JSON queries, w3lib for URL/encoding utilities, and packaging for version handling. It supports modern Python versions (3.10 through 3.14) and both CPython and PyPy implementations. The API is straightforward: create a Selector from text, then chain method calls like .css() or .xpath() to navigate and extract data.

Use it for

  • Web scraping: extract product names, prices, and links from e-commerce HTML pages.
  • API response parsing: pull nested data from JSON responses using JMESPath expressions.
  • XML document processing: extract fields from structured XML feeds or configuration files.
  • Data cleaning pipelines: apply CSS or XPath rules to normalize and extract text from HTML documents.
  • Testing web scrapers: validate that selectors correctly target expected elements before deploying.
  • Log or markup analysis: search and extract patterns from HTML or XML logs using regular expressions.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Parsel is actively maintained, widely used (top 5000 PyPI), has no known vulnerabilities, and offers a clean API for a common task. Install it if you need to extract data from HTML, XML, or JSON documents in a Python application. The low install friction and permissive license make it a straightforward choice.

Install

parsel on PyPI

Before you install

Low friction install with five runtime dependencies (cssselect, jmespath, lxml, packaging, w3lib). Active maintenance with recent commits and stable production status.

Requires Python 3.10 or later; lxml is a compiled C dependency that may require build tools on some systems.

License in practice

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions.

Quickstart

pip install parsel

from parsel import Selector

text = '<h1>Hello</h1><ul><li><a href="http://example.com">Link</a></li></ul>'
selector = Selector(text=text)
print(selector.css('h1::text').get())
print(selector.xpath('//a/@href').get())

Verify before relying

  • Whether lxml compilation is seamless on all target platforms or if pre-built wheels are reliably available.
  • Performance characteristics when parsing very large documents or applying complex selector chains.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
cssselectjmespathlxmlpackagingw3lib
MaintenanceActively maintained 197 days since the last release
Last repo commit
First released
Downloads4,934,763 / month, #2,196 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Text Processing :: MarkupTopic :: Text Processing :: Markup :: HTMLTopic :: Text Processing :: Markup :: XML

Evidence: parsel-1.11.0-py3-none-any.whl

Tags

Capabilities
html parsing css xpathextract data from html xmlweb scraping selector libraryjson jmespath extractiondocument parsing selectorshtml xml data extractioncss xpath json queries
Topics
web-scrapingdata-extractionmarkup-parsing
PyPI keywords
parsel

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “extract data from html xml”

  • parselParsel extracts data from HTML, JSON, and XML documents using CSS…
  • beautifulsoup4Beautiful Soup parses HTML and XML documents into a navigable tree,…
  • itemloadersItemloaders extracts and standardizes structured data from HTML and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Markup packages

PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
markdown-it-py Worth it
PyPI · Python Modules · released May 2026

A Python markdown parser that converts markdown to HTML following the CommonMark specification, with support for plugins and custom syntax rules.

Install it if you need reliable markdown-to-HTML conversion.

MITpure Python · 3.10+
613.8Mdownloads / mo
beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.

Install it if you need to parse or extract data from markup documents.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
et-xmlfile With conditions
PyPI · Markup · released Oct 2024

et_xmlfile writes large XML files with minimal memory overhead by serializing elements to disk as they are created, rather than holding the entire tree in memory.

Install it if incremental XML writing fits your use case; skip it if your XML documents are small or you already use lxml.

MITpure Python · 3.8+dormant
343.3Mdownloads / mo
tomlkit Worth it
PyPI · Markup · released Jul 2026

Parses and edits TOML files while preserving formatting, comments, and structure, then serializes them back with layout intact.

Install it if you're building tools that touch TOML files and user readability of the source matters.

MITpure Python · 3.9+
338.0Mdownloads / mo
docstring-parser Worth it
PyPI · Python Modules · released Apr 2026

Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.

Install it if you need to programmatically read and extract structured data from Python docstrings.

MITpure Python · 3.8+
274.9Mdownloads / mo

See also cssselect · itemloaders · jmespath · selectolax · pyquery · cssselect2 · turbohtml · elementpath · soupsieve · inscriptis