Your scraper run says SUCCEEDED. The dataset has 3 items instead of 3,000, or every price field is empty, or the results are a cookie-consent page. Nothing alerted you, because the run status only says the process finished.
Here are three ways to catch this, cheapest first.
1. Use Apify's free monitoring first
Each Actor or task has a Monitoring tab. You can set alerts on result-count thresholds and run status. Alerts on dataset field statistics need a dataset schema. Apify also provides a free Monitoring Actor suite for validating content and checking duplicates, and its docs state the monitoring system is free for all users.
Where fixed thresholds struggle:
- the item count varies a lot from run to run
- you run Store Actors that have no dataset schema
- you monitor many Actors and can't tune each threshold
2. Compare each run to its own history
If a fixed threshold doesn't fit, compare the latest run with the median of recent successful runs, and check that the fields you rely on aren't empty in too many sampled items.
The guide on GitHub has a small Node.js script that does this with three API calls (list runs, get dataset metadata, fetch the first 200 items). It exits with 1 for unhealthy data and 2 when the checker itself is broken, so a scheduler can tell the two apart. Use a read-only token stored as a secret.
Caveats, as stated in the guide:
- the median needs at least three finished successful runs
- check tasks separately
- only the first 200 items are sampled
- these are heuristics, not proof
I'm not pasting the script here. I haven't re-run it for this post, so read it and its tests in the repo before relying on it.
3. A ready-made Actor
There are third-party Actors with similar checks, such as Output Completeness Monitor and Dataset Drift Monitor. I built one too, Scraper Output Guard. It adds schema drift, duplicate detection and item-limit checks, at $0.005 per Actor checked.
Takeaway
Turn on the free monitoring first. If counts vary or you run many Actors, compare each run to its own history and check the fields you depend on. Alert on content, not just status.
Full guide with the script: https://github.com/lineagersiui-boop/apify-output-checks/tree/main/guides/silent-scraper-failures
Disclosure: I built the Apify Actor mentioned here and earn its pay-per-event fees. I'm not affiliated with Apify beyond publishing on the Apify Store. This post was drafted with AI assistance under my direction. It first appeared as a guide on GitHub (canonical link above).
Top comments (0)