Run it, block it, or review it — before you spend a credit
Input Guard is CI/CD for actor inputs. It validates a payload against any Apify actor's input schema and returns one routable decision — ignore (valid, run it) / monitor (valid but risky, review) / act_now (invalid, block and fix) — so your pipeline or agent branches on one field. $0.15 per validation.
Most Apify failures are contract failures, not runtime failures — a run "succeeds" because a field was silently dropped (Apify does not warn on UNKNOWN_FIELD), a default changed, or the target's input schema drifted under you. Input Guard catches those before execution, regression-tests your saved payloads when a contract changes (Golden suites), and scores how risky an actor's input contract is over time.
Not just "is this payload valid?" — "is this actor's input contract safe to automate against?"
One field your CI or agent branches on: decision — ignore (valid, run it) / monitor (valid but risky, review) / act_now (invalid, block and fix). The invocationPlan says run this exact payload, block it, or review it. Deterministic, no LLM.
Apify does not warn on UNKNOWN_FIELD — unknown fields are silently ignored at runtime, so a run 'succeeds' with the wrong data. Input Guard flags them pre-run, along with omitted fields falling back to defaults you didn't intend.
Store a set of known-good payloads once; whenever the target actor's schema changes, Input Guard re-validates them automatically. wouldBreakExistingPayloads tells you directly whether your stored payloads break — before production does.
A cross-run contractRisk score (breaking-change history, drift frequency, documentation quality) tells you whether an actor is safe to automate against. coveragePercent answers 'have I tested enough of this contract?' — not just 'is this one payload valid?'
Enum-case corrections, float-for-integer coercions, and typo fixes are applied to produce a patched payload preview — so a near-miss input becomes a runnable one without hand-editing.
Validate up to 500 labeled payloads in one run (testInputs[]). emitArtifacts writes REPORT.md/json, JUNIT.xml, SARIF.json, and GITHUB_STEP_SUMMARY.md so a failing input fails your pipeline with proper CI surfacing.
Checks every required field is present and non-empty. Catches the #1 cause of actor run failures — missing required input — before any compute credits are spent.
Validates that strings, numbers, integers, booleans, arrays, and objects match the schema. Catches type coercion bugs that cause silent failures or unexpected actor behavior.
Checks minimum/maximum constraints for numeric fields and validates that select fields contain only allowed enum values. Prevents out-of-range inputs.
Shows which optional fields will use defaults and what those defaults are. Prevents surprises like defaulting to 100 results when you expected 10.
Produces a ready-to-paste cURL command for the actor run — no more hand-crafting API calls. Includes your validated input JSON, correctly escaped.
Generates apify-client code in both Python and JavaScript/TypeScript, ready to drop into your integration. Uses your validated input JSON with proper formatting.
There are several ways to validate actor input before running. Each trades off speed, cost, and validation depth.
| Method | Validation depth | Code generation | Cost |
|---|---|---|---|
| Input Guard | Required + types + ranges + enums + defaults | cURL + Python + JavaScript | $0.15/validation |
| Apify Console input form | Required fields only (visual form) | None | Free |
| Trial-and-error runs | Runtime errors (post-failure) | None | $0.10-5.00 per failed run |
| Manual schema reading | Depends on developer diligence | Manual | Free (5-15 min time cost) |
{
"actorName": "ryanclinton/google-maps-email-extractor",
"decision": "act_now",
"invocationPlan": "block",
"errors": [
{ "field": "query", "error": "Required field missing", "code": "MISSING_REQUIRED" },
{ "field": "maxResults", "error": "Expected integer, got string", "code": "TYPE_MISMATCH" }
],
"warnings": [
{ "field": "maxReviews", "warning": "Unknown field — silently dropped at runtime", "code": "UNKNOWN_FIELD" }
],
"autoFix": { "available": true, "patched": { "maxResults": 50 } },
"contractRisk": { "score": 34, "band": "elevated", "schemaDriftDetected": false },
"coveragePercent": 72
}Enter the actor ID and paste your input JSON
Input Guard validates every field against the actor's declared input schema
Get validation results plus ready-to-use API call snippets in cURL, Python, and JavaScript
Several approaches exist for validating actor input, from visual forms to trial-and-error. The right choice depends on how often you integrate new actors.
The Apify Console provides a visual form for actor input with basic required field validation. Quick for simple inputs but does not show default values, generate code snippets, or validate complex nested structures.
Best for: simple actors with few input fields that you run manually.
Run the actor with your input and see what happens. If it fails, read the error log, fix the input, and try again. Each failed run costs $0.10-$5.00 in compute — often far more than a $0.15 validation.
Best for: when you're confident your input is correct and just need a quick test.
Open the actor's input_schema.json in the Apify Console or GitHub and manually check your input against it. Thorough but time-consuming (5-15 minutes) and error-prone for schemas with many fields.
Best for: developers who want to understand the full schema, not just validate against it.
Use generic JSON Schema validators (ajv, jsonschema) to validate against the input_schema.json. Requires downloading the schema and setting up tooling. No Apify-specific features like default value reporting or code generation.
Best for: developers with existing JSON Schema validation infrastructure.
Automated input validation with required fields, types, ranges, enums, and default value reporting. Generates cURL, Python, and JavaScript snippets. $0.15 per validation — among the lowest-cost tools in the ApifyForge suite.
Best for: developers who frequently integrate new actors and want fast validation with code generation.
Every input validation executes on your own Apify account at the standard pay-per-event rate of $0.15 per validation— among the lowest-cost tools in the ApifyForge suite. No subscription, no premium tier. Apify's free plan includes $5/month in credits, enough for about 33 validations per month.
One routable decision: ignore (input is valid — run the actor), monitor (valid but risky — unknown fields, defaults, or no declared schema — review first), or act_now (invalid — block and fix). Branch on decision; never parse prose. There's also an invocationPlan (run this exact payload / block / review). In CI, fail the build when decision is act_now; emitArtifacts writes JUnit, SARIF, and a GitHub step summary so failures surface in your pipeline natively.
Golden suites store a set of known-good payloads once. Whenever the target actor's input schema changes, Input Guard re-validates them automatically and tells you — via wouldBreakExistingPayloads — whether your stored payloads would now fail, before production finds out. Contract risk is a cross-run score (breaking-change history, drift frequency, documentation quality) for how safe an actor's input contract is to automate against, and coveragePercent tells you how much of the contract you've actually tested.
Yes. Apify does not warn on UNKNOWN_FIELD — unknown fields are silently dropped at runtime, so a run 'succeeds' while quietly ignoring part of your input. Input Guard flags them pre-run. Auto-fix goes further: enum-case corrections, float-for-integer coercions, and typo fixes are applied to produce a patched payload preview, turning a near-miss input into a runnable one without hand-editing.
Input Guard validates your input JSON against an actor's declared input_schema.json. It checks: required fields are present and non-empty, field types match the schema (string, number, integer, boolean, array, object), numeric values fall within minimum/maximum ranges, enum fields contain allowed values, and default values are correctly applied for omitted optional fields. All validation happens before any actor run, preventing wasted credits on failed inputs.
Each Input Guard run costs $0.15, charged as a pay-per-event (PPE) fee on your own Apify account — one of the lowest-cost tools in the ApifyForge suite. The tool reads the actor's input schema and validates your JSON — no actor runs are triggered. Apify's free tier includes $5/month in credits, enough for about 33 input validations per month.
Yes. After validating your input JSON, Input Guard generates three ready-to-use API call snippets: a cURL command for command-line usage, a Python snippet using the apify-client library, and a JavaScript/TypeScript snippet using the Apify SDK. Each snippet includes your validated input JSON, correctly formatted for the target language.
Missing required fields are the number one cause of actor run failures on Apify, followed by type mismatches (passing a string where an integer is expected) and out-of-range values. Input Guard catches all three before you spend credits on a failed run. A single failed run can cost $0.10-$5.00 in compute — far more than the $0.15 validation cost.
Yes. Input Guard reads the input schema from any public Apify Store actor. You can validate your input JSON against any actor's schema before running it, whether you own it or not. This is especially useful when integrating third-party actors into your pipeline for the first time.
Input Guard shows which optional fields you omitted and what default values the actor will use. This prevents surprises — for example, an actor might default maxResults to 100 when you expected 10, or default proxyConfiguration to use expensive residential proxies when datacenter would suffice. Knowing defaults before running saves both credits and time.