Dataset Filter & Transform — JSON to CSV, Excel, Dedupe & Clean
Pricing
from $0.50 / 1,000 output rows
Dataset Filter & Transform — JSON to CSV, Excel, Dedupe & Clean
Filter, transform and convert Apify datasets, CSV/TSV/JSON/JSONL/Excel links, Google Sheets or inline rows: 26 transform steps, 25 filters, dedupe, sort. JSON to CSV, CSV to JSON, Excel. Works with limited permissions. $0.50 per 1,000 output rows; filtered-out rows, duplicates and file exports free.
Pricing
from $0.50 / 1,000 output rows
Rating
0.0
(0)
Developer
Salih Küçükkayış
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
18 days ago
Last modified
Categories
Features
Share
Filter, transform and convert Apify datasets, CSV, TSV, JSON, JSONL and Excel files, Google Sheets and inline JSON rows in one run: 26 transform steps (rename, compute, cast, replace, regex, dates, domains, hashes ...), 25 filter operators, remove duplicates, sort by several fields, pick and rename columns, and save the result as a dataset plus CSV, Excel, JSON and JSONL files for free. JSON to CSV, CSV to JSON and dataset to Excel are one run each.
$0.50 per 1,000 output rows. Rows removed by filters, removed duplicates, skipped rows and file exports are free.
Quick start
Press Start with the example input. It uses 10 fictional product listings given inline (no account data needed) and:
- turns prices like
"$89.99"into numbers, adds a price with 20% tax, the shop domain and a plain date (from three different date formats), - keeps listings that are in stock and cost less than 200,
- removes the duplicate listing (same SKU, different case),
- sorts by rating (highest first), then price,
- writes 8 chosen columns, renaming
seller.nametoseller, and saves a CSV and an Excel file.
{"rows": [{"title": "Trailblazer 40L Hiking Backpack", "sku": "NP-BP-040", "price": "$89.99", "inStock": true, "rating": 4.6,"url": "https://shop.northpeak.example/p/trailblazer-40?utm_source=feed","seller": {"name": "NorthPeak Outfitters", "country": "US"}, "listedAt": "2026-10-28T09:15:00Z"},"... 9 more rows ..."],"transforms": [{"op": "cast", "field": "price", "to": "number"},{"op": "compute", "field": "priceWithTax", "expression": "price * 1.2", "round": 2},{"op": "extractDomain", "field": "url", "into": "shop"},{"op": "dateFormat", "field": "listedAt", "format": "date"}],"filters": [{"field": "inStock", "operator": "isTrue"},{"field": "price", "operator": "lessThan", "value": 200}],"dedupeFields": ["sku"],"sortBy": ["rating desc", "price"],"outputFields": ["title", "sku", "price", "priceWithTax", "rating", "shop", "seller.name -> seller", "listedAt"],"exportFormats": ["csv", "xlsx"]}
The example run writes 6 rows from 10 (3 filtered out, 1 duplicate removed) and costs $0.003. One row:
{"title": "Trailblazer 40L Hiking Backpack","sku": "NP-BP-040","price": 89.99,"priceWithTax": 107.99,"rating": 4.6,"shop": "shop.northpeak.example","seller": "NorthPeak Outfitters","listedAt": "2026-10-28"}
Examples
JSON to CSV and Excel. Give a JSON or JSONL file link (or paste rows into rows), flatten nested objects into columns, and get data.csv and data.xlsx:
{"fileUrls": ["https://example.com/export/orders.json"],"flatten": true,"exportFormats": ["csv", "xlsx"]}
If the rows sit inside a JSON object ({"meta": {...}, "data": {"results": [...]}}), add "itemsPath": "data.results". Without it, the first list of objects in the file is used.
CSV to JSON. A CSV file or a Google Sheet in, typed JSON out:
{"fileUrls": ["https://docs.google.com/spreadsheets/d/<sheet-id>/edit#gid=0"],"transforms": [{"op": "cast", "field": "price", "to": "number"},{"op": "cast", "field": "active", "to": "boolean"}],"exportFormats": ["json", "jsonl"]}
Filter a scraper's dataset. Keep recent, well-rated results with a phone number, one per website:
{"datasetIds": ["<dataset ID of your scraper run>"],"filters": [{"field": "rating", "operator": "greaterOrEqual", "value": 4.5},{"field": "phone", "operator": "isNotEmpty"},{"field": "scrapedAt", "operator": "withinLastDays", "value": 7}],"transforms": [{"op": "extractDomain", "field": "website"}],"dedupeFields": ["domain"],"exportFormats": ["csv"]}
Transform and save as Excel. Clean names, build a full name, work out a margin, normalise dates and keep only the columns a spreadsheet needs:
{"datasetIds": ["<dataset ID>"],"transforms": [{"op": "trim", "fields": ["first", "last"]},{"op": "addField", "field": "name", "template": "{{first}} {{last}}"},{"op": "compute", "field": "margin", "expression": "(price - cost) / price * 100", "round": 1},{"op": "dateFormat", "field": "createdAt", "format": "DD/MM/YYYY"},{"op": "mapValues", "field": "country", "map": {"DE": "Germany", "FR": "France"}, "default": "Other"}],"filters": ["margin > 20"],"sortBy": ["-margin"],"outputFields": ["name", "email", "country", "margin", "createdAt -> created"],"exportFormats": ["xlsx"]}
What it does
Every step is optional. They run in this order:
- Read any number of sources, one after another into one table: Apify datasets (picked in the input, by ID, or as
username~dataset-name), public file links (CSV, TSV, JSON, JSONL / NDJSON, Excel .xlsx; Google Sheets, Google Drive and Dropbox share links are turned into download links) and rows given inline as JSON. - Clean up (optional, off unless set): trim spaces (on by default), lowercase fields, normalise URLs, extract a
domaincolumn from a website field, tag rows with_source. - Transform steps, in the order you list them (see below).
- Filter with any number of conditions; all must match (AND) or any (OR).
- Remove duplicates by one or more fields, or rows that are exact copies. The first row of each group is kept (or the last). The removed rows can be saved to their own dataset, free.
- Join (VLOOKUP) with a second table by a key field, if you set one.
- Sort by one or more fields.
- Output columns: flatten nested objects, then pick, order and rename columns.
- Skip the first rows and limit the number of output rows.
- Write the rows to the dataset and, if you ask for them, to
data.csv,data.xlsx,data.jsonanddata.jsonlin the key-value store. TheOUTPUTrecord has the download links and a summary.
Transform steps
Each step is an object with op and its settings. Steps that change a value write the result back to field, or to a new column when you give into. Dotted names read nested values (seller.name); writing to a dotted name updates the nested value when its parent object exists, otherwise it creates a column with that name.
| op | Settings | What it does |
|---|---|---|
rename | from, to (or fields: {"old": "new"}) | Renames a field; a top-level column keeps its position |
drop | fields | Removes fields |
keep | fields | Keeps only these fields, in this order |
copy | from, to | Copies a value to another field |
setField | field, value | Sets a fixed value (text, number, list, object) |
default | field, value | Fills the field when it is missing or empty |
addField | field, template | Text from a template: "{{first}} {{last}}", "{{seller.name}}" |
compute | field, expression, round | Arithmetic over fields: + - * / %, parentheses, abs min max round floor ceil; {{unit price}} for names with spaces |
cast | field, to, into | number, integer, string or boolean (yes/no, 1/0, true/false) |
trim, uppercase, lowercase | field or fields, into | Text and lists of text; trim without a field trims every text field |
replace | field, search, replacement, regex, caseSensitive, into | Replaces text; with regex: true the replacement can use $1, $<name>, $& |
regexExtract | field, pattern, group, all, into | The first match (group 1 when the pattern has groups), null when nothing matches; all: true gives a list |
split | field, separator (,), index, into | A list of trimmed parts, or the part at index (negative counts from the end) |
joinArray | field, separator (, ), into | A list becomes text |
substring | field, start, length, into | Part of the text; a negative start counts from the end |
round | field, decimals (0), into | Rounds half up (2.5 becomes 3) |
coalesce | fields, into | The first value that is not empty |
dateFormat | field, format, into | iso, date, datetime, time, unix, unixMs, or a pattern like DD/MM/YYYY, MMM D, YYYY h:mm A (text in [brackets] stays as is) |
dateDiff | from, to (a field, now or today; default now), unit, into (dateDiff) | to minus from in days, hours, minutes, seconds or weeks, 2 decimals |
extractDomain | field, into (domain) | The domain of a URL or an e-mail address, lowercase, without www. |
mapValues | field, map, default, into | Replaces values by a lookup table: exact match first, then ignoring case and spaces; unmatched values stay unless default is set |
hash | fields, algorithm (sha256, sha1, md5, sha512), into (hash) | A hash of the values joined with |, e.g. an anonymous ID |
parseJson | field, into | JSON text becomes an object or list |
length | field, into (<field>_length) | Characters of text, items of a list (0 when empty) |
Dates are read from ISO 8601 (with or without time and offset), Unix seconds and milliseconds, e-mail/RSS dates and dates with month names (Jan 5, 2026, 5 January 2026). For numeric dates like 05/01/2026, a part above 12 is the day; otherwise they are read month first; dots (05.01.2026) are always day first. Times without an offset count as UTC.
compute has its own small parser: only numbers, field names, the operators above and those six functions are accepted, and nothing from the input runs as code. A missing input field, text that is not a number or a division by zero gives null. When values cannot be converted (a cast to number, a date that cannot be read, invalid JSON), the OUTPUT warnings say how many, per step.
Filters
Conditions are objects {"field", "operator", "value"}, or text like "price < 50".
| Operator | Value | Keeps rows where the field ... |
|---|---|---|
equals, notEquals | text or number | equals / does not equal the value ("1,200" equals 1200) |
contains, notContains | text | contains / does not contain the text |
startsWith, endsWith | text | starts / ends with the text |
greaterThan, lessThan, greaterOrEqual, lessOrEqual | number or text | compares as numbers when both are numbers, as text otherwise (ISO dates compare correctly) |
between | [min, max] | is between min and max, both included (numbers, dates or text) |
isEmpty, isNotEmpty | none | is missing, null, blank text, an empty list / is not |
isTrue, isFalse | none | is true / false (also yes/no, 1/0) |
matchesRegex | pattern | matches the regular expression |
in, notIn | list, or comma-separated text | is / is not one of the values |
arrayContains | text or number | is a list with an item equal to the value |
lengthGreaterThan, lengthLessThan | number | has more / fewer characters (text) or items (list) |
dateAfter, dateBefore | a date, today or now | is a date after / before it |
withinLastDays, olderThanDays | number of days | is a date in the last N days / older than N days |
Text comparisons ignore case and spaces around the values; add "caseSensitive": true to a condition to compare exactly. A list field matches when any item matches. With Read prices and amounts as numbers (on by default), "$1,234.50", "49 USD", "15%" and "(300)" (= -300) count as numbers in filters, sorting, compute and cast. The short names (eq, neq, gt, gte, lt, lte, regex, empty, not_empty) and symbols (==, !=, >, >=, <, <=) work too.
Text conditions use field operator value: "price >= 10", "country == DE", "title contains shoe", "title not contains used", "url starts with https", "email ends with .example", "phone is empty", "phone is not empty".
Sort, columns and files
- Sort by one or more keys, the first decides first:
"price","price desc","-price"or{"field": "price", "direction": "desc"}. Numbers sort as numbers, text from A to Z ignoring case, and empty values go last for every key. - Output columns pick, order and rename:
["title", "price", "seller.name -> seller"]. A field a row does not have is written as null, so every row has the same columns, which is what CSV and Excel files need. Filters, dedupe and sort use the field names from before this step. - Flatten nested objects turns
{"seller": {"name": "X"}}into aseller.namecolumn. Lists stay lists; in CSV and Excel they are written as JSON text. - Files (free):
data.csv(UTF-8 with BOM, opens cleanly in Excel),data.xlsx(header row frozen),data.jsonanddata.jsonl. Values that look like a spreadsheet formula (starting with=,+,-,@) get a'in front in CSV and Excel files so nothing in the data runs as a formula; plain numbers like-12.5stay as they are.
Already using nerolabs/dataset-filter-transform or humble-echidna/dataset-transform? Paste the same input
This Actor reads the input field names of those two Actors (and of lukaskrivka/dedup-datasets), so you can try it with the input you already have. The format is recognised from fields that only that input has; the run log and the inputFormat field of the OUTPUT record say which one was used. The three Actors are made by other developers and are independent of this one; the tables below describe how this Actor reads each field.
nerolabs/dataset-filter-transform
| Field | Read here as |
|---|---|
datasetId, fileUrl, data | The dataset, the file link, the inline rows |
fileFormat | The file format (auto detects it) |
transforms | Transform steps: the 26 ops above, with these setting names |
filters, filterCombineMode | Conditions with operator; AND or OR |
caseSensitiveFilters, lenientNumbers | The default for text comparisons; reading "$1,234.50" as a number |
distinctBy | One row per combination of these fields (the first), ignoring case and extra spaces |
sortBy | Several keys: {"field", "direction"} objects or "-field" |
offset, limit | Applied after sorting; skipped rows are not charged |
maxItems | The most rows read from the sources |
outputDatasetName | A copy of the output rows goes to this named dataset too (created if needed, free) |
exportFormats | csv, xlsx (and json, jsonl) |
webhookUrl | At the end, a POST with a JSON summary and the download links (10-second timeout; a failed webhook does not fail the run) |
humble-echidna/dataset-transform
| Field | Read here as |
|---|---|
datasetId, fileUrl, items | The dataset, the file link, the inline rows |
fileFormat, itemsPath, csvDelimiter, sheetName, headerRow | Reading files: the format, where the rows are inside a JSON object, a fixed CSV delimiter, the Excel sheet, the row that holds the column names (Excel and CSV) |
filters, filterMode | Text conditions (==, !=, >, >=, <, <=, contains, not contains, starts with, ends with, is empty, is not empty); all or any |
dedupeBy | Fields (a list or comma-separated text) compared exactly; "*" compares the whole row; rows whose fields are all empty are kept |
sortBy | "field" or "field desc", several keys |
fields | Output columns in this order, "field -> new name" renames, a missing field is null |
flatten | Nested objects become dotted columns |
exportFormat | none, csv or jsonl |
csvFormulaSafe | On by default; off writes text starting with =, +, -, @ unchanged |
maxResults | The most output rows |
For both, values are not trimmed unless a step or condition does it. A setting that cannot be applied (for example an unknown transform op or filter operator) stops the run before anything is written, with a message that names it; smaller differences are noted in the log and in the OUTPUT warnings.
Merge, dedupe and join
For merging many datasets and files, removing duplicates and joining tables, use the sibling Actor Dataset Merge, Dedupe, Filter & Join. This Actor includes the same merge, dedupe and join features (they are in the lower sections of the input), so one run can do both.
Use it after a scraper
Add it as an integration on another Actor or task ("Run Actor" after a successful run) and every new result is filtered and converted automatically:
{"datasetIds": ["{{resource.defaultDatasetId}}"],"filters": [{"field": "price", "operator": "isNotEmpty"}],"transforms": [{"op": "cast", "field": "price", "to": "number"}],"exportFormats": ["csv", "xlsx"]}
Limited permissions
The Actor is built to run with limited permissions: it reads only the datasets you give it in the input (the dataset fields are declared as dataset inputs, so the platform grants the run read access to them) and writes only to its own run storages and to the named dataset you ask for. If a dataset cannot be read, the run stops before writing anything and says which one, and how to pass it.
Pricing
| Run | Price |
|---|---|
| The example run (6 output rows) | $0.003 |
| JSON to CSV and Excel, 1,000 rows | $0.50 |
| A 10,000-row scraper dataset filtered down to 2,500 rows, with CSV and Excel files | $1.25 |
| A 50,000-row dataset, 8,000 duplicates removed, 42,000 rows written | $21.00 |
| Charged | Free |
|---|---|
| Each row written to the output dataset: $0.50 per 1,000 ($0.0005 per row) | Rows filtered out, duplicates removed, rows skipped, the duplicates dataset, the copy to a named dataset, CSV / Excel / JSON / JSONL files |
maxRows caps the price. The run also stops cleanly at your spending limit and still writes the files and the summary for the rows it wrote.
Input fields
All fields of the input form, plus these fields, which you can set in the JSON input or through the API: fileFormat (csv, tsv, json, jsonl, xlsx; default automatic), itemsPath, csvDelimiter, headerRow, caseSensitiveFilters, maxInputRows (the most rows read), outputDatasetName, webhookUrl and csvFormulaSafe. sortBy is a list (["employees desc"]), also when you reuse an input of Dataset Merge, where it is a single text.
Limits and good to know
- Size: without sorting and without "keep last", rows stream through and only a small fingerprint per dedupe key stays in memory, so large datasets (millions of rows) are limited mainly by run time. Sorting and keeping the last duplicate hold the filtered rows in memory: up to about 400 rows per MB of run memory (about 400,000 rows at the default 1 GB). Above that, the run stops before writing anything, so nothing is charged, and says so; raise the memory or narrow the filters.
- Files are downloaded to disk (up to 100 MB each) and read in full before anything is written, so a broken file stops the run before any row is charged. Text files can be UTF-8, UTF-16 or Windows-1252. Excel files that unpack to more than about 1 GB are refused, and an Excel file holds at most 1,048,576 rows (bigger outputs are complete in the dataset, CSV, JSON and JSONL).
- Datasets are read in pages of 5,000 rows. The run stops about 3 minutes before its timeout and keeps everything written so far; raise the timeout for very large inputs.
- Google Sheets must be shared as "Anyone with the link can view" (or published to the web). The tab in the link (
gid) is the one read. - Values from CSV and Google Sheets are text; filters, sorting and
computestill treat numbers as numbers. Usecastto write real numbers and booleans. - Only public file links are downloaded, and the webhook only goes to public addresses; private and internal network addresses are blocked. Links to (and redirects through) YouTube, TikTok, Instagram, Facebook, X/Twitter, LinkedIn, Reddit and the Amazon store are refused; files on Amazon S3 / AWS are fine.
- Regular expressions (in filters,
replaceandregexExtract) give up on a value after 0.05 seconds (patterns with nested repeats like(a|aa)+can take forever); a filter counts it as no match, a step leaves the value unchanged, and theOUTPUTwarnings say how often that happened. - The example settings: the input form opens with example rows and example settings (steps, filters, dedupe by
sku, sort, output columns). When you add your own datasets or file links and leave the example rows in place, the example rows and every example setting still at its example value are ignored, and the log says which. To use one of those settings on your own data, clear the example rows first.
FAQ
How do I convert JSON to CSV? Put the JSON file link in fileUrls (or paste the rows into rows), keep csv in Also save as files, and turn on Flatten nested objects if the rows have nested objects. The CSV link is in the OUTPUT record and in the run's Storage tab. The dataset itself can also be downloaded as CSV, Excel, JSON or XML from the Apify Console.
How do I filter an Apify dataset? Pick the dataset in Apify datasets, add conditions to Filters, and run. Only the rows that pass are written and charged.
Can I rename columns for the CSV? Yes, in Output columns: "Company Name -> company". Or with a rename step, which also changes the name the filters use.
Which duplicate is kept? The first one in source order (datasets, then files, then inline rows), or the last one with Keep: Last row.
Can an AI agent use it? Yes, through the Apify MCP server: give it rows inline or dataset IDs and ask for "keep rows where price is under 50 and save as Excel".
More from this developer
- Dataset Merge, Dedupe, Filter & Join: merge datasets, CSV, Excel and Google Sheets, remove duplicates and join tables.
- Bulk HTTP Requests: call any API once for every row of a CSV, JSON list or Apify dataset.
- Sitemap Extractor: every URL a website lists in its sitemaps.
- Tech Stack Detector: CMS, ecommerce platform, analytics and hosting of a list of websites.
Code examples (curl, Python, Node.js, n8n) for this and the other Actors: github.com/msalihk/apify-actor-examples.
Questions or a missing feature: open an issue on the Actor page.
Need a custom version? I also build custom Actors, changes to this one, and n8n or Make integrations around them, for a fixed price. Open an issue on the Actor page starting with "Custom request", or email support@saligasoftware.com, with what you need and an example input.