RunGate — Cost Forecast & Budget Guard for Apify Tasks
Pricing
from $50.00 / 1,000 guarded task runs
RunGate — Cost Forecast & Budget Guard for Apify Tasks
Forecast Task cost and duration before execution, return ALLOW/WARN/BLOCK, and start approved runs with native Apify charge and timeout caps.
Pricing
from $50.00 / 1,000 guarded task runs
Rating
0.0
(0)
Developer
Demir
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 months ago
Last modified
Categories
Share
RunGate is a preflight safety gate for saved Apify Tasks.
It reads recent Task runs, estimates the next run's cost and duration, checks the monthly budget, and returns one decision:
- ALLOW — the Task is within policy.
- WARN — history is weak or the Task configuration changed.
- BLOCK — the predicted cost, duration, or monthly budget is outside policy.
When a run is approved, RunGate starts the saved Task without replacing its input and applies Apify's native maxTotalChargeUsd and timeout caps.
Unofficial community Actor. RunGate is not affiliated with, endorsed by, or maintained by Apify.
Why use RunGate?
A schedule normally starts a scraper immediately:
Schedule → Target Task → Cost
With RunGate:
Schedule → RunGate → ALLOW / WARN / BLOCK → Target Task with native caps
The target Task's URLs, proxy configuration, page limits, and other saved input remain inside the Task. RunGate only needs the Task ID, a scoped token, and the safety policy.
Five-minute setup
- Save the scraper configuration as an Apify Task.
- Open RunGate and paste the Task ID plus a scoped Apify token.
- Keep Monitor only for the first run and review the decision.
- Save the RunGate input as a Task, switch to Automatic guard, and move the schedule to the RunGate Task.
Input
| Field | Purpose |
|---|---|
| Target Task ID | The saved Task protected by RunGate |
| Scoped Apify API token | Reads and starts only the permitted Task |
| Monthly Task budget | Monthly policy limit in USD |
| Maximum cost per run | Forecast threshold and native Apify charge cap |
| Maximum run duration | Forecast threshold and native timeout |
| Risk tolerance | Controls how weak history and Task changes are handled |
Example result
{"status": "ok","decision": "BLOCK","reasonCodes": ["PREDICTED_RUN_COST_EXCEEDS_LIMIT"],"recommendedAction": "The target Task will not start. Increase the relevant limit only after reviewing the cost or duration risk.","predictedCostUsd": 6.42,"costUpperUsd": 8.11,"monthlySpendForecastUsd": 142.8,"targetRunStarted": false}
Forecasting method
V1 uses robust, explainable statistics:
- median
- recent weighted average
- median absolute deviation
- 10th and 90th percentiles
- current-month spend projection
TimesFM is intentionally not included in V1. It adds infrastructure cost before enough run history exists to justify it.
Pay-per-event configuration
Create these exact events in Publication → Monetization:
| Event name | Suggested initial price | Trigger |
|---|---|---|
cost-analysis | $0.03 | Analysis completed without starting the target Task |
guarded-run | $0.05 | An approved target Task was started with native caps |
RunGate calls only one custom event per run.
Security
- The API token is marked
isSecret: trueand encrypted by Apify. - The token is never logged, stored, hashed, or returned.
- Sensitive keys are redacted before the Task configuration fingerprint is created.
- RunGate does not read the target Task's dataset output.
- The target Task starts with a native cost cap and timeout.
See SECURITY.md for the threat model and reporting guidance.
Product boundaries
RunGate does not:
- guarantee the final bill
- inspect or repair scraper code
- read the target dataset
- replace account-wide Apify spending limits
- provide a dashboard outside Apify
- require an external server or database
Documentation
- ARCHITECTURE.md — system boundaries and state flow
- DESIGN.md — product and interaction design decisions
- SECURITY.md — threat model and controls
- DEPLOYMENT.md — build, monetization, and Store publishing
- STORE_LISTING.md — ready-to-paste Store copy