Data Ops: Convert, Clean, Validate, Compare Files
Pricing
from $4.00 / 1,000 file converteds
Data Ops: Convert, Clean, Validate, Compare Files
Convert CSV, Excel, JSON, XML, PDF and Office files. Clean CSV data, validate rows with rules or JSON Schema, compare two files by key columns, and make PDF or DOCX documents from templates. Works in bulk.
Pricing
from $4.00 / 1,000 file converteds
Rating
0.0
(0)
Developer
APIzilla
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Data Ops API: Convert, Clean, Validate, Compare Files
Data Ops API is one tool for everyday file work. It runs fully on Apify. You do not need a server.
It can:
- Convert files: CSV, TSV, Excel (XLSX, XLS), ODS, JSON, JSON Lines, XML, HTML tables and Parquet. It also turns Word, Excel and PowerPoint files into PDF. It can read text and tables from PDF files (BETA).
- Clean CSV and Excel data: remove duplicates, trim spaces, fix broken characters, and make dates, phone numbers and emails look the same.
- Validate rows with simple rules or a JSON Schema. You get a clear report that says which row and which column has a problem.
- Compare two files by key columns, like
idorsku. You get an Excel report. New rows are green, removed rows are red, changed cells are yellow. - Generate documents from a template and your data. Use an HTML, DOCX or XLSX template. Make one PDF or DOCX per row, or one document for all rows.
Every operation works in bulk. Send many files or many rows in one run.
How to use it
- Pick an Operation.
- Add your input. You can use one or more of these:
- File links: public links to your files.
- Inline files: small files pasted into the input.
- Records: rows as a JSON list.
- Key-value store and keys: files you saved in Apify.
- Dataset: an Apify dataset, used as a table.
- Set the options for your operation.
- Click Start.
What you get
- One result row per file (or per document). Each row has a status, a message, a download link and any errors.
- All output files are saved in the run's key-value store. The Download link in each row opens the file.
- A
SUMMARYrecord with the totals.
If a file fails, the other files still run. You are never charged for a failed file.
Examples
Convert a CSV file to Excel
{"operation": "convert","fileUrls": ["https://example.com/customers.csv"],"targetFormat": "xlsx"}
The delimiter (comma, semicolon, tab or pipe) and the text encoding are found for you.
Turn Word files into PDF
{"operation": "convert","fileUrls": ["https://example.com/letter.docx", "https://example.com/report.pptx"],"targetFormat": "pdf"}
Clean a CSV file
{"operation": "clean","fileUrls": ["https://example.com/leads.csv"],"removeDuplicates": "exact","emailColumns": ["email"],"phoneColumns": ["phone"],"phoneRegion": "US","dateColumns": ["signup date"],"dateFormat": "YYYY-MM-DD","headerStyle": "snake_case"}
Validate rows
{"operation": "validate","fileUrls": ["https://example.com/orders.csv"],"requiredColumns": ["id", "email"],"rules": [{ "column": "id", "required": true, "type": "integer", "unique": true },{ "column": "email", "required": true, "type": "email" },{ "column": "country", "allowedValues": ["US", "GB", "DE"] },{ "column": "amount", "type": "number", "min": 0 }]}
Rule fields: column, required, type (string, integer, number, boolean, date, email, url, phone), pattern, min, max, minLength, maxLength, allowedValues, unique, dateFormat, phoneRegion, caseSensitive.
You can also use jsonSchema instead of rules, or together with them.
The report says things like: Row 6, column "email": "abc" is not a valid email address. Row 1 is the header, so the first data row is row 2.
Compare two files
{"operation": "compare","fileUrls": ["https://example.com/stock-monday.csv", "https://example.com/stock-tuesday.csv"],"keyColumns": ["sku"]}
The first file is the old one. The second file is the new one. For many comparisons, add files in pairs: 1st with 2nd, 3rd with 4th, and so on.
Make one PDF invoice per row
{"operation": "generate-document","templateHtml": "<h1>Invoice {{ id }}</h1><p>Customer: {{ name }}</p><p>Total: {{ total }} EUR</p>","records": [{ "id": 1, "name": "Anna", "total": 120 },{ "id": 2, "name": "Ben", "total": 80 }],"documentFormat": "pdf","fileNameTemplate": "invoice-{{ id }}"}
For a DOCX template, write {{ name }} in the Word file and give it with templateUrl. For an XLSX template, write {{ name }} in a cell. If a column name has spaces, use {{ row['Full Name'] }}.
Supported conversions
| From | To |
|---|---|
| CSV, TSV, XLSX, XLS, ODS, JSON, JSON Lines, XML, HTML table, Parquet, records, dataset | CSV, TSV, XLSX, JSON, JSON Lines, XML, HTML, Parquet, PDF |
| DOCX, DOC, ODT, RTF | PDF, DOCX, ODT, RTF |
| PPTX, PPT, ODP | PDF, PPTX, ODP |
| XLSX, XLS, ODS | also PDF (page layout from the file) and ODS |
| HTML page | |
| PDF (BETA) | TXT (text), or CSV, XLSX, JSON, HTML (tables) |
Safety
- Only public
httpandhttpslinks are downloaded. Links to private or local networks are blocked. - Files bigger than Max file size are skipped. Packed files (like XLSX and DOCX) are checked before they are opened, so files that unpack to a huge size are rejected.
- XML is read in a safe way that blocks known XML attacks.
- Macros in Office files are never run. Macro parts are removed before conversion.
- Templates run in a sandbox. In HTML templates, images and styles load only from public links.
- Text that starts with
=is saved as text in Excel files, not as a formula.
Limits
- PDF reading is BETA. Scanned PDFs (images of text) are not supported. Tables without lines need
pdfTableMode: "text", and the result may need a check. - Office to PDF uses LibreOffice. The look can differ a little from Microsoft Office, mostly when a font is missing.
- XLSX templates fill
{{ placeholders }}in cells. Loops over rows are not supported in XLSX templates. Images and charts in XLSX templates may be lost. - Excel files can hold at most 1,048,575 rows. Use CSV for bigger tables.
- In compare reports, old values are shown as cell notes for the first 20,000 changed cells. All changes are still in the JSON report.
- The default memory is 1 GB. For files with more than 100,000 rows, or for many Office files, use 2 to 4 GB.
Cost
You pay only for what you use. You are never charged for a file that fails.
| What you pay for | Price |
|---|---|
| Run start (per GB of memory) | $0.00005 |
| One data file converted (CSV, Excel, JSON, XML and more) | $0.004 |
| One Office or HTML file turned into PDF or another document format | $0.015 |
| One PDF page read (text or tables, BETA) | $0.005 |
| 1,000 rows cleaned | $0.75 |
| 1,000 rows validated | $0.75 |
| One validation report | $0.01 |
| One comparison of two files | $0.01 |
| 1,000 rows compared | $0.05 |
| One document made from a template (up to 10 pages) | $0.006 |
| Each page after page 10 of a made document | $0.0005 |
When a DOCX or XLSX template is turned into a PDF, you pay for the document ($0.006) and for the PDF step ($0.015).
Examples:
- Convert 100 CSV files to Excel: about $0.40.
- Clean a file with 10,000 rows: about $7.50.
- Make 100 PDF invoices from an HTML template: about $0.60.
You can set a maximum cost per run. The run stops when it reaches that limit.
Use it from code
You can start this Actor with the Apify API, the Apify client for JavaScript or Python, or from Make, Zapier, n8n and AI agents (MCP). The results are in the default dataset. The files are in the default key-value store.