CSV Validator: Check Rows and Columns by Rules
Pricing
from $0.01 / 1,000 validated rows
CSV Validator: Check Rows and Columns by Rules
Check CSV, TSV or Apify dataset rows against your rules: types, required, unique, min/max, length, regex, allowed values, dates, column order, row count, duplicates. Lists each bad row and column with the reason. Empty input = free demo.
Pricing
from $0.01 / 1,000 validated rows
Rating
0.0
(0)
Developer
Actor Factory
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Features
Share
Check a CSV, TSV or Apify dataset against your own rules and get every bad row and column listed with the reason
For anyone who has to trust a table before it goes somewhere: a data team checking a file before an import, an agency checking a CSV a client delivered, or someone checking a migration export before the old system is switched off. Give this Actor file URLs (or Apify datasets), describe what a good row looks like in a small JSON document, and get one output row per problem (source, row, column, rule, value, reason) plus a REPORT with a pass/fail result and counts by rule and by column.
$0.0015 per checked file plus $0.00002 per checked row ($0.02 per 1,000 rows), header row not counted. Examples: a 10-row file costs $0.0017, a 100-row file $0.0035, a 1,000-row file $0.0215. The $5 monthly free credit covers about 230 files of 1,000 rows. The rows that list the problems are free. Failed, empty and binary files and the demo are free. No scraping, no API keys.
Try it free: clear the prefilled URL and the datasets and press Start. The demo checks a built-in sample CSV against built-in sample rules, is not charged and every output row carries _demo: true.
The problems it solves
- "Will this file load?" Check column names and order, required values, whole numbers, dates and e-mail addresses before an import fails halfway.
- A delivered CSV has to match the agreement. Write the agreement once as rules (exact columns, allowed values, number ranges, no duplicate rows) and check each delivery in seconds. The list of problems goes back to the sender as it is.
- Before a data migration. Find empty required cells, text in number columns, IDs that appear twice and values that do not match a format, with the row number of each.
- Output of an earlier Apify step. Check a dataset the same way, from a scheduled run or through the API.
What it checks
Per column (columns):
| Rule | Meaning |
|---|---|
type | string (default), integer, number, boolean (true/false, yes/no, 1/0, y/n), date, email (format check only, not whether the address exists), url (http or https) |
required | the cell must not be empty |
unique | no other row may hold the same value (empty cells are ignored) |
min, max | number range, for integer and number columns |
minLength, maxLength | number of characters |
pattern | a regular expression that must be found in the cell (use ^ and $ to match the whole cell) |
enum | list of allowed values |
format | for date: the date pattern, default %Y-%m-%d (for example %d/%m/%Y) |
Cells are trimmed before they are checked. An empty cell is only reported by required; the other rules skip it.
For the whole file:
| Key | Meaning |
|---|---|
expectedColumns | the column names in the order you expect |
allowExtraColumns | true to allow columns that are not in expectedColumns (default false) |
rowCountMin, rowCountMax | allowed number of data rows |
duplicateRows | true to report a row whose values in every column equal an earlier row |
Rows that have more or fewer cells than the header are always reported (column_count).
Rules example
{"expectedColumns": ["order_id", "email", "quantity", "ordered_on", "status", "coupon"],"rowCountMin": 1,"duplicateRows": true,"columns": {"order_id": { "type": "integer", "required": true, "unique": true, "min": 1 },"email": { "type": "email", "required": true },"quantity": { "type": "integer", "min": 1, "max": 99 },"ordered_on": { "type": "date", "format": "%Y-%m-%d" },"status": { "enum": ["new", "paid", "shipped"] },"coupon": { "pattern": "^[A-Z]{4}-\\d{4}$", "maxLength": 9 }}}
Input:
{"fileUrls": ["https://example.com/exports/orders.csv"],"rules": { "...": "as above" },"maxErrors": 1000}
A dataset works the same way with "datasetIds": ["<dataset id>"]; each item is a row and its keys are the column names.
Output
- Dataset: one row per problem.
{ "source": "https://example.com/exports/orders.csv", "row": 17, "column": "quantity", "rule": "max", "value": "120", "message": "120 is above the maximum 99." }
rowis the row as a spreadsheet shows it: the header is row 1 and the first data row is row 2 (a quoted cell with line breaks is one row). For a dataset it is the item number. Problems about the whole file (a missing column, too few rows) have an emptyrow.valueis cut to 200 characters. A file that could not be read produces one row with the rulefile_unreadableand the reason. - REPORT (key-value store):
{ "valid": false, "totalRows": 4200, "errorCount": 31, "truncated": false,"byRule": { "type": 12, "required": 10, "max": 9 }, "byColumn": { "quantity": 15, "email": 12, "status": 4 },"encoding": "shift_jis", "delimiter": "comma","files": [ { "source": "...", "status": "ok", "rows": 4200, "errorCount": 31, "valid": false, "encoding": "shift_jis", "delimiter": "comma" } ] }
validis true only when every file was checked and no problem was found. With several files,encodinganddelimitershowmixedwhen they differ; each file's own values are infiles.
Input options
- Encoding and delimiter are detected for you (byte-order mark, valid UTF-8, then a statistical detector for Shift_JIS, Windows-1252, Windows-1251 and others; comma, semicolon, tab or pipe from the first lines). The REPORT shows what was read; set them yourself if the guess is wrong.
- First row is a header: turn off for files without one. Columns are then called
column1,column2, ... (or take the names fromexpectedColumns). - Maximum problems (
maxErrors, default 1,000, at most 10,000): checking stops once this many problems are found in the run and the REPORT saystruncated: true. Rows checked up to that point are charged; files after that point are not checked. File-wide row count rules are not judged on a truncated check.
FAQ
Does it change my file? No. It only reads it.
What counts as a row for the price? Each data row that was checked. The header row, blank lines and the problem rows in the output do not count. A file with no data rows, an empty file or a binary file costs nothing.
What happens when the maximum cost of the run is too low? Before checking a file, the Actor makes sure the budget covers the file fee and all its rows. If it does not, that whole file is skipped and the REPORT lists it as skipped. If no file fits, nothing is checked or charged and the run ends as Failed.
Is the regular expression safe to run on my data? Each pattern check has a time limit of 10 ms per cell and only cells up to 2,000 characters are matched; a longer cell is reported as failing. If a pattern is too slow on a value (for example nested repeats like (a+)+), that cell is reported as "could not be checked", and after three such cells pattern checks for that column stop. Simplify the pattern if you see this.
Dates? date uses Python-style patterns (%Y, %m, %d, %H, %M, %S, %b, %y, ...). A real calendar date is required (2025-02-30 fails).
Excel files? Not supported: save the sheet as CSV first. Excel workbooks, PDFs and other binary files are rejected for free.
Can I check several files in one run? Yes, up to 50 files or datasets. unique and duplicateRows work within one file.
Limits (cannot be raised by input)
- 50 MB per file; 50 files or datasets per run; 2,000,000 data rows per file or dataset
- A download is tried up to 3 times when the server is slow or answers with a temporary error (HTTP 429, 5xx); a clear error such as 404 is not retried. The timeout is 60 seconds per request
- Source URLs must be public
httporhttpslinks. Addresses on internal networks (localhost, private ranges, cloud metadata) are blocked, also after redirects - Text files only (CSV, TSV, semicolon or pipe separated)
- Up to 10,000 problems per run
More tools from the same developer
- Dataset Column Profiler — profile every column of a dataset or CSV: types, missing values, distinct counts, top values and statistics
- CSV Encoding Converter — detect the encoding of CSV and text files and convert them to UTF-8 (or another encoding)
- TSV to CSV Converter — convert between TSV, CSV, semicolon and pipe-delimited files, keeping quoted cells and line breaks intact
- Dataset Type Caster — turn text columns into real numbers, booleans and dates: currencies, 1,200 vs 1.200, and Japanese era dates
- CSV to JSON Converter — turn CSV files into typed JSON: encoding and delimiter detected, numbers and booleans typed, dotted headers nested, array, NDJSON or keyed output