Skip to main content

Apify Input Schema Design 2026: User-Friendly Actor Config

· 4 min read
Yassine El Haddad
Software Developer & Automation Specialist

I build production AI agents, web scrapers, and automation pipelines. Most of what I publish here comes from the actual problems they run into: proxies that get banned, anti-bot stacks that fingerprint your client, RAG that drifts when the underlying data moves. Stack: Python, TypeScript, Go, FastAPI, LangChain, Crawlee, Playwright, deployed on AWS, GCP, and Cloudflare.

INPUT_SCHEMA.json defines what your Actor accepts and how the Apify Console renders the input form. Good schema design reduces support tickets and failed runs. Place it in .actor/ or reference it from .actor/actor.json.

What the input schema does

The input schema:

  • Validates input before the Actor starts (fail fast, no wasted compute)
  • Renders the input form in Apify Console
  • Generates API docs and integration code for Zapier, Make, and API callers
  • Simplifies automation workflows by exposing clear, typed fields

See the full input schema spec.

Core structure

Every schema needs schemaVersion: 1, type: "object", properties, and optional required:

{
"title": "Product Monitor Input",
"type": "object",
"schemaVersion": 1,
"properties": {
"startUrls": {
"title": "Start URLs",
"type": "array",
"description": "URLs to monitor",
"editor": "requestListSources",
"prefill": [{ "url": "https://example.com/product/123" }]
},
"maxItems": {
"title": "Max items",
"type": "integer",
"description": "Stop after this many items",
"default": 100,
"minimum": 1,
"maximum": 10000
}
},
"required": ["startUrls"]
}

Field types

TypeUse caseExample
stringKeywords, URLs, tokensSearch query, API key
integerCounts, limitsmaxItems, maxConcurrency
booleanFlagsuseProxy, debug
arrayURL lists, filtersstartUrls, categories
objectNested configproxyConfiguration

prefill vs default vs required

From the Apify docs:

OptionWhen to use
prefillExample value in the UI. User can change it. Not used when task/API omits the field.
defaultValue used when the field is omitted. Backward compatible for integrations.
requiredUser must provide a value. No safe fallback exists (e.g. API token).

Use default for sensible fallbacks (maxItems, proxy group). Use required for secrets and URLs. Use prefill for sample values (search keyword, start URL) to help first-time users.

Editor choices that improve UX

EditorField typeBest for
requestListSourcesarrayStart URLs, crawl seeds
select + enumstringFixed choices (country, mode)
select + enumSuggestedValuesstringSuggested values + custom input
textareastringLong text, JSON
javascript / pythonstringCode snippets
jsonobjectAdvanced users, raw config

Dropdown example:

{
"title": "Proxy type",
"type": "string",
"editor": "select",
"default": "RESIDENTIAL",
"enum": ["RESIDENTIAL", "DATACENTER", "AUTO"],
"enumTitles": ["Residential", "Datacenter", "Auto"]
}

Proxy configuration field

Expose proxy settings so users can choose groups without editing raw JSON:

{
"proxyConfiguration": {
"title": "Proxy configuration",
"type": "object",
"editor": "proxy",
"description": "Use Apify Proxy or custom URLs"
}
}

The proxy editor renders the standard proxy UI. Read more in the proxy configuration guide.

Validation constraints

Add minimum, maximum, minLength, maxLength, pattern for high-risk fields:

{
"maxItems": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"default": 100
},
"apiToken": {
"type": "string",
"pattern": "^[a-zA-Z0-9]{20,}$",
"isSecret": true
}
}

Set additionalProperties: false at the root to reject unknown keys.

Best practices summary

  1. Required vs default: Use default when a safe fallback exists; required only when the Actor cannot run without it.
  2. Descriptions: Add a short description for every field—it shows as help text.
  3. sampleName: For Store listings, use example or sampleName to show realistic values.
  4. Avoid raw JSON for non-technical users: Prefer select, requestListSources, and proxy over json when possible.
  5. Validate: Use apify validate-schema .actor or the visual editor before pushing.
Apify Affiliate Banner 728x90Apify Affiliate Banner 728x90Apify Affiliate Banner 300x50Apify Affiliate Banner 300x50
Next step

Open an existing Actor, refine one field with better title and validation, then run apify validate-schema. Check the full spec →

Frequently Asked Questions

A JSON file (INPUT_SCHEMA.json) that defines Actor input fields, types, validation, and how the Apify Console renders the input form. It validates input before the Actor starts.

Use default when a safe fallback exists (e.g. maxItems: 100). Use required when the Actor cannot run without user input (e.g. API token, start URLs).

Use type: string, editor: select, and enum (strict) or enumSuggestedValues (allow custom). Add enumTitles for display labels.

Place it in .actor/ or the Actor root. Or reference it in .actor/actor.json via the input field. Max size 500 kB.

Common mistakes and fixes

Input validation fails before Actor starts

Check required fields and type constraints. Use apify validate-schema .actor or the visual editor at apify.github.io/input-schema-editor-react.

Dropdown shows wrong labels

Use enumTitles to map enum values to display text. enum is for validation; enumTitles is for UI.