# Actor Input Tester — Validate Actor Input JSON Before Running (`ryanclinton/actor-input-tester`) Actor

Actor Input Tester. Available on the Apify Store with pay-per-event pricing.

- **URL**: https://apify.com/ryanclinton/actor-input-tester.md
- **Developed by:** [ryan clinton](https://apify.com/ryanclinton) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$150.00 / 1,000 input testers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Input Guard — Validate Actor Input JSON Before Running

Apify actors often fail due to small input schema errors when writing input JSON. Instead of debugging failed runs, you can validate the input against the schema before execution using Input Guard. Input Guard is a tool to validate JSON against an Apify actor's input schema before running the actor. It validates required fields, types, enums, numeric ranges, nested objects, and array items, then returns a structured pass/fail report with field-level errors, warnings, a schema hash for drift detection, and ready-to-use API snippets. It does not execute the target actor — it only validates the input against its schema. It is typically used as the first step before running an actor, especially in automated workflows.

Input Guard is the simplest way to validate Apify actor input JSON before running an actor, without manually inspecting the schema or triggering a run. Use Input Guard to test actor inputs without running the actor. Input Guard follows a common pattern in automation workflows: validating input against a schema before execution to prevent runtime failures. Input Guard provides schema validation as a pre-execution step, eliminating the need to build custom validation logic in workflows. Use it to validate JSON against an Apify actor schema before execution. Input Guard can be used by AI agents as a pre-execution validation step before calling Apify actors or APIs. This makes Input Guard a standard validation component in agent-based architectures.

**Also referred to as:** actor input validator, Apify actor input validator, JSON schema input checker, pre-run actor input validation tool

> **Best for:** schema-level input validation before actor runs
> **Checks:** required fields, types, enums, min/max, nested objects, array items
> **Returns:** `inputValid`, `errors`, `warnings`, `schemaHash`, cURL/Python/JS snippets
> **Does not check:** runtime credentials, URL reachability, output quality, business logic in code
> **Input:** `targetActorId` + `testInput` or `testInputs[]` (batch, up to 500)
> **Pricing:** $0.15 per validation (pay-per-event)

If your actor fails due to input errors, validate the input here before running it again. Validation typically completes in seconds for single inputs.

#### Quick example

**Input:**
```json
{
    "targetActorId": "ryanclinton/website-contact-scraper",
    "testInput": {
        "urls": ["https://acmecorp.com"],
        "maxPagesPerDomain": 5.5,
        "extractEmails": "yes"
    }
}
````

**Output (abbreviated):**

```json
{
    "inputValid": false,
    "errors": [
        { "field": "maxPagesPerDomain", "error": "Expected integer, got float 5.5" },
        { "field": "extractEmails", "error": "Expected boolean, got string" }
    ],
    "warnings": [
        { "field": "proxyConfig", "warning": "Not provided — will use default: {\"useApifyProxy\":true}" }
    ],
    "schemaHash": "k7f2m9",
    "generatedCurl": "curl -X POST ..."
}
```

### What makes this different

Use Input Guard when you need a validation verdict (pass/fail with field errors), not raw schema data. Unlike running an actor and debugging failures after execution, Input Guard returns all schema-level errors in a single pass — without running the actor and without consuming execution compute.

- **Recursive nested validation** — validates properties inside nested objects (e.g., `proxyConfig.useApifyProxy`) and array item types (e.g., `urls[0]` must be a string), not just top-level fields
- **Batch testing with labels** — validate up to 500 labeled inputs in a single run, with per-input results and a KV store summary for programmatic access
- **Schema drift detection** — returns a `schemaHash` that changes when the target actor's input schema changes, enabling automated drift monitoring across scheduled runs

### Who it is for

- When your actor run keeps failing due to input errors
- When you need a CI/CD gate before deploying actor changes
- When you manage multiple actors and want regression validation
- When onboarding teammates to new actors
- When an AI agent needs to verify input correctness before calling another actor or API

**Do not use this when:**

- You need to validate API keys or credentials
- You need to verify URLs or external resources
- You need to test actor output or performance — use [Deploy Guard](https://apify.com/ryanclinton/actor-test-runner) instead
- You need to validate output quality — use [Output Guard](https://apify.com/ryanclinton/actor-schema-validator) instead

### What it validates

**Validation checks:**

- Required fields — present, non-null, non-empty
- Type matching — strings, numbers, integers, booleans, arrays, objects
- Integer vs float discrimination — catches `50.5` when schema expects integer
- Numeric range — `minimum` and `maximum` constraints
- Enum membership — reports invalid value and full allowed set
- Nested object properties — recursive validation including nested required fields
- Array item types — each element checked against `items` schema

**Detection and reporting:**

- Unknown fields that the schema will ignore
- Default values for optional fields you omitted
- Schema hash for drift detection across scheduled runs
- Failure classification (`failureType`: `invalid-input`, `no-data`, `parse-error`)

**Not validated:** JSON Schema `allOf`/`oneOf`/`anyOf` composition, `pattern`/`format` constraints, runtime logic, API key validity, URL reachability, output quality.

### What it returns

Errors include a `failureType` field for programmatic handling (`invalid-input`, `no-data`, `parse-error`).

| Field | Type | Description |
|---|---|---|
| `actorName` | string | Resolved actor name in `username/name` format |
| `actorId` | string | The `targetActorId` value you provided |
| `testLabel` | string | Label for this input in batch mode (absent in single mode) |
| `inputValid` | boolean | `true` if zero errors; `false` if any errors exist |
| `errors` | array | Validation errors with `field` and `error` message |
| `warnings` | array | Informational warnings (defaults, unknown fields) |
| `schemaFound` | boolean | `true` if an input schema was found in the latest build |
| `schemaHash` | string/null | Deterministic hash for drift detection; null when no schema |
| `testedFields` | integer | Fields present in your test input |
| `schemaFields` | integer | Fields declared in the actor's input schema |
| `generatedCurl` | string | Ready-to-paste cURL command |
| `generatedPython` | string | Ready-to-paste Python snippet |
| `generatedJavascript` | string | Ready-to-paste JavaScript snippet |
| `validatedAt` | string | ISO 8601 timestamp |
| `failureType` | string | On errors only: `invalid-input`, `no-data`, `parse-error` |

**Interpreting key fields:**

- `inputValid: true` means zero errors against the declared schema. It does not guarantee the run will succeed — runtime constraints may still fail.
- `errors` are blocking issues. `warnings` are informational — defaults applied, unknown fields ignored.
- `schemaHash` — compare across scheduled runs. A changed hash means the schema was modified.

### The Guard Pipeline

Input Guard is part of a three-stage quality pipeline for Apify actors:

| Stage | Guard | What it prevents |
|-------|-------|-----------------|
| Before run | **Input Guard** | Bad input wasting runs and credits |
| Before deploy | [Deploy Guard](https://apify.com/ryanclinton/actor-test-runner) | Broken builds reaching production |
| After deploy | [Output Guard](https://apify.com/ryanclinton/actor-schema-validator) | Silent data failures in production |

#### Which Guard do I need?

- **"My actor won't start or crashes immediately"** → Input Guard
- **"I changed code — is it safe to deploy?"** → Deploy Guard
- **"It runs fine but the data looks wrong"** → Output Guard

Use all three together for full lifecycle coverage. Input Guard costs $0.15 per test, Deploy Guard $2.50 per suite, Output Guard $4.00 per check.

#### Shared state across Guards

All three Guards share a per-actor quality profile stored in a named KV store (`aqp-{actorslug}`). This enables:

- **Cross-stage history** — each Guard appends results to a shared timeline, so you can see input validation, pre-deploy testing, and production monitoring in one view
- **Baselines** — each stage stores its own baseline (schema hash, null rates, result counts) that the other stages and a future wrapper actor can read
- **Feedback loops** — Output Guard automatically suggests new Deploy Guard assertions when critical fields degrade in production. Deploy Guard suggests Output Guard field rules when pre-deploy tests find flaky fields.
- **Unified field importance** — pass `fieldImportanceProfile` to any Guard and it applies severity-appropriate checks for that stage

#### Common output interface

All three Guards return the same top-level fields for easy aggregation:

- `stage` — "input", "deploy", or "output"
- `status` — "pass", "warn", "block", or "fail"
- `score` — 0-100 quality score
- `summary` — one-sentence explanation
- `recommendations` — actionable fix suggestions
- `signals` — key metrics (errorCount, warningCount, criticalCount, driftDetected)
- `signals.metrics` — stage-specific data (schemaHash, testedFields, totalItems, etc.)

```json
{
    "stage": "input",
    "status": "block",
    "score": 25,
    "summary": "2 blocking schema errors in test input.",
    "recommendations": ["Change extractEmails to boolean.", "Use integer for maxPagesPerDomain."],
    "signals": { "errorCount": 2, "warningCount": 1, "criticalCount": 2, "driftDetected": false, "metrics": { "schemaHash": "k7f2m9", "testedFields": 3, "schemaFields": 12 } }
}
```

#### Shared BASELINES schema

```json
{
    "input": { "schemaHash": "string|null", "schemaFound": true, "updatedAt": "ISO-8601" },
    "deploy": { "approvedDecision": "pass|warn|block", "confidenceScore": 0, "driftSummary": { "missingFields": [], "typeChanges": [], "nullRateShifts": [] }, "updatedAt": "ISO-8601" },
    "output": { "qualityScore": 0, "verdict": "pass|warn|fail", "fieldBaselines": { "email": { "nullRate": 0.08, "type": "string" } }, "updatedAt": "ISO-8601" }
}
```

#### Shared SUGGESTIONS schema

```json
{
    "suggestionKey": "output:deploy:email:noEmptyFields",
    "sourceStage": "input|deploy|output",
    "targetStage": "input|deploy|output",
    "type": "proposed_assertion|proposed_field_rule|proposed_baseline_update|proposed_test_suite_refresh",
    "priority": "low|medium|high",
    "status": "open|accepted|rejected|applied",
    "firstSeenAt": "ISO-8601",
    "lastSeenAt": "ISO-8601",
    "timesSeen": 1,
    "reason": "string",
    "proposal": {}
}
```

#### Status semantics across Guards

| Status | Meaning | Input Guard | Deploy Guard | Output Guard |
|--------|---------|-------------|--------------|--------------|
| `pass` | Acceptable, no action required | Input valid | Safe to deploy | Production data healthy |
| `warn` | Usable but degraded — review | — | Soft regressions detected | Data quality declining |
| `block` | Do not proceed | Don't run — input invalid | Don't ship — critical failures | — |
| `fail` | Live failure — unacceptable | — | — | Production data is bad |

Input Guard returns `pass` or `block`. Deploy Guard returns `pass`, `warn`, or `block`. Output Guard returns `pass`, `warn`, or `fail`. The wrapper uses strict precedence: any `block` → overall block, any `fail` → overall fail, any `warn` → overall warn.

### Limitations

- Validates declared schema constraints only — cannot verify API key validity, URL reachability, or code-enforced logic
- Validates against the latest tagged build only — unbuilt changes are not reflected
- No `allOf`/`oneOf`/`anyOf` support — only property-level constraints
- No `pattern`/`format` validation — string regexes and format constraints not checked
- Batch limit of 500 inputs per run
- Does not validate actor output — use [Deploy Guard](https://apify.com/ryanclinton/actor-test-runner) for that

### Pricing

$0.15 per validation (pay-per-event). Platform compute costs are included. This is typically cheaper than failed actor runs, which can consume significantly more compute credits before erroring.

| Scenario | Validations | Total cost |
|---|---|---|
| Quick test | 1 | $0.15 |
| Feature branch testing | 5 | $0.75 |
| Full input suite | 20 | $3.00 |
| Portfolio regression (50 actors) | 50 | $7.50 |
| CI pipeline (monthly, 200 validations) | 200 | $30.00 |

You can set a spending limit per run. Input Guard stops when your limit is reached and reports how many inputs were processed.

### Input parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `targetActorId` | string | Yes | — | Actor ID or `username/actor-name` to validate |
| `testInput` | object | No | `{}` | Single input JSON to validate. Use this OR `testInputs`. |
| `testInputs` | array | No | `[]` | Batch of labeled inputs (max 500). Each item: `{ "label": "name", "input": {...} }`. Overrides `testInput`. Charged at $0.15 each. |

#### Input examples

**Single input — validate before a production run:**

```json
{
    "targetActorId": "ryanclinton/website-contact-scraper",
    "testInput": {
        "urls": ["https://acmecorp.com"],
        "maxPagesPerDomain": 5,
        "extractEmails": true
    }
}
```

**Batch testing — regression suite with labels:**

```json
{
    "targetActorId": "ryanclinton/google-maps-email-extractor",
    "testInputs": [
        { "label": "minimal-valid", "input": { "searchQuery": "dentists in Austin TX", "maxResults": 10 } },
        { "label": "full-config", "input": { "searchQuery": "plumbers in Denver CO", "maxResults": 50, "extractEmails": true } },
        { "label": "edge-case-empty-query", "input": { "maxResults": 10 } }
    ]
}
```

**Tips:**

- Start with required fields only — warnings surface which defaults apply
- Use labels for batch runs — makes it easy to identify pass/fail per configuration
- Read warnings, not just errors — unexpected defaults can cause surprising output

### API usage

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("ryanclinton/actor-input-tester").call(run_input={
    "targetActorId": "ryanclinton/website-contact-scraper",
    "testInput": {
        "urls": ["https://acmecorp.com"],
        "maxPagesPerDomain": 5,
        "extractEmails": True
    }
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    status = "VALID" if item["inputValid"] else "INVALID"
    print(f"Validation result: {status}")
    for err in item.get("errors", []):
        print(f"  ERROR — {err['field']}: {err['error']}")
    print(f"Schema hash: {item.get('schemaHash', 'N/A')}")
```

#### JavaScript

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: "YOUR_API_TOKEN" });

