A scraper can complete without errors and still produce incomplete, inconsistent, or misleading data. This reusable web scraping data quality checklist shows how to validate fields, dates, currencies, links, duplicates, missing records, and export files before the data reaches analysis, publishing, or a client workflow.
Overview
Scraped data quality is not a single pass or a simple check that a CSV file exists. It is the process of proving that the output contains the records you expected, that each field follows an agreed format, and that unusual values are visible rather than silently discarded.
Before running a crawler, define a small schema for every important field. Record the field name, expected type, whether it is required, acceptable empty values, normalization rule, and validation test. For example:
| Field | Expected value | Validation rule |
|---|---|---|
| product_id | String or integer identifier | Required; unique within the source |
| title | Trimmed text | Required; reject empty or placeholder text |
| price | Decimal number | Parse currency separately from numeric value |
| published_at | Normalized date or timestamp | Use one documented timezone and format |
| source_url | Absolute URL | Validate scheme, host, and canonicalization rules |
Keep the raw value alongside the cleaned value when practical. A field such as price_raw can preserve the source text while price_value stores the parsed number. This makes unexpected transformations easier to investigate and supports a repeatable audit trail.
Validation should happen at three levels: record-level checks, field-level checks, and dataset-level checks. Record checks ask whether one item is structurally usable. Field checks examine types and formats. Dataset checks look for missing pages, duplicate records, abnormal volumes, and changes from earlier runs.
Checklist by scenario
Before the first crawl
- List the fields the workflow actually needs instead of collecting every available element.
- Define required, optional, and conditionally required fields.
- Choose stable identifiers, such as a source ID or normalized URL, for duplicate detection.
- Document how whitespace, HTML entities, line breaks, and embedded markup will be cleaned.
- Decide how pagination, filters, redirects, blocked responses, and empty result pages will be recorded.
- Save crawl metadata such as run time, source URL, response status, and parser version.
If the project involves access controls or a login flow, include those assumptions in the test plan. The web scraping authentication guide covers cookies, sessions, and CSRF-related workflow considerations.
After a small test run
- Inspect several successful records, not only the first result.
- Include records with long titles, missing images, unusual punctuation, multiple prices, and optional sections.
- Compare the number of discovered URLs with the number of fetched pages and parsed records.
- Check whether selectors captured navigation, advertisements, footers, or repeated template text.
- Review raw and normalized values side by side.
A small sample should deliberately include edge cases. A parser that works on a clean example may fail when a page uses a different date label, omits a field, or returns a list instead of a single value.
Before export
- Confirm that every required field has passed its validation rule.
- Count null, empty-string, and placeholder values separately.
- Check that delimiters, quotes, newlines, and character encoding are safe for the selected format.
- Verify that JSON is valid and that CSV rows have the expected number of columns.
- Compare the final record count with the crawl summary and explain every difference.
- Store a rejected-record report instead of silently dropping invalid rows.
Choose the export format according to how the data will be used. The guide to CSV, JSON, or Parquet for scraped data provides a framework for making that decision.
For a scheduled or recurring crawl
- Compare the current row count with a baseline and flag large unexplained changes.
- Track fields that suddenly become empty across many records.
- Detect a rise in HTTP errors, redirects, challenge pages, or parser exceptions.
- Compare a sample of current records with the previous run.
- Keep historical output when changes need to be traced or rolled back.
For a broader operational test, use the web scraper testing checklist alongside these data-quality checks.
What to double-check
Dates and times
Do not compare date strings before normalizing them. A source may provide a full timestamp, a date without a time, or relative text such as “yesterday.” Store the original text, parse it into a consistent machine-readable value, and document how missing timezones are handled. If a date cannot be parsed confidently, mark it for review rather than assigning an arbitrary date.
Currency and numeric fields
Separate the numeric amount from the currency code. Symbols alone may be ambiguous, and thousands separators vary by locale. Preserve whether a value was shown as a range, discount, tax-inclusive amount, or unavailable price. Reject values that contain unexpected words or units unless the parser explicitly supports them.
Links and HTTP status
Validate that extracted links are absolute or can be resolved against the source page. Normalize obvious differences such as fragments or trailing slashes only when that rule is appropriate for the site. A syntactically valid URL is not proof that the destination is available. For link checks, record the requested URL, final URL after redirects, status category, and error type. Treat temporary failures differently from confirmed missing pages, and avoid turning every non-success response into a deletion decision.
Missing values
| Situation | Recommended handling |
|---|---|
| Field is optional and absent | Use a documented null representation. |
| Required field is absent | Reject or quarantine the record and log the source page. |
| Page failed to load | Record the failure separately; do not treat it as an empty page. |
| Source explicitly says unavailable | Preserve that state rather than converting it to zero or false. |
| Parser returned an empty string unexpectedly | Flag the selector or page template for investigation. |
Duplicates and near-duplicates
Exact duplicate detection can use a stable source identifier or a normalized key made from fields such as URL and title. Also look for near-duplicates caused by tracking parameters, pagination, regional versions, or repeated content. For text-heavy collections, a text similarity checker can help identify records that are not identical but should be reviewed together.
Text and encoding
Inspect apostrophes, non-Latin characters, emoji, non-breaking spaces, and escaped HTML. Confirm that your export and downstream database use compatible encoding. Use a regex tester when a pattern is responsible for extracting or validating structured text, but test it against real edge cases rather than one ideal example. The regex tester guide explains a practical test approach.
Common mistakes
- Counting HTTP responses as records. A successful response may contain an error template, login page, or empty result. Validate page content as well as status.
- Replacing every missing value with zero. Zero, unknown, not applicable, and not collected are different meanings.
- Cleaning before preserving raw data. Aggressive normalization can remove clues needed to debug a parser.
- Using one selector for every page type. Listing pages, detail pages, archived pages, and error pages may have different structures.
- Ignoring volume changes. A valid-looking export with a fraction of the expected rows deserves investigation.
- Accepting plausible but incorrect values. A malformed date or shifted column can look reasonable while corrupting analysis.
- Checking only the final file. Without crawl logs, rejected rows, and source references, diagnosing a later problem becomes difficult.
For workflows that turn scraped pages into published content, continue the process with the SEO data cleaning and publishing workflow. Data validation should happen before editorial decisions, not after incorrect values have spread into titles, summaries, or metadata.
When to revisit
Revisit this checklist before every new crawler, major selector change, scheduled export, and client or team handoff. It is especially useful before seasonal planning cycles, when page templates and product availability may change, and whenever the workflow moves to a new browser automation library, parser, database, or export format.
Set a practical review trigger for each pipeline. Examples include a sudden row-count change, a new concentration of null values, a rise in redirects or failed requests, a change in date or currency formatting, or a downstream report that no longer reconciles with the source. Review the schema whenever a new field is added or an old field changes meaning.
To apply the checklist now, create a validation report with these columns: run_id, source_url, record_id, field, raw_value, normalized_value, status, and reason. Run it against a representative sample, then against the full export. Keep the accepted output, rejected rows, crawl summary, and schema version together. That small discipline turns a one-time scrape into a workflow you can test, explain, and safely revisit when the inputs change.