Catch bad input before it costs you credits
Input Guard is an input validation tool that checks your JSON against any Apify actor's input schema before you run it. Validates required fields, types, ranges, and enums, then generates ready-to-use cURL, Python, and JavaScript API call snippets — all for $0.05 per validation. Prevents the #1 cause of failed actor runs: missing or malformed input fields.
A single failed actor run can cost $0.10-$5.00 in compute credits. Input Guard catches input errors for $0.05 before any compute is consumed — plus shows you which default values will be applied to optional fields you omitted.
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.05/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",
"inputValid": false,
"errors": [
{ "field": "query", "error": "Required field missing" },
{ "field": "maxResults", "error": "Expected integer, got string" }
],
"warnings": [
{ "field": "proxyConfig", "warning": "Will use default: useApifyProxy=true" }
],
"generatedCurl": "curl -X POST 'https://api.apify.com/v2/acts/...'",
"generatedPython": "client.actor('...').call(run_input={...})"
}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 — potentially 100x more than a $0.05 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.05 per validation — the cheapest tool 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.05 per validation— the cheapest tool in the ApifyForge suite. No subscription, no premium tier. Apify's free plan includes $5/month in credits, enough for 100 validations per month.
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.05, the cheapest tool in the ApifyForge suite. Charged as a pay-per-event (PPE) fee on your own Apify account. 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 100 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.05 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.