VOOZH about

URL: https://apify.com/vittuhy/dataset-result-gate

⇱ Dataset Result Gate Β· Apify


Pricing

Pay per usage

Go to Apify Store

Dataset Result Gate

Conditional pipeline gate. Fails if the previous actor's dataset is empty, succeeds if it has results β€” stopping unnecessary downstream runs before they start.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

πŸ‘ VΓ­t TuhΓ½

VΓ­t TuhΓ½

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 months ago

Last modified

Share

Stop downstream actors from running when there's nothing to process. This actor checks whether the previous actor's output dataset contains any results and either passes or blocks the pipeline accordingly β€” with zero extra cost per execution.


Example use case: monitor a social media profile and only scrape if there's a new post

Say you run a daily job that checks a competitor's Instagram for new posts. If they posted something, you want to enrich it β€” pull comments, run sentiment analysis, store it. If not, you want nothing to happen.

Without a gate, your enrichment actors would run every day regardless, wasting compute and money.

With Dataset Result Gate:

Instagram Profile Scraper (daily schedule)
└─ on SUCCESS β†’ Dataset Result Gate
β”œβ”€ 0 new posts β†’ STOP. Nothing else runs.
└─ 1+ new posts β†’ Comment Scraper starts β†’ Sentiment Actor starts β†’ ...

This pattern works for any scenario where a scraper may return empty results:

  • Price monitoring β€” only notify if prices changed
  • News scraping β€” only process if new articles appeared
  • Lead generation β€” only enrich if new profiles were found
  • Job listing monitoring β€” only alert if new positions are posted

How it works

  1. Receives the output dataset ID from the previous actor run
  2. Checks the clean item count (actual results, excluding error records)
  3. 0 clean items β†’ run ends as FAILED β†’ downstream integrations don't fire
  4. 1+ clean items β†’ run ends as SUCCEEDED β†’ downstream integrations fire normally

The actor uses cleanItemCount β€” the same number shown in the "Clean" column in Apify Console β€” so what you see in the UI matches what the gate acts on.


Setup

You need two integrations in Apify Console. No code changes required.

Step 1 β€” Connect your source actor to the gate

  1. Open your source actor (e.g. Instagram Profile Scraper) in Console
  2. Go to the Integrations tab
  3. Add integration:
    • Trigger: Actor run succeeded
    • Action: Start actor β†’ select Dataset Result Gate
  4. In the input configuration, add:
{
"datasetId":"{{resource.defaultDatasetId}}"
}

{{resource.defaultDatasetId}} is an Apify template variable β€” it's automatically replaced with the source actor's output dataset ID at runtime. You don't need to fill it manually.

Step 2 β€” Connect the gate to your target actor

  1. Open Dataset Result Gate in Console
  2. Go to the Integrations tab
  3. Add integration:
    • Trigger: Actor run succeeded
    • Action: Start actor β†’ select your target actor
  4. Configure the target actor's input as needed

That's it. The gate handles the conditional logic.


Input

FieldTypeRequiredDescription
datasetIdStringYesID of the dataset to check. Pass {{resource.defaultDatasetId}} when using via Apify Console integration.

Why not use n8n (or Zapier, Make) for this?

You can build conditional logic in n8n or Make β€” but every execution counts against your task/operation quota. If your scraper runs 10Γ— a day and you're checking results each time, that's 300 operations a month just for the gate logic, before any actual work happens.

Dataset Result Gate runs entirely on Apify, billed only by compute time (which for a dataset metadata check is a few seconds at most). If you're already running actors on Apify, keeping the conditional logic inside the platform is simpler and cheaper than routing through an external automation tool.


Notes

  • The actor checks cleanItemCount, not the total item count. If your source actor produces error records alongside real results, those won't inflate the count.
  • The actor has no output of its own β€” it exists purely to pass or block the pipeline.
  • Works with any source actor, not just scrapers. Any actor that writes to a dataset can be gated.

You might also like

Apify Dataset QA Gate

zentrafoundry/apify-dataset-quality-auditor

Score Apify datasets and emit actionable quality issues before downstream use.

Gate.io Market Data Scraper - 2,200+ Crypto Pairs

logiover/gateio-market-scraper

Gate.io ticker scraper with no API key. Export live prices for 2,200+ spot pairs to CSV/JSON. A Gate.io API alternative for crypto data.

Scraper Results Checker

drobnikj/check-crawler-results

This actor checks results from Apify's scrapers or any other actor that stores its result to a dataset, and sends a notification if there are errors. It's designed to run from webhook.

πŸ‘ User avatar

Jakub DrobnΓ­k

19

Dataset Quality Gate - Schema & Data QA

jy-labs/dataset-quality-gate

Validate Apify Datasets by pasted items, Dataset ID, or Run ID before delivery, automation, or AI/RAG ingestion. Catch schema drift, missing fields, duplicates, and bad URLs/emails/dates.

Prompt Injection Dataset Scanner

zentrafoundry/zentra-prompt-injection-quarantine

Scan and sanitize dataset records before they enter LLM, RAG, or agent pipelines.

Gate.io Crypto Tickers Scraper

parseforge/gate-io-tickers-scraper

Scrape Gate.io spot tickers including last price, base/quote volume, 24h high/low, bid/ask for 2500+ pairs. Long-tail altcoin specialist. No API key required.

Instagram Complete Profile Scraper PPR

devil_port369-owner/instagram-complete-profile-scraper-ppr

Scrape Instagram profile details. Email and Phone also available if mentioned in bio profile and post caption or if it is a public account.

625

2.8

Validate Dataset(s) with JSON Schema

jaroslavhejlek/validate-dataset-with-json-schema

This Actor validates items in one or more datasets against a provided JSON Schema. Use it if you planning to add a dataset validation schema to your actor and you want test it.

πŸ‘ User avatar

Jaroslav Hejlek

5

Related articles

Dataset processing on Apify
Read more
Build your own ad monitoring tool with Apify in a day
Read more
Your Apify Actor's input schema is its UI. Here's how I design mine after 20+ Actors.
Read more