CSV & JSON Data Contract Validator avatar

CSV & JSON Data Contract Validator

Pricing

$20.00 / 1,000 analysis-completeds

Go to Apify Store
CSV & JSON Data Contract Validator

CSV & JSON Data Contract Validator

Validate CSV or JSON data against a data contract before import. Get a row-level report of type, format and rule errors.

Pricing

$20.00 / 1,000 analysis-completeds

Rating

0.0

(0)

Developer

EsusVogi

EsusVogi

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Security

Limited permissions

Share

Validate CSV or JSON data against a data contract before you import it. The Actor returns a structured, row-level report. It does not fetch URLs, does not change your data and does not import anything into another system.

What it checks

  • Columns and fields: required fields, allowed extra columns (off by default), duplicate column names.
  • Types: string, identifier (keeps leading zeros), integer, decimal (. or , separator), ISO date, boolean, enumerated values.
  • Rules: bounds (min, max), regular-expression patterns, maximum length, unique keys, duplicate rows, a field required when another field has a given value (required_if), and one date that must come before another (date_order).
  • Input formats: CSV text, or a JSON array of objects (also accepts {"rows": [...]}).

Limits

  • 1,000,000 UTF-8 bytes of content
  • 10,000 data rows
  • 100 columns
  • 4,096 characters per CSV cell
  • At most 1,000 detailed findings are kept; additional findings are counted.

Input

FieldTypeDescription
contractobjectThe data contract: format (csv or json), delimiter (CSV), columns, optional rules.
contentstringThe CSV or JSON text to validate.
includeValuesbooleanDefault false. When true, the report shows cell values and column names.

Example input (fictional data):

{
"contract": {
"format": "csv",
"delimiter": ",",
"columns": [
{"name": "sku", "type": "identifier", "required": true, "unique": true},
{"name": "quantite", "type": "integer", "required": true, "min": 0}
]
},
"content": "sku,quantite\nDEMO-001,3\nDEMO-002,0\n",
"includeValues": false
}

Output

The report contains:

  • status: valid, valid_with_warnings, invalid (completed with data errors), or rejected (file or contract could not be analysed reliably).
  • summary: bytes, rows read, rows valid and invalid, errors, warnings, duplicate keys and duplicate rows.
  • findings: row and line numbers, finding codes, severity. Values are hidden unless includeValues is true.

Example output for the input above (fictional data):

{
"validator": {"name": "csv-json-validator", "version": "0.3.0"},
"contract_version": null,
"status": "valid",
"format": "csv",
"summary": {
"bytes": 35,
"rows_read": 2,
"rows_invalid": 0,
"rows_valid": 2,
"errors": 0,
"warnings": 0,
"duplicate_keys": 0,
"duplicate_rows": 0
},
"findings": [],
"findings_suppressed": 0,
"findings_truncated": false
}

A complete report with a billing field is published to the run's OUTPUT record only when the charge is accepted (see Pricing). The dataset item contains the same report without the billing field.

Pricing

  • One billable event, analysis-completed, at US$0.02 per completed analysis.
  • Billed only when at least one data row was analysed and the status is valid, valid_with_warnings or invalid. Data-rule violations can be invalid and billable.
  • Not billed: a rejected file (for example a missing required column, a disallowed extra column, a field count that differs on any row, unreadable syntax), an empty file (a CSV header alone or []), invalid input or contract, and technical errors.
  • Billing is per analysis, not per row. A new run is a new analysis.
  • If the run has no spending limit, or a limit below US$0.02, the run fails with a minimal message and no report.
  • If the charge is refused or its outcome is unclear, the run fails with a minimal message and no report. The Actor does not retry the charge automatically.
  • No platform start charge or dataset-item charge is applied, and platform usage is not passed on to users.

Status

  • valid: no data errors.
  • valid_with_warnings: analysed, with warnings.
  • invalid: analysed, with data errors.
  • rejected: the file or contract could not be analysed reliably. Not billed.
  • failed: the input was invalid, or a technical error, a missing or insufficient spending limit, or a charge refusal prevented a report. Not billed. No report is delivered.

Privacy and data handling

  • includeValues: false hides cell values, column names and unknown identifiers in the report. Finding codes and row numbers remain visible.
  • This is not anonymisation. The content and contract you submit remain in the run's INPUT record on Apify. Reports remain in the run's storages under Apify's access and retention settings. This Actor does not promise automatic deletion.
  • Do not submit personal or confidential data unless you have the right to process it and you have reviewed the platform's storage settings.
  • Set includeValues: true only when you need detailed values in the report, and only if you are authorised to process them.
  • The Actor runs with limited permissions: it uses only its own run storages, its request queue and the charge for the current run.

Issues and support

Use the Actor's Issues tab on Apify Store. Do not include secrets or personal information in public reports.