Dataset Filter & Transform — JSON to CSV, Excel, Dedupe & Clean avatar

Dataset Filter & Transform — JSON to CSV, Excel, Dedupe & Clean

Pricing

from $0.50 / 1,000 output rows

Go to Apify Store
Dataset Filter & Transform — JSON to CSV, Excel, Dedupe & Clean

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ış

Salih Küçükkayış

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

18 days ago

Last modified

Categories

Features

Limited permissions

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:

  1. 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),
  2. keeps listings that are in stock and cost less than 200,
  3. removes the duplicate listing (same SKU, different case),
  4. sorts by rating (highest first), then price,
  5. writes 8 chosen columns, renaming seller.name to seller, 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:

  1. 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.
  2. Clean up (optional, off unless set): trim spaces (on by default), lowercase fields, normalise URLs, extract a domain column from a website field, tag rows with _source.
  3. Transform steps, in the order you list them (see below).
  4. Filter with any number of conditions; all must match (AND) or any (OR).
  5. 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.
  6. Join (VLOOKUP) with a second table by a key field, if you set one.
  7. Sort by one or more fields.
  8. Output columns: flatten nested objects, then pick, order and rename columns.
  9. Skip the first rows and limit the number of output rows.
  10. Write the rows to the dataset and, if you ask for them, to data.csv, data.xlsx, data.json and data.jsonl in the key-value store. The OUTPUT record 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.

opSettingsWhat it does
renamefrom, to (or fields: {"old": "new"})Renames a field; a top-level column keeps its position
dropfieldsRemoves fields
keepfieldsKeeps only these fields, in this order
copyfrom, toCopies a value to another field
setFieldfield, valueSets a fixed value (text, number, list, object)
defaultfield, valueFills the field when it is missing or empty
addFieldfield, templateText from a template: "{{first}} {{last}}", "{{seller.name}}"
computefield, expression, roundArithmetic over fields: + - * / %, parentheses, abs min max round floor ceil; {{unit price}} for names with spaces
castfield, to, intonumber, integer, string or boolean (yes/no, 1/0, true/false)
trim, uppercase, lowercasefield or fields, intoText and lists of text; trim without a field trims every text field
replacefield, search, replacement, regex, caseSensitive, intoReplaces text; with regex: true the replacement can use $1, $<name>, $&
regexExtractfield, pattern, group, all, intoThe first match (group 1 when the pattern has groups), null when nothing matches; all: true gives a list
splitfield, separator (,), index, intoA list of trimmed parts, or the part at index (negative counts from the end)
joinArrayfield, separator (, ), intoA list becomes text
substringfield, start, length, intoPart of the text; a negative start counts from the end
roundfield, decimals (0), intoRounds half up (2.5 becomes 3)
coalescefields, intoThe first value that is not empty
dateFormatfield, format, intoiso, date, datetime, time, unix, unixMs, or a pattern like DD/MM/YYYY, MMM D, YYYY h:mm A (text in [brackets] stays as is)
dateDifffrom, to (a field, now or today; default now), unit, into (dateDiff)to minus from in days, hours, minutes, seconds or weeks, 2 decimals
extractDomainfield, into (domain)The domain of a URL or an e-mail address, lowercase, without www.
mapValuesfield, map, default, intoReplaces values by a lookup table: exact match first, then ignoring case and spaces; unmatched values stay unless default is set
hashfields, algorithm (sha256, sha1, md5, sha512), into (hash)A hash of the values joined with |, e.g. an anonymous ID
parseJsonfield, intoJSON text becomes an object or list
lengthfield, 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".

OperatorValueKeeps rows where the field ...
equals, notEqualstext or numberequals / does not equal the value ("1,200" equals 1200)
contains, notContainstextcontains / does not contain the text
startsWith, endsWithtextstarts / ends with the text
greaterThan, lessThan, greaterOrEqual, lessOrEqualnumber or textcompares 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, isNotEmptynoneis missing, null, blank text, an empty list / is not
isTrue, isFalsenoneis true / false (also yes/no, 1/0)
matchesRegexpatternmatches the regular expression
in, notInlist, or comma-separated textis / is not one of the values
arrayContainstext or numberis a list with an item equal to the value
lengthGreaterThan, lengthLessThannumberhas more / fewer characters (text) or items (list)
dateAfter, dateBeforea date, today or nowis a date after / before it
withinLastDays, olderThanDaysnumber of daysis 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 a seller.name column. 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.json and data.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.5 stay 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

FieldRead here as
datasetId, fileUrl, dataThe dataset, the file link, the inline rows
fileFormatThe file format (auto detects it)
transformsTransform steps: the 26 ops above, with these setting names
filters, filterCombineModeConditions with operator; AND or OR
caseSensitiveFilters, lenientNumbersThe default for text comparisons; reading "$1,234.50" as a number
distinctByOne row per combination of these fields (the first), ignoring case and extra spaces
sortBySeveral keys: {"field", "direction"} objects or "-field"
offset, limitApplied after sorting; skipped rows are not charged
maxItemsThe most rows read from the sources
outputDatasetNameA copy of the output rows goes to this named dataset too (created if needed, free)
exportFormatscsv, xlsx (and json, jsonl)
webhookUrlAt 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

FieldRead here as
datasetId, fileUrl, itemsThe dataset, the file link, the inline rows
fileFormat, itemsPath, csvDelimiter, sheetName, headerRowReading 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, filterModeText conditions (==, !=, >, >=, <, <=, contains, not contains, starts with, ends with, is empty, is not empty); all or any
dedupeByFields (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
fieldsOutput columns in this order, "field -> new name" renames, a missing field is null
flattenNested objects become dotted columns
exportFormatnone, csv or jsonl
csvFormulaSafeOn by default; off writes text starting with =, +, -, @ unchanged
maxResultsThe 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

RunPrice
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
ChargedFree
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 compute still treat numbers as numbers. Use cast to 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, replace and regexExtract) 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 the OUTPUT warnings 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

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.