PINGDOM_CHECK

#ExtractSummit2026 The world's largest web scraping conference returns. Austin Oct 7–8 · Dublin Nov 10–11.

Register now
Data Services
Pricing
Login
Try Zyte APIContact Sales
  • Unblocking and Extraction

    Zyte API

    The ultimate API for web scraping. Avoid website bans and access a headless browser or AI Parsing

    Ban Handling

    Headless Browser

    AI Extraction

    SERP

    Enterprise

    DocumentationSupport

    Hosting and Deployment

    Scrapy Cloud

    Run, monitor, and control your Scrapy spiders however you want to.

    Coding Agent Add-Ons

    Agentic Web Data

    Plugins that give coding agents the context to build production Scrapy projects. Starts with Claude Code.

  • Data Services
  • Pricing
  • Browse

    • BlogArticles, podcasts, videos
    • Case studiesCustomer outcomes
    • White papersIn-depth reports
    • DocumentationGuides & API reference
    • EventsConferences, webinars, recordings

    Subscribe

    • NewsletterSwiftly delivered
    • Join our community2,000+ web scraping engineers
  • Product and E-commerce

    From e-commerce and online marketplaces

    Data for AI

    Collect and structure web data to feed AI

    Job Posting

    From job boards and recruitment websites

    Real Estate

    From Listings portals and specialist websites

    News and Article

    From online publishers and news websites

    Search

    Search engine results page data (SERP)

    Social Media

    From social media platforms online

  • Meet Zyte

    Our story, people and values

    Contact us

    Get in touch

    Support

    Knowledge base and raise support tickets

    Terms and Policies

    Accept our terms and policies

    Open Source

    Our open source projects and contributions

    Web Data Compliance

    Guidelines and resources for compliant web data collection

    Join the team building the future of web data
    We're Hiring
    Trust Center
    Security, compliance & certifications
Login
Try Zyte APIContact Sales
All articles
AI71, 71 articles
Data quality15, 15 articles
Developer interest60, 60 articles
Integration2, 2 articles
Open-source50, 50 articles
Proxies35, 35 articles
Scraping practice35, 35 articles
Scraping strategy46, 46 articles
Search results4, 4 articles
Web data74, 74 articles
Web scraping APIs49, 49 articles
Scrapy47, 47 articles
Scrapy Cloud26, 26 articles
Web Scraping Copilot11, 11 articles
Zyte API65, 65 articles
AI & Machine Learning3, 3 articles
Automotive3, 3 articles
E-commerce & retail33, 33 articles
Entertainment & Streaming2, 2 articles
Financial Services8, 8 articles
Government2, 2 articles
Market Research & Intelligence7, 7 articles
Media & publishing11, 11 articles
Real Estate2, 2 articles
Recruitment & HR3, 3 articles
Transportation & Logistics2, 2 articles
Travel & hospitality3, 3 articles
iPaaS2, 2 articles
Large language model29, 29 articles
MCP3, 3 articles
Python110, 110 articles
Scraping at Scale7, 7 articles
Scraping Fundamentals11, 11 articles
Web Scraping Industry Report20, 20 articles

Appearance

Discord Community
BlogLearnHow to ensure data quality in your Scrapy web scraping projects using Spidermon and Claude Code
LearnData quality

How to ensure data quality in your Scrapy web scraping projects using Spidermon and Claude Code

A

Ayan Pahwa

·

5 min read · April 10, 2026

How to ensure data quality in your Scrapy web scraping projects using Spidermon and Claude Code

Your spider ran to completion. No exceptions. Exit code 0. But when you opened the output, half the price fields were empty, some URLs were relative paths instead of absolute ones, and the item count was 40% lower than expected - silently.

This is the data quality problem in web scraping, and it's more common than most developers expect. Scrapy does a great job of fetching and parsing pages, but it has no built-in way to tell you when the data coming out of that process is wrong. That's a separate concern, and one that Spidermon was built to handle.

What does "good data" actually mean?

Before we set up any monitoring, it helps to define what we're trying to protect. In the context of scraped items, good data has four dimensions:

  • Completeness — all expected fields are present and non-empty
  • Correctness — values match the expected type and format (a price is a number, a URL starts with https://)
  • Consistency — all items have the same structure across the entire crawl
  • Volume — the number of scraped items is within a reasonable range

Most spider bugs violate one or more of these. Spidermon gives you monitors for each.

Introducing Spidermon

Spidermon is an open-source monitoring framework for Scrapy. You attach it to your spider, define what "success" looks like, and it automatically checks your crawl results after the spider closes, flagging anything that doesn't meet your standards.

Out of the box, it gives you:

  • Item validation : validate every scraped item against your JSON schema.
  • Item count monitoring : fail the run if fewer than desired-set items were scraped.
  • Field coverage : check that critical fields are populated across all items.
  • Finish reason monitoring : catch spiders that closed abnormally (connection timeout, ban, etc.).
  • Notifications : alert via Slack, Telegram, email, or Sentry when a monitor fails.
  • HTML reports : a visual pass/fail summary saved after each run.

Install it with:

1pip install spidermon[validation]
2# or with uv
3uv pip install spidermon jsonschema
Copy

Setting up spidermon manually

Let's walk through a complete setup for a product spider called products in a project called store_scraper. Each item it yields looks like this:

1{"name": "Wireless Keyboard", "price": 49.99, "url": "https://store.example.com/keyboards/wireless"}
Copy

1. Register the extension

Add Spidermon to your settings.py. The extension class name is Spidermon, not SpiderMonitor, which is a common mistake.

1# settings.py
2EXTENSIONS = {
3    "spidermon.contrib.scrapy.extensions.Spidermon": 500,
4}
5
6SPIDERMON_SPIDER_CLOSE_MONITORS = (
7    "store_scraper.monitors.SpiderCloseMonitorSuite",
8)
Copy

2. Define an item schema

Create a JSON schema file at store_scraper/schemas/product_schema.json. This schema describes what a valid item looks like:

1{
2  "$schema": "http://json-schema.org/draft-07/schema",
3  "type": "object",
4  "properties": {
5    "name":  { "type": "string", "minLength": 1 },
6    "price": { "type": "number", "exclusiveMinimum": 0 },
7    "url":   { "type": "string", "pattern": "^https?://" }
8  },
9  "required": ["name", "price", "url"]
10}
Copy

Each field constraint is deliberate: minLength: 1 catches empty strings, exclusiveMinimum: 0 rejects zero-price items, and the URL pattern catches relative paths before they hit your database.

Then wire the schema and validation pipeline into settings:

1# settings.py
2from store_scraper.items import ProductItem
3
4ITEM_PIPELINES = {
5    "spidermon.contrib.scrapy.pipelines.ItemValidationPipeline": 800,
6}
7
8SPIDERMON_VALIDATION_SCHEMAS = {
9    ProductItem: "store_scraper/schemas/product_schema.json",
10}
11
12SPIDERMON_MAX_ITEM_VALIDATION_ERRORS = 50
Copy

Always include SPIDERMON_MAX_ITEM_VALIDATION_ERRORS, without it, Spidermon raises an error if any item fails validation.

3. Write your monitor suite

Create store_scraper/monitors.py:

1from spidermon.contrib.scrapy.monitors import (
2    FieldCoverageMonitor,
3    FinishReasonMonitor,
4    ItemCountMonitor,
5    ItemValidationMonitor,
6)
7from spidermon.core.suites import MonitorSuite
8
9
10class SpiderCloseMonitorSuite(MonitorSuite):
11    monitors = [
12        ItemCountMonitor,
13        FinishReasonMonitor,
14        FieldCoverageMonitor,
15        ItemValidationMonitor,
16    ]
Copy

Back in settings.py, configure the thresholds:

1SPIDERMON_MIN_ITEMS = 100          # ItemCountMonitor threshold
2SPIDERMON_EXPECTED_FINISH_REASONS = ["finished"]
3SPIDERMON_FIELD_COVERAGE_RULES = {
4    "dict/name": 1.0,    # 100% of items must have a name
5    "dict/price": 1.0,
6    "dict/url": 1.0,
7}
Copy

4. Run It

1scrapy crawl products
Copy

After the spider closes, you'll see Spidermon output in the log:

1[Spidermon] PASSED ItemCountMonitor
2[Spidermon] PASSED FinishReasonMonitor
3[Spidermon] FAILED FieldCoverageMonitor
4  - dict/price coverage: 0.72 (required: 1.0)
5[Spidermon] PASSED ItemValidationMonitor
Copy

That FieldCoverageMonitor failure is Spidermon telling you that 28% of your items came back without a price, something that would have been invisible without monitoring.

Faster setup using Claude Spidermon-assistant Skill

claude code

Writing all of the above from scratch means reading docs, finding the correct class names, and wiring everything together manually. The spidermon-assistant Claude skill does it for you — interactively, from your actual project files, with zero placeholders in the output.

Here's the workflow:

  1. Paste a sample item from a successful crawl, and prompt Claude code:
1/spidermon-assistant Here's an item from my spider:
2{"name": "Wireless Keyboard", "price": "49.99", "url": "https://store.example.com/keyboards/wireless"}
3
Copy
  1. Answer a few questions : the skill automatically scans your project name, spider name, whether you’re using scrapy-poet, if so pageObject, item type (plain dict, dataclass, attrs, or Scrapy Item). It will ask for expected item count, and whether you want HTML reports. Answer it and it will set it all up for you.

  2. Get production-ready files : schemas/product_schema.json, monitors.py, and the settings.py additions, all using your actual project names. Nothing to find-and-replace.

The skill notices things you might miss: in the example above, price is a string "49.99" rather than a number. It flags that and adds a comment suggesting you convert it in the spider's item pipeline before validation runs.

Beyond initial setup, the skill has four more workflows you can use any time:

  • Config Advisor : paste your existing settings.py and monitors.py to get a gap analysis
  • Expression Builder : turn plain English rules into expression monitors ("fail if error rate exceeds 1%")
  • Troubleshooter : paste Spidermon log output and get a root-cause diagnosis
  • Schema Generator : generate or update schemas as your items evolve

The skill runs inside Claude code, so it can read your project structure directly and write files for you. For a scrapy-poet project with under 50 items, the full setup cost around $0.60 in API usage.

You can find it here: github.com/apscrapes/claude-spidermon-assistant

Note: This is not an official Zyte tool. Back up your project before running it.

Going further: notifications and reports

Once your monitors are in place, the next natural step is getting notified when they fail — not just in the logs.

Slack alerts are a few lines in settings.py:

1from spidermon.contrib.actions.slack.notifiers import SendSlackMessage
2
3class SpiderCloseMonitorSuite(MonitorSuite):
4    monitors = [...]
5    monitors_failed_actions = [SendSlackMessage]
6
7SPIDERMON_SLACK_SENDER_TOKEN = "xoxb-your-token"
8SPIDERMON_SLACK_SENDER_CHANNEL = "#scraping-alerts"
Copy

Spidermon also supports Telegram, Discord, email via Amazon SES, and Sentry.

HTML reports give you a visual summary of every run, which monitors passed, spider stats, and a breakdown of validation errors by field. Enable them by adding CreateFileReport to your monitor suite's actions (requires jinja2). The skill sets this up automatically if you opt in during the elicitation step.

Where to go from here :

  • Spidermon documentation : complete reference for all monitors, actions, and settings
  • spidermon-assistant skill : the Claude skill used in this post
  • Scrapy documentation : pipelines, item types, stats

In this article

  • How to ensure data quality in your Scrapy web scraping projects using Spidermon and Claude Code
  • What does "good data" actually mean?
  • Introducing Spidermon
  • Setting up spidermon manually
  • 1. Register the extension
  • 2. Define an item schema
  • 3. Write your monitor suite
  • 4. Run It
  • Faster setup using Claude Spidermon-assistant Skill
  • Going further: notifications and reports
  • Where to go from here :

Other lessons

Learn Scrapy

  • Scrapy Tutorial Part 1: First Spider
  • Scrapy Tutorial Part 2: Page Objects
  • Scrapy Tutorial Part 3: Web Scraping CoPilot

What is web scraping?

  • What Is Web Scraping?
  • What are the elements of a web scraping project?
  • Python Web Scaping Tools & Libraries
  • How to architect a web scraping solution: The step-by-step guide
  • Web crawling vs web scraping
  • Is Web & Data Scraping Legally Allowed?
  • Compliant Web Scraping Checklist
  • Best practices for web scraping
  • A Guide to Web Scraping With Java
  • Transition from Zenrows to Zyte API
  • Guide to Web Scraping APIs
  • Screen Scraping Explained
  • Large Scale Web Scraping with Python
  • Large Scale Web Scraping with Python
  • Building a Web Crawler in Python
  • A Practical Guide to XML Parsing with Python
  • Learn How to Scrape a Website
  • Advanced Use Cases for Session Management
  • Golang Web Scraping in 2025
  • Web Scraping Dynamic Websites With Zyte API
  • What is Data Parsing in Web Scraping?
  • Scrape Web Pages and Files Using Python, wget, and Zyte

Web Scraping How-to Videos

  • Web scraping videos

SERP Data Collection at Scale

  • SERP data collection at scale and why efficiency matters
  • Why Page One SERP data is no longer enough
  • Why pagination logic becomes operational debt
  • Why SERP data costs exploded

What is web scraping used for?

  • What is web scraping used for?
  • Pricing Intelligence Web Scraping
  • Web Scraping For Market Research
  • Use web scraping to build a data-driven product
  • Use web scraping for alternative data for finance
  • Use web scraping for brand monitoring
  • Use web scraping to automate MAP compliance
  • Web Scraping For Lead Generation
  • Web Scraping For Recruitment
  • Use web scraping for business automation
  • Using Data Extraction Tools for Efficient Website Scraping
  • Why Might a Business Use Web Scraping to Collect Data?
  • How to Scrape Images from Any Website: A Complete Guide
  • How to Scrape Search Engine Results

The New Guide to Web Scraping at Scale

  • Introduction
  • 1. A plan is a pathway to success
  • 2. Get serious about legal compliance
  • 3. The quality of your web data is of utmost importance
  • 4. Scaling and maintaining crawling and extracting solutions
  • 5. Adding AI to the web scraping stack
  • 6. The In-house vs outsourced question
  • 7. Questions to ask when scaling web scraping

Essential Web Scraping Techniques

  • TLS Fingerprint and how it blocks requests
  • How to scrape with a browser effectively
  • API First data extraction

More learn articles

Keep learning

All learn articles →
What are residential proxies bannerUse case

What is a residential proxy?

Learn what residential proxies are, how they compare to datacenter proxies, and why modern web scraping needs more than IP diversity.

10 min read

Zyte Case Studies — every customer story, in one placeUse case

How much do rotating proxies cost?

Learn how much rotating proxies cost, what affects pricing, and why total web scraping costs often go beyond proxy subscriptions.

10 min read

Zyte Case Studies — every customer story, in one placeUse case

How do rotating proxies work?

Learn how rotating proxies work, when to use them for web scraping, and why IP rotation alone is not enough for reliable data access.

10 min read

Services

Zyte Data

Coding tools & hacks straight to your inbox. Bi-weekly dosage of all things code.

Explore Zyte Data

Web Scraping API

Zyte API

Coding tools & hacks straight to your inbox. Bi-weekly dosage of all things code.

Sign Up

Developers

Zyte Developers

Coding tools & hacks straight to your inbox. Bi-weekly dosage of all things code.

Join Us
    • Zyte API
    • Ban Handling
    • AI Extraction
    • SERP
    • Enterprise
    • Scrapy Cloud
    • Agentic Web Data
    • Pricing
    • Product & E-commerce
    • Data for AI
    • Job Posting
    • Real Estate
    • News & Articles
    • Search
    • Social Media
    • Blog
    • Learn
    • Case Studies
    • Webinars
    • White Papers
    • Join our community
    • Documentation
    • Meet Zyte
    • Contact us
    • Jobs
    • Support
    • Terms and Policies
    • Trust Center
    • Do not sell
    • Cookie settings
    • Web Data Compliance
    • Open Source
    • What is Web Scraping
    • Web Scraping in Python: Ultimate Guide
    • Stop getting blocked, start scraping
  • EWDCI logoMost loved workplace certificateZyte rewardISO 27001 iconG2 rewardG2 rewardG2 reward
    XFacebookInstagramYouTubeLinkedInDiscord

    © Zyte Group Limited 2026