itemloaders
Base library for scrapy's ItemLoader
What it is and what it does
Itemloaders is a data extraction library that wraps HTML and XML parsing to collect fields from web pages using CSS and XPath selectors. It sits between raw HTML/XML and your application, providing a consistent interface for extracting multiple values per field, applying transformations, and normalizing data across different sources.
The library is designed for web scraping workflows where you need to extract the same logical fields from many different page structures. Instead of writing extraction logic inline, you define your selectors and parsing rules once in a loader, then apply it repeatedly. It handles multiple selector paths per field (useful when data appears in different locations), supports literal values, and returns results as lists by default to accommodate multi-valued fields.
Use it for:
- Extract product names, prices, and descriptions from e-commerce pages using CSS/XPath rules
- Standardize contact information scraped from multiple website formats into consistent fields
- Collect article metadata (title, author, date, body) from news sites with varying HTML structures
- Parse structured data from XML feeds or APIs that return XML responses
- Build a data pipeline that applies the same extraction rules across hundreds of similar pages
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Itemloaders extracts and standardizes structured data from HTML and XML documents using CSS and XPath selectors, with built-in casting and parsing rules.
Yes. Itemloaders is actively maintained, has no known vulnerabilities, requires only lightweight dependencies, and solves a real problem in web data extraction. It's production-stable and well-suited for any project that needs to extract and normalize data from HTML or XML at scale. Install it if you're doing web scraping or structured data collection.
Install
itemloaders on PyPI
pip
pip install itemloadersuv
uv add itemloaderspoetry
poetry add itemloadersInstalling itemloaders
Before you install
Low friction: pure Python wheel with only three runtime dependencies (itemadapter, jmespath, parsel). Actively maintained with recent commits and production-stable status.
License in practice
BSD-3-Clause permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install itemloaders
from itemloaders import ItemLoader
from parsel import Selector
html = '<div class="name">Product</div><span id="price">$10</span>'
loader = ItemLoader(selector=Selector(html))
loader.add_css('name', '.name::text')
loader.add_css('price', '#price::text')
item = loader.load_item()
print(item) # {'name': ['Product'], 'price': ['$10']}
Requires Python 3.10 or later.
Verify before relying
- Whether the package handles malformed HTML gracefully or requires well-formed input
- Performance characteristics when processing large documents or high-volume extraction tasks
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — itemadapter, jmespath, parsel |
| Maintenance | actively maintained — 197 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,903,410/month — #2,828 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: itemloaders-1.4.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
itemadapterItemAdapter wraps data container objects…
permissive · top 5,000 on PyPI
parselParsel extracts data from HTML, JSON, and XML…
permissive · top 5,000 on PyPI
requests-htmlParses and scrapes HTML from web pages using a…
permissive · top 15,000 on PyPI
cssselectcssselect parses CSS3 selectors and translates…
permissive · top 1,000 on PyPI
elementpathProvides XPath 1.0, 2.0, 3.0, and 3.1 selectors…
permissive · top 5,000 on PyPI
selectolaxselectolax is a fast HTML5 parser with CSS…
permissive · top 5,000 on PyPI
cssselect2cssselect2 parses and matches CSS4 selectors…
permissive · top 1,000 on PyPI
ScrapyScrapy is a web scraping framework that…
permissive · top 5,000 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
python-didl-liteReads and writes DIDL-Lite XML documents, a…
permissive · top 15,000 on PyPI