Dataset Merge, Dedupe & Transform (datasets, JSON, CSV) avatar

Dataset Merge, Dedupe & Transform (datasets, JSON, CSV)

Pricing

from $0.40 / 1,000 row outputs

Go to Apify Store
Dataset Merge, Dedupe & Transform (datasets, JSON, CSV)

Dataset Merge, Dedupe & Transform (datasets, JSON, CSV)

Merge Apify datasets and JSON/CSV/JSONL URLs into one clean dataset. Dedupe by any fields, filter rows, pick, drop or rename fields. Pay only per row written.

Pricing

from $0.40 / 1,000 row outputs

Rating

0.0

(0)

Developer

frank zhang

frank zhang

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Security

Limited permissions

Share

Dataset Merge, Dedupe & Transform

Combine several Apify datasets and JSON / CSV / JSONL files into one clean dataset: merge, remove duplicates by the fields you choose, filter rows, pick / drop / rename fields — in one run, with no code.

What it does

  1. Reads any mix of Apify dataset IDs (or names) and public http(s) URLs to JSON, JSONL or CSV files (CSV delimiter auto-detected: , ; tab |).
  2. Filters rows with simple rules (eq, contains, gt, regex, in, exists, …), combined with AND or OR.
  3. Dedupes by one or more fields (dot paths like address.city work), or by the whole item. Keeps the first or last occurrence. Values can be normalised (trim + lower-case) so Ana@Example.com = ana@example.com.
  4. Transforms: pick fields, omit fields, rename fields (nested → flat supported), optionally add _source.
  5. Writes the result to the run's default dataset (or a named dataset in your account, created if missing and appended to if it exists) and a SUMMARY record in the key-value store.

Typical uses: combine runs of the same scraper, dedupe leads across sources, clean a CSV export before import, trim a big dataset to the columns you need.

Input

FieldTypeDefaultNotes
datasetIdsdataset picker (array)–Pick datasets from your account, or paste IDs / username~dataset-name. The run gets read-only access to exactly these datasets
sourceUrlsrequest list–Public JSON / JSONL / CSV URLs
csvDelimiterstringautoForce a CSV delimiter
dedupeModefields / fullItem / nonefields
dedupeFieldsarray–Required when mode = fields
keepfirst / lastfirstlast holds unique rows in memory
normalizeDedupeValuesbooleantrueTrim + lower-case before comparing
filtersarray of {field, op, value, caseSensitive}–Ops: eq, neq, contains, not_contains, starts_with, ends_with, gt, gte, lt, lte, exists, not_exists, empty, not_empty, regex, in, not_in
filterModeall / anyallAND / OR
pickFields / omitFieldsarray–Dot paths allowed
renameFieldsobject–e.g. {"address.city": "city"}
addSourceFieldbooleanfalseAdds _source
maxItemsinteger0 (no limit)Stop after N output rows (reading stops too, so no extra scan charges; with keep: last all rows are read first)
outputDatasetNamestring–Write to a named dataset instead of the default
maxSourceMbinteger200Per-URL download limit

Example:

{
"datasetIds": ["crm-export"],
"sourceUrls": [{"url": "https://example.com/leads.csv"}, {"url": "https://example.com/more.json"}],
"dedupeFields": ["email"],
"filters": [{"field": "age", "op": "gte", "value": 18}],
"pickFields": ["name", "email", "age", "address.city"],
"renameFields": {"address.city": "city"},
"addSourceField": true
}

Output example

[
{"name": "Ivy Tan", "email": "ivy@example.com", "age": 45, "city": "Montreal", "_source": "crm-export"},
{"name": "Cleo Park", "email": "cleo@example.com", "age": 29, "city": "Lyon", "_source": "https://example.com/more.json"}
]

SUMMARY (key-value store): itemsRead, filteredOut, duplicatesRemoved, itemsOutput, sourceErrors, stoppedEarly, outputDataset, chargedEvents, and a per-source status list.

Why pay instead of the free dedup-datasets?

lukaskrivka/dedup-datasets is free (you pay only platform usage) and excellent for merging and deduping Apify datasets at very large scale. If that is all you need, use it. Pay for this Actor only if you need one of these:

  • CSV, JSON and JSONL files from URLs, not just Apify datasets. Mix both in one run.
  • No-code filtering and reshaping: 17 filter operators, plus pick, drop and rename of fields (dot paths work). The free Actor needs JavaScript transform functions for this.
  • Forgiving match rules out of the box: trims spaces, ignores case and treats 1 and 1.0 as equal when comparing dedupe fields. The free Actor compares exact values (normalising needs your own JavaScript).
  • Keep the last duplicate instead of the first (keep: last), e.g. to keep the newest version of each URL. The free Actor keeps the first.

Neither Actor does fuzzy (similarity) matching. The free Actor also has things this one does not: loading all runs of an Actor or Task, output to key-value store records, outputting only the duplicates, and an "only new items" filter dataset.

Pricing (pay per event)

EventPriceWhen
Row output$0.0004 per row ($0.40 per 1,000)Each row written to the output dataset
Rows scanned$0.001 per started 1,000 rows readCovers reading large inputs that produce few rows
Actor start$0.00005Once per run (up to 1 GB memory; +$0.00005 per extra GB)

Cost examples

Exact charges at the prices above (Actor start $0.00005 per run at up to 1 GB memory; +$0.00005 per extra GB):

JobRows writtenStarted 1,000-row blocks readTotal
Scan 100,000 rows, write 10,000 unique10,000 × $0.0004 = $4.00100 × $0.001 = $0.10$4.10005 (incl. $0.00005 start)
Scan 100,000 rows, write 100,000 (no duplicates)100,000 × $0.0004 = $40.00100 × $0.001 = $0.10$40.10005
Merge 10,000 rows into 6,000 unique$2.4010 × $0.001 = $0.01$2.41005
Scan 1,000,000 rows, keep 5,000$2.001,000 × $0.001 = $1.00$3.00005
Scan 250 rows, write 45$0.0181 × $0.001$0.01905
Scan 250 rows, write all 250$0.101 × $0.001$0.10105

Run compute is included in these prices (no separate platform-usage charge). Set Max total charge on the run to cap spend; the Actor stops cleanly when the cap is reached.

Limits

  • keep: first streams rows out and keeps only a 32-character hash per unique key in memory (roughly 100–150 MB per 1M unique keys).
  • keep: last must hold every unique row in memory until the end; for millions of rows use keep: first or raise memory (max 4 GB).
  • Remote files are downloaded whole (default limit 200 MB each); use more memory for very large files.
  • Only http(s) URLs. Private URLs that need auth headers are not supported; load those into an Apify dataset first.
  • CSV values stay strings; numeric filters (gt, lt, …) compare numeric strings as numbers.
  • One failing source does not fail the run; it is listed in SUMMARY.sources with the reason (e.g. dataset not found or not accessible, HTTP Error 404). The run fails only if every source fails.