
Validate Dataset(s) with JSON Schema
Pricing
Pay per usage
Go to Store

Validate Dataset(s) with JSON Schema
This Actor validates items in one or more datasets against a provided JSON Schema. Use it if you planning to add a dataset validation schema to your actor and you want test it.
0.0 (0)
Pricing
Pay per usage
0
Total users
1
Monthly users
1
Runs succeeded
50%
Last modified
a month ago
This Apify Actor validates items in one or more datasets against a provided JSON Schema. It helps identify invalid items and provides detailed validation errors for each item that doesn't match the schema.
Features
- Validate multiple datasets in a single run
- Support for both Dataset IDs and Run IDs
- Detailed validation error reporting
- Uses JSON Schema Draft-07
Input
The actor accepts the following input parameters:
{"datasetIds": ["datasetId1", "datasetId2"], // Array of Dataset IDs or Run IDs"schema": { // JSON Schema to validate against"$schema": "http://json-schema.org/draft-07/schema#","type": "object","properties": {// Your schema properties here},"required": []}}
Input Parameters Details
datasetIds
(required, array of strings)- List of Dataset IDs or Run IDs to validate
- You can use either Dataset ID (e.g., "1234567890") or Run ID (e.g., "yourRunId") ˇ
schema
(required, object)- JSON Schema definition that describes the expected structure of items
- Must be a valid JSON Schema (Draft-07)
- Provided as a object in the input
Output
The actor stores validation results in its default dataset. Each record in the output dataset has the following structure:
{"datasetId": "string", // ID of the dataset being validated"itemPosition": "number", // Position of the invalid item in the dataset (0-based)"validationErrors": [ // Validation errors from AJV validator// Detailed error information for each error]}
Only invalid items (those that don't match the schema) are included in the output.
Usage Example
{"datasetIds": ["abc123xyz789"],"schema": {"$schema": "http://json-schema.org/draft-07/schema#","type": "object","properties": {"url": { "type": "string", "format": "uri" },"title": { "type": "string" },"price": { "type": "number" }},"required": ["url", "title"]}}
Limitations
- Can be slower for very large datasets since validation is done sequentially one item at a time
- Maximum of 1000 validation errors are stored in memory before being pushed to the output dataset
- The actor validates against JSON Schema Draft-07
- Input schema must be a valid JSON schema