Six Validation Layers Every Scraped Dataset Needs Before It Reaches Your Warehouse or Customers
Scraped data quality checks tend to get written the week after something goes wrong. A price lands in the warehouse as 1299 instead of 12.99, a customer spots it before you do, and someone adds a rule so that exact thing can't happen again. Do that for two years and you have forty rules and no system. This is the system: six layers, in the order a row meets them, with what each one catches, what it misses, and the thresholds we start from.
In this article
The short version
- Run six layers in order: fetch, schema, rules, completeness, drift, ground truth. The first three judge a row. The last three judge the whole run.
- Most teams have layers 1 and 2. Those catch two of the eight failures that commonly reach customers.
- A dataset can pass every row-level check and still be wrong. Only drift and ground-truth checks catch values that are valid and false.
- Failing rows go to quarantine, not the bin. A failed run blocks the delivery; it doesn't quietly ship a smaller file.
- Every delivery should carry a one-page quality report. If you buy data, ask to see one before you sign.
Where a bad row gets caught decides what it costs
Scraped data quality checks all do the same job at different distances from the customer. Take one bad row, a price that lost its decimal point, and ask where it stops.
The blast radius of one bad row
The further out it travels, the more people touch it and the longer it takes to find.
Here's the part that makes scraping different from other pipelines: three of the four ways a scraper breaks still return HTTP 200. The job finishes, the row count looks normal, and the status page stays green. We went through those failure modes in why web scrapers break. The upshot for QA is that "did the job succeed?" tells you almost nothing. You have to check the data.
A web data quality framework in six layers
A web data quality framework only works if the layers run in a fixed order, because each one assumes the one before it passed. There's no point checking a price range on a page that was really a CAPTCHA.
The six layers, in the order a row meets them
Top three judge one row at a time. Bottom three judge the run as a whole.
Web scraping data validation, layers 1 to 3: is this row real?
Web scraping data validation starts before parsing. The first three layers look at one response or one row at a time, they're cheap, and they should run on everything.
Layer 1 · Fetch: did we get the real page?
Protected sites often answer a blocked request with a 200 and a challenge page. Parse that and you get a row of nulls, or worse, a row of text from the challenge. So check the response before you trust it: known block markers, a page size inside the normal band for that template, and at least one element that only exists on a real page, such as the product title container. Misses: anything wrong on a page that loaded correctly.
Layer 2 · Schema: are the fields the right shape?
Required fields present, types correct, formats parseable. A price is a number. A date is a date. A URL starts with https. This is the layer everyone has, usually as a JSON schema or a typed model. Misses: values that are the right type and still nonsense. "1299" is a perfectly good number.
Layer 3 · Rules: is this value possible?
Now apply what you know about the business. Price above zero and inside a band for the category. Sale price not above list price. Currency in the list you expect for that site. Rating between 0 and 5. Stock status one of four known values. Cross-field rules earn their keep here, because parsers tend to break one field at a time. Misses: a value that's plausible and wrong, like the price of a different variant.
"sku": "TRK-88213","title": "Trail Runner 4 — Men's","price": 1299,L3Outside the $20–$400 band for footwear. The page says 129.90: the decimal point was lost."list_price": 149.00,L3Price is above list price, so a cross-field rule catches it too."currency": "EUR",L5Valid code, but this source was 100% USD yesterday."rating": null,L4Allowed to be null, but 88% of today's rows are. Fill rate collapsed."in_stock": true,"scraped_at": "2026-11-21T06:02Z"L5Three days old. The site is serving a cached page.Layers 4 to 6: is this run true?
Data quality assurance for web data gets harder at this point, because the next three layers can't be answered by looking at a row. They need the whole run, the last month of runs, and the live site.
Layer 4 · Completeness: is all of it here?
Count the rows and compare with the baseline for that source. Then count by category, because losing one category out of twenty moves the total by 5% and hides inside normal variation. Check the fill rate of every field, and check duplicates by primary key. Misses: a complete, well-filled dataset of wrong values.
Field fill rate, last 14 runs
One source. Each square is one field on one day. The total row count never moved.
Layer 5 · Drift: does today look like the last month?
This is the layer that catches the failures people remember. A site switches currency for your IP range. A tax-inclusive price replaces a tax-exclusive one. Every row is valid, every field is filled, and the mean price moved 14% overnight. Compare today's distribution for each numeric field with a trailing window, and watch category mix and the share of pages whose content hasn't changed. Misses: a slow error that was there from day one, so the baseline is wrong too.
Same source, same SKUs, one day apart
Distribution of the price field. Nothing failed a row-level check.
Layer 6 · Ground truth: does it match the site?
The last layer is the only one that looks outside the pipeline. Keep a small set of reference records per source, pages whose correct values a person has confirmed, and check them on every run. Add a manual sample: a few dozen rows a week compared with the live page by a human. It's slow and it doesn't scale, which is why it comes last and stays small. It's also the only thing that catches a parser reading the wrong element perfectly consistently. Misses: whatever isn't in the sample, so rotate it.
Scraped data quality checks: starter thresholds
Scraped data quality checks need a number and a consequence, or they become a dashboard nobody reads. These are the thresholds we start a new source on. Tune them after two weeks of baselines; a marketplace and a government registry don't behave alike.
| Layer | Check | Starting threshold | On failure |
|---|---|---|---|
| 1 · Fetch | Blocked or challenged responses | > 2% of fetches | Retry, then block the run |
| 2 · Schema | Rows failing type or format | > 1% of rows | Quarantine rows; block above 5% |
| 3 · Rules | Rows outside range or breaking a cross-field rule | > 1% of rows | Quarantine rows |
| 4 · Completeness | Row count against baseline | ±15% of 30-day median | Block the run |
| 4 · Completeness | Coverage of expected records | < 97% | Block the run |
| 4 · Completeness | Fill rate of any field | −5 points day on day | Flag; block if a key field |
| 4 · Completeness | Duplicates by primary key | > 0.5% | Dedupe and flag |
| 5 · Drift | Mean of a numeric field against baseline | > 3σ | Block until a person looks |
| 5 · Drift | Pages with unchanged content | 48 hours | Flag as stale |
| 6 · Ground truth | Reference records | any mismatch | Block the run |
Two notes on that table. "Block" means the delivery doesn't go out until someone decides, which is uncomfortable the first time and correct every time. And the thresholds are per source. A single global threshold is either too loose for your steady sources or too noisy for your erratic ones.
Quarantine and the release gate
Web scraping data validation fails quietly when its only outcomes are "pass" and "drop". Dropped rows vanish, the file gets a little smaller, and nobody asks why. Give every check one of three outcomes instead.
- Quarantine the row. It's held back with the reason attached. You can inspect it, fix the parser and replay it.
- Flag the run. The delivery goes out, marked, with the flag in the report.
- Block the run. Nothing goes out. Yesterday's data stays current until a person releases or repairs.
Then write the result down. Every delivery should leave with a short report that says what ran, what passed, what was held back and why. This is the screen we'd want to see as a buyer.
Fields fill · drift vs 30 days
| Field | Fill | Drift | Status |
|---|---|---|---|
| price | 99.8% | 0.4σ | ok |
| currency | 100% | — | ok |
| in_stock | 99.1% | 1.2σ | ok |
| rating | 91.4% | 0.3σ | flag |
| category | 100% | — | ok |
This run
Check the arithmetic on any report like this: collected, minus quarantined, minus duplicates, should equal released. Here 10,214 − 61 − 18 = 10,135. If the numbers don't close, rows are going somewhere the report doesn't mention.
What would leak through your checks?
Switch on the layers you run today. The panel shows which of eight common failures your scraped data quality checks would stop, and which would reach your warehouse or customers.
Building a web data quality framework: where to start
A web data quality framework doesn't have to arrive all at once. If you have nothing beyond a schema check, build in this order, which is by value for effort and not by layer number.
- Layer 4, row counts and fill rates. A day of work, and it catches the largest class of silent failure.
- Layer 1, block detection. Stops you parsing challenge pages, which pollutes everything after it.
- Layer 3, a dozen rules on your key fields. Start with price, currency and the primary key.
- Layer 5, drift on two or three numeric fields. You need about two weeks of history first.
- Layer 6, ten reference records per source. Tedious to set up, and nothing else finds what it finds.
Budget for the upkeep. Every site change means the baselines, rules and reference records for that source need another look, and that's a good share of why an in-house scraping engineer spends about 40% of the year on maintenance. If you're buying the data instead, these six layers are what the quality clause in a web data SLA should be measuring, and a four-week pilot is where you find out whether the vendor really runs them.
How DataDwip runs data quality assurance for web data
Data quality assurance for web data is a named role on our dedicated data acquisition teams: three engineers, a delivery manager and a QA lead whose job is the six layers above.
- Every delivery is validated before it leaves and arrives with a quality report.
- The numbers are in the SLA: at least 99% of records passing validation, duplicates under 0.5%, and at least 97% coverage per source per run.
- Breakages are detected within 4 hours and fixed within 24 business hours, and you get a weekly source-health digest.
- You can test it first. A four-week pilot is scored against those same numbers, and the code and data are yours either way.
For a one-off dataset you don't need a standing team. Our web scraping services include validation on delivery; ask what was checked and you'll get the list.
Frequently asked questions
What are scraped data quality checks?
They're automated tests run on scraped data before it is delivered: that the page fetched was real, that fields have the right type, that values are possible, that the dataset is complete, that today resembles recent history, and that a sample matches the live site.
How do you validate web scraping data?
In layers. First check each response and row: fetch, schema, business rules. Then check the run: completeness, drift against a trailing baseline, and ground truth against reference records. Failing rows are quarantined with a reason, and a failing run blocks the delivery.
Why isn't schema validation enough for scraped data?
Because most scraping failures produce valid-looking data. A lost decimal point, a changed currency, a missing category and a stale cached page all pass a schema check. Of eight common failures, schema plus fetch checks catch two.
What is data drift in web scraping?
It's when the distribution of a field changes without any row breaking a rule, for example prices switching to tax-inclusive. You detect it by comparing today's mean, spread or category mix with the previous thirty days and alerting on a large move, such as three standard deviations.
What accuracy should scraped data have?
Vendors typically commit to 95% to 99% of records passing validation. At 10,000 records a day, 99% still means 100 failing rows daily, so ask what happens to those rows and whether the figure is measured per field, per record or per delivery.
What should a data quality report include?
The result of each validation layer, rows collected, quarantined, deduplicated and released, coverage against expected records, fill rate and drift for key fields, and any flags. The counts should add up: collected minus quarantined minus duplicates equals released.
Related reading
- Thresholds are DataDwip's starting values for a new source and match the nine checks in our scraper-reliability guide.
- "Three to five days" to find a field-level failure is from PromptCloud's published guidance on scraped-data failures.
- The 95% to 99% range for vendor quality commitments is from DataHen's guide to enterprise scraping SLAs.
- The sample row, heatmap, drift chart and quality report are illustrative.