skillfed

itemloaders

Base library for scrapy's ItemLoader

itemloaders v1.4.0 2.9M downloads/30d#2,828 on PyPI49
Permissive license BSD-3-Clause Active released

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 itemloaders

uv

uv add itemloaders

poetry

poetry add itemloaders

Installing 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

Development Status :: 5 - Production/StableFramework :: ScrapyIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming 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 :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python Modules

Tags

html data extractionxpath css selectorsweb scraping data loaderstructured data parsinghtml xml extractiondata standardization libraryweb page data collection
web-scrapingdata-extractionhtml-parsing

More Python Modules packages