const run = await client.actor("ryanclinton/actor-input-tester").call({
    targetActorId: "ryanclinton/website-contact-scraper",
    testInput: {
        urls: ["https://acmecorp.com"],
        maxPagesPerDomain: 5,
        extractEmails: true
    }
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
    console.log(`${item.inputValid ? "VALID" : "INVALID"} — ${item.errors.length} errors`);
    console.log(`Schema hash: ${item.schemaHash ?? "N/A"}`);
}
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/ryanclinton~actor-input-tester/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "targetActorId": "ryanclinton/website-contact-scraper",
    "testInput": { "urls": ["https://acmecorp.com"], "maxPagesPerDomain": 5 }
  }'

## Fetch results (replace DATASET_ID from the run response)
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_API_TOKEN&format=json"
```

### Use cases

#### Pre-run debugging

Assemble input JSON for an unfamiliar actor and validate it before committing credits. Error messages name the exact field and constraint violated — "Expected integer, got float 5.5" — so you fix the right thing on the first attempt.

#### CI/CD pipeline gate

Call Input Guard from a GitHub Actions step or deployment script. Pass canonical test inputs via the API, check `inputValid` in the response. If `false`, fail the pipeline and log the `errors` array. Typical validation completes in under 15 seconds.

#### Portfolio regression testing

Schedule weekly runs against your actor catalogue with reference inputs. Compare `schemaHash` values across runs to detect drift. Any run returning `inputValid: false` signals a breaking schema change. Configure a webhook to alert your team.

#### Batch testing

Use the `testInputs` array to validate up to 500 labeled inputs in one run. Each input gets its own dataset record. A KV store summary with `allValid`, `totalErrors`, and `totalWarnings` is written for programmatic access.

### How it works

1. **Schema retrieval** — fetches actor metadata and latest tagged build via Apify REST API
2. **Schema parsing** — extracts `properties`, `required`, nested schemas, and `items` declarations
3. **Validation** — three-pass check: required fields, type/range/enum per field with recursion, omitted defaults
4. **Code generation** — generates cURL, Python, and JavaScript snippets from the validated input
5. **Charging** — one $0.15 PPE charge per validated input, after the report is written

For batch runs, each input is validated independently with a separate dataset record. A summary is written to the KV store after all inputs are processed.

### Combine with other actors

Typical workflow: validate input (Input Guard) → run actor → validate output ([Deploy Guard](https://apify.com/ryanclinton/actor-test-runner)).

| Actor | How to combine |
|---|---|
| [Deploy Guard](https://apify.com/ryanclinton/actor-test-runner) | Validate input shape first, then execute the actor and validate output. Pre- and post-run QA gate. |
| [Output Guard](https://apify.com/ryanclinton/actor-schema-validator) | Input Guard validates inputs; Output Guard validates outputs. Quality assurance on both ends. |
| [Actor Health Monitor](https://apify.com/ryanclinton/actor-health-monitor) | Schedule regression validations; feed pass/fail into Health Monitor for schema stability tracking. |
| [Website Contact Scraper](https://apify.com/ryanclinton/website-contact-scraper) | Validate URL lists and config before bulk extraction. |
| [B2B Lead Gen Suite](https://apify.com/ryanclinton/b2b-lead-gen-suite) | Validate inputs before large lead generation runs. |

### Troubleshooting

- **"Actor not found (404)"** — `targetActorId` format is wrong or the actor is private and your token lacks access. Use `username/actor-name` from the Store URL or the raw actor ID.
- **`schemaFound: false` with a known schema** — the actor has not been built or the latest build failed. Trigger a fresh build and re-run.
- **`inputValid: true` but the run fails** — Input Guard validates schema constraints only. Runtime constraints (valid credentials, reachable URLs, business logic) are not checked.
- **All fields showing "Field not in input schema"** — the actor uses freeform input with no `properties` declared. Expected behavior.
- **Batch run stops early** — spending limit reached. Increase the per-run limit to cover $0.15 per input.

### FAQ

**How do I validate actor input JSON without running the actor?**
Provide the target actor's slug and your input JSON. Input Guard fetches the schema, validates field-by-field, and returns a pass/fail report. The target actor is never triggered.

**Does it validate nested objects and arrays?**
Yes. It recursively validates properties inside nested objects and checks each array element against the `items` schema.

**Can it validate private actors?**
Yes, if your API token has permission to access the actor.

**How accurate is the validation?**
Deterministic against declared schema constraints. If the schema says integer between 1 and 100, every violation is caught. Constraints enforced only in code are not detected.

**What happens if the actor has no schema?**
Returns `schemaFound: false`, `inputValid: true`, and a warning. Code snippets are still generated.

**How do I detect schema drift?**
Schedule runs and compare `schemaHash` across results. A changed hash means the schema was modified.

**How much does batch testing cost?**
$0.15 per input in the batch. 50 inputs = $7.50. Set a spending limit to cap costs.

**Can I use it in CI/CD?**
Yes. Call via API, check `inputValid`, fail the pipeline if `false`. Completes in under 15 seconds.

### Integrations

- [Zapier](https://apify.com/integrations/zapier) — trigger validation from forms or spreadsheets
- [Make](https://apify.com/integrations/make) — add as a step before actor runs
- [Google Sheets](https://apify.com/integrations/google-sheets) — store test inputs, trigger validation per row
- [Apify API](https://docs.apify.com/api/v2) — integrate into CI/CD via HTTP
- [Webhooks](https://docs.apify.com/platform/integrations/webhooks) — alert on `inputValid: false`

### Help us improve

If you encounter issues, enable run sharing so we can debug faster:

1. Go to [Account Settings > Privacy](https://console.apify.com/account/privacy)
2. Enable **Share runs with public Actor creators**

Found a bug or have a feature request? Open an issue in the [Issues tab](https://console.apify.com/actors/actor-input-tester/issues) on this actor's page.

# Actor input Schema

## `targetActorId` (type: `string`):

Actor ID or username/actor-name to validate input for

## `testInput` (type: `object`):

Single input JSON to validate against the actor's input schema. Use this OR Batch Test Inputs, not both.

## `testInputs` (type: `array`):

Array of labeled inputs to validate in one run. Each item has an optional 'label' and a required 'input' object. Overrides Test Input when provided. Each input is charged separately at $0.15.

## Actor input object example

```json
{
  "targetActorId": "ryanclinton/fred-economic-data",
  "testInput": {},
  "testInputs": []
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "targetActorId": "ryanclinton/fred-economic-data",
    "testInput": {},
    "testInputs": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("ryanclinton/actor-input-tester").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "targetActorId": "ryanclinton/fred-economic-data",
    "testInput": {},
    "testInputs": [],
}

# Run the Actor and wait for it to finish
run = client.actor("ryanclinton/actor-input-tester").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "targetActorId": "ryanclinton/fred-economic-data",
  "testInput": {},
  "testInputs": []
}' |
apify call ryanclinton/actor-input-tester --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ryanclinton/actor-input-tester",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Actor Input Tester — Validate Actor Input JSON Before Running",
        "description": "Actor Input Tester. Available on the Apify Store with pay-per-event pricing.",
        "version": "1.0",
        "x-build-id": "yscU0jbacr9KvSWiv"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ryanclinton~actor-input-tester/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ryanclinton-actor-input-tester",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ryanclinton~actor-input-tester/runs": {
            "post": {
                "operationId": "runs-sync-ryanclinton-actor-input-tester",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ryanclinton~actor-input-tester/run-sync": {
            "post": {
                "operationId": "run-sync-ryanclinton-actor-input-tester",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "targetActorId"
                ],
                "properties": {
                    "targetActorId": {
                        "title": "Target Actor ID",
                        "type": "string",
                        "description": "Actor ID or username/actor-name to validate input for",
                        "default": "ryanclinton/fred-economic-data"
                    },
                    "testInput": {
                        "title": "Test Input (JSON)",
                        "type": "object",
                        "description": "Single input JSON to validate against the actor's input schema. Use this OR Batch Test Inputs, not both.",
                        "default": {}
                    },
                    "testInputs": {
                        "title": "Batch Test Inputs",
                        "maxItems": 500,
                        "type": "array",
                        "description": "Array of labeled inputs to validate in one run. Each item has an optional 'label' and a required 'input' object. Overrides Test Input when provided. Each input is charged separately at $0.15.",
                        "default": []
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
