Tools

How do I validate my actor's output schema?

Use the ApifyForge Schema Validator to compare your actor's actual dataset output against the schema declared in your dataset_schema.json file. The validator runs locally on your machine, takes just seconds, and catches the exact issues that trigger maintenance flags on the Apify Store. Here is the step-by-step process to validate your schema. First, make sure your actor has a dataset_schema.json file in its root directory. This file declares the structure and types of every field your actor outputs. If you do not have one yet, create it based on your actor's actual output structure — every field your actor produces should be declared with its correct type (string, number, boolean, array, object). Second, run your actor locally or in the cloud to produce a sample dataset. Third, run the ApifyForge Schema Validator, pointing it at your actor's output data and the schema file. The validator performs four categories of checks. Type mismatches — if your schema says a field is a string but your actor outputs a number, you get an error with the exact JSON path (e.g., results[0].price), the expected type (string), and the actual type (number). Undeclared fields — if your actor outputs fields not listed in your schema, these are flagged because they indicate your schema is incomplete. Missing required fields — if your schema marks a field as required but it is absent from some output items, the validator catches this. Empty schemas — if your dataset_schema.json exists but defines no fields, this is immediately flagged as invalid. Schema violations matter because they directly affect your actor's visibility on the Apify Store. When Apify's automated quality checks detect schema mismatches over a period of several days, your actor gets flagged with a maintenance warning. This reduces its ranking in Store search results and category pages, which means fewer users find and run your actor, which means less PPE revenue. The damage from a maintenance flag can take weeks to recover from even after the underlying issue is fixed. The prevention strategy is simple: run the Schema Validator before every push. Many developers add it to a Git pre-commit or pre-push hook so validation happens automatically. For a complete testing workflow, combine the Schema Validator with the Test Runner and Cloud Staging for three layers of pre-deploy validation. See the related questions about the Schema Validator tool and Regression Tests for more details. Visit apifyforge.com/tools/schema-validator for full documentation.

Related questions