Brief & Hire
Acceptance and handover

How to check scraped data before you accept it

The short answer

A scraped file almost always looks right when it arrives. It has the columns you asked for, the row count is in the right range, and the first rows you glance at match the site. The problems are elsewhere: a second results page that was never visited, rows loaded twice, a price that lost its decimals, a blank cell that could mean “no value” or “the scraper failed”.

So before final payment, run eight checks. Two of them catch most bad deliveries: the count against the source and twenty random rows against the source. The other six take a few minutes each. All of them fit in a spreadsheet; none needs code.

The data scraping job page lists the acceptance lines in short form. This guide is the long version: what each check is for, how to run it and what a failure looks like.

Why scraped data looks right and isn’t

A scraper is a small program reading a source you do not control. It does exactly what it was told, and the source does not always behave the way anybody assumed. Nothing crashes, so nothing warns you.

I learned this on my own data. A collector of mine read reviews from a set of marketplace pages by clicking each page’s “show more” button. It ran without a single error. The page sometimes handed back reviews it had already shown, and the collector kept both copies. Across the 11 automation gigs I had collected, 437 reviews became 317 once duplicates were removed (the full incident). The row count had looked plausible, and nothing in the run itself flagged it.

A second one, smaller: a check of mine reported that a queue held zero items when it held one. It read a tool’s text output, and when the text encoding did not match what it expected, the pattern it searched for silently failed to match. No error, just a wrong zero. It now reads the queue’s own data file instead of the text output. In scraped data the same thing shows up as names with accents or non-English characters turning into garbage, or a field that comes back empty only for those rows.

Both have the same lesson: test the data against the world, not against the job’s own report.

The eight checks

For a recurring scraper add a ninth: the first scheduled run happened on its own, and the output landed where it should. A recurring job that silently produces an empty file is worse than none, because you keep trusting it.

How to run the twenty-row check in half an hour

The random sample is the check people skip, because it is the slowest. It does not have to be.

Step In a spreadsheet
1. Add a random column A new column with =RAND() in every row
2. Freeze it Copy the column and paste as values, so it stops changing
3. Sort Sort the whole sheet by that column
4. Take twenty The first twenty rows are your sample
5. Compare Open each row’s source link and compare field by field. Mark each row OK or not
6. Record Note the row, the field and what the source showed for every mismatch

This works only if every row has a link back to its source. That is why the source URL, or the file name, belongs in the brief as a column. Without it, checking is guesswork.

Errors in scraped data cluster. If you find one wrong price, look at the other prices from the same page or the same layout. One mismatch in twenty is often a pattern, not an accident.

What a failure looks like, and what to send

What you see What it usually means
Far more rows than the source shows Rows loaded twice, or several filters returned the same items
Far fewer rows Pages, filters or a “load more” step were missed
One field shifted by a column in some rows A second page layout the scraper did not expect
Prices or dates wrong only in some rows A different format on some pages, read with one rule
Blanks clustered in one column A field the scraper cannot find on part of the site
Broken characters A text encoding mismatch somewhere between the page and your file

When something fails, send the seller the exact rows, the field, the source link and what the source shows. That turns “the data is wrong” into a fix someone can make in an hour. Data that does not match the brief is a fix under the order; a new field or a new site is a change, as explained in asking for changes after delivery.

Put the checks in the brief, not in the argument afterwards

A seller can pass all eight checks, but only if they know about them before quoting. Add this to the scraping brief:

Acceptance. Final payment after: the row count is close to the count the source shows; you tell me how many duplicates you removed and by what rule; 20 random rows match the source field by field; missing values are marked as [N/A]; dates are [YYYY-MM-DD] and numbers are numbers. Each row includes its source URL. I receive the script and a README and can run it without you.

That line changes the quote, and it should. A seller who checks counts and duplicates before delivering does more work than one who does not. If the job is large, put the first site or the first hundred rows in a separate milestone and run the checks there, as in fixed price or milestones.

If your source is PDFs or scans rather than websites, the same checks apply, with the file name as the source link. Document-focused sellers such as Pradeep kumar work from files, so ask for the file name and page number in each row.

Where it goes wrong anyway

  • The site changes after acceptance. A new layout breaks a recurring scraper, often without an error: it keeps running and returns blanks. Agree a fix rate before that happens, as in putting maintenance in the contract.
  • The scraper is slowed or blocked. Sites limit how fast pages can be requested. A seller who slows the scraper down is usually doing the right thing; what a rate limit is explains why.
  • The terms change. What a site allows can change too. The basics page on robots.txt and scraping terms covers what to ask before collection starts.

Wrap-up

A scraped file earns its price when you can rely on it without opening the site. Get there by comparing it with the site once: the count, the duplicates, twenty random rows and the last page. It takes under an hour, and it is far cheaper than finding the problem after the numbers have gone into a decision.

Questions people ask

How do I know if scraped data is complete?

Compare the row count with a number the source shows itself, such as the results count on a search page or the number of files in a folder, and open the last page of results to check it was visited. A count far above the source usually means duplicates; far below usually means pages or filters were missed.

How many rows should I check by hand?

Twenty rows picked at random, each compared field by field with the original page or document. Errors in scraped data tend to repeat, so a repeated problem usually shows up in a random twenty. Pick them at random, not from the top of the file.

What should I do if the scraped data has errors?

Send the freelancer the exact rows and the field that is wrong, with the source link for each. Data that does not match what the brief asked for is a fix, not new work. A new field or a new site is a change and is usually a new order.