Input Guard (Input Tester)

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.

Sign in to use
$0.05/validation

What Input Guard checks

Required field validation

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.

Type checking

Validates that strings, numbers, integers, booleans, arrays, and objects match the schema. Catches type coercion bugs that cause silent failures or unexpected actor behavior.

Range and enum validation

Checks minimum/maximum constraints for numeric fields and validates that select fields contain only allowed enum values. Prevents out-of-range inputs.

Default value reporting

Shows which optional fields will use defaults and what those defaults are. Prevents surprises like defaulting to 100 results when you expected 10.

cURL command generation

Produces a ready-to-paste cURL command for the actor run — no more hand-crafting API calls. Includes your validated input JSON, correctly escaped.

Python and JavaScript snippets

Generates apify-client code in both Python and JavaScript/TypeScript, ready to drop into your integration. Uses your validated input JSON with proper formatting.

Input validation methods compared

There are several ways to validate actor input before running. Each trades off speed, cost, and validation depth.

MethodValidation depthCode generationCost
Input GuardRequired + types + ranges + enums + defaultscURL + Python + JavaScript$0.05/validation
Apify Console input formRequired fields only (visual form)NoneFree
Trial-and-error runsRuntime errors (post-failure)None$0.10-5.00 per failed run
Manual schema readingDepends on developer diligenceManualFree (5-15 min time cost)

Example Input Guard output

{
  "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={...})"
}

How Input Guard works

1

Enter the actor ID and paste your input JSON

2

Input Guard validates every field against the actor's declared input schema

3

Get validation results plus ready-to-use API call snippets in cURL, Python, and JavaScript

Alternatives to Input Guard

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.

Apify Console input form

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.

Trial-and-error runs

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.

Manual schema reading

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.

JSON Schema validation tools

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.

Input Guard

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.

Limitations

  • 1.Schema-only validation. Input Guard validates against the declared input_schema.json. If the actor's code enforces additional constraints not declared in the schema, those are not checked.
  • 2.No runtime validation. Input Guard checks input structure but cannot verify that valid input will produce valid output. An input might pass schema validation but still cause the actor to fail due to unreachable URLs, rate limits, or site-specific issues.
  • 3.Requires declared input schema. Approximately 15% of Apify Store actors do not declare an input_schema.json. Input Guard cannot validate input for actors without a declared schema.
  • 4.No nested object deep validation. For fields of type "object", Input Guard checks that the value is a valid JSON object but does not validate nested object properties unless the schema explicitly declares them.
  • 5.Requires Apify account. Input validations execute on your own Apify account at the $0.05 PPE rate. You need a valid Apify API token.

What Input Guard costs

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.

Frequently asked questions

What does Input Guard validate?

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.

How much does input validation cost?

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.

Does Input Guard generate API call code?

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.

What is the most common cause of actor run failures?

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.

Can I validate input for actors I don't own?

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.

How does default value reporting work?

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.