Merge & Dedup Datasets — Combine, Remove Duplicates, Diff
Pricing
from $0.04 / 1,000 row writtens
Merge & Dedup Datasets — Combine, Remove Duplicates, Diff
Merge Apify datasets and CSV, JSON or Excel files into one, deduplicate by key fields (case, accents, URL, email and phone aware), keep only new items since the last run, or diff two runs: new, changed and removed rows. Export to JSON, CSV or Excel, or via API.
Pricing
from $0.04 / 1,000 row writtens
Rating
0.0
(0)
Developer
Steady Scrape
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
16 days ago
Last modified
Categories
Features
Share
Merge & Dedup Datasets — combine datasets, remove duplicates, diff runs
Merge datasets from your Apify runs and data files (CSV, TSV, JSON, JSON Lines, Excel) into one dataset and
remove duplicates by the fields you name — compared the way people mean them: ignoring case, spaces and accents,
links compared without www, trailing slashes or utm_* tags, emails in any case, phones by their digits. Run it
again later in only-new mode to get just the rows you have not seen before, or in diff mode to see what is
new, what changed (and from what) and what disappeared since the last run.
- Every source in one place: pick datasets in the form, paste file links (a shared Google Sheet works), or pick a key-value store whose records are data files. Gzipped files are unpacked.
- Duplicates by key fields, normalised per field:
websitecompared as a link,emailas an email,nameignoring case and accents — or no key at all, to drop only rows identical in every field. - You choose which duplicate stays: the first seen, the last seen, the one with most fields filled, or the newest by a date field — and optionally fill its empty fields from the others, so three partial rows become one full row.
- Each row says where it came from (
_source: the dataset, the file link with any token masked, or the record). - Only new rows since the last run, for a scraper on a schedule: the seen keys are kept under a history name you choose, so one Actor serves many monitors.
- A diff between runs: each row tagged
new,changed(with the changed fields and their previous values) orremoved; the fields a scraper stamps on every run (scrapedAt…) are ignored, and you can add your own. - Light clean-up on the way: rename columns so differently named sources line up, keep or drop fields, flatten nested objects into spreadsheet columns, and filter rows (equals, contains, is empty, greater than, less than).
- A source that cannot be read costs nothing: a dead link, a web page instead of a file, a PDF, a file over your size limit, an empty dataset — the run goes on with the other sources and the summary says what happened to each.
Use cases
- Merge the runs of one scraper over many searches into one list without the items several searches found.
- Get only the new items of a scheduled scrape: new job ads, new posts, new listings, new reviews since yesterday.
- Monitor changes: prices, ranks, stock, ratings — what moved since the last run, and from what value.
- Combine leads from several sources (a Maps scrape, a directory, a CSV from a client) and keep one row per website or email, with the fullest data.
- Clean an export before it goes to a spreadsheet or a CRM: renamed, filtered, flattened, without duplicates.
How to merge datasets and remove duplicates
| field | what it does |
|---|---|
datasets | Pick the datasets to merge (your runs' results, imports, earlier merges). Picking is what lets the run read them; through the API, give dataset ids or username~name. |
fileUrls | Links to CSV, TSV, JSON, JSON Lines or .xlsx files, gzipped or not. A Google Sheet link is read as its CSV export (the tab of the link); a Console link to a dataset is read as that dataset. |
keyValueStore, recordKeys | Pick a key-value store and name its records that hold data files; with no names, every data record (not its INPUT, not its images). |
keyFields | Rows with equal values in these fields are duplicates; dotted paths reach nested fields (search.query). Empty: rows identical in every field. |
normalize | How key values are compared: whitespace (default), case, accents, url, email, phone. |
fieldNormalization | A key field with its own comparison: website → url, email → email, name → case, accents, whitespace. |
keep | Which duplicate stays: first (default), last, mostFilled, newest (with dateField). |
dateField | The date compared for newest: ISO dates, written dates, epoch seconds or milliseconds. |
fillEmptyFields | The row kept takes the values it lacks from the duplicates it replaces. |
sourceField | The field that names each row's source (default _source; empty adds none). |
mode | merge (default): every unique row. onlyNew: rows whose key no earlier run of the history saw. diff: new, changed and removed rows against the previous run. |
historyName | One name per monitor (default default); runs with the same name share their history. |
diffIgnoreFields | Fields that never make a row changed (default scrapedAt, crawledAt, checkedAt, fetchedAt). Add the fields your scraper rewrites on every run — a job's position in the results, signed applyLinks — or pick only the fields you watch with pickFields. |
includeUnchanged | Diff mode also writes the rows that did not change, tagged unchanged. |
renameFields | Renamed as each row is read, so keys and filters use one name across sources (alpha-2 → Code). |
filters | Rows must pass all of them: [{"field": "rating", "operator": "greaterThan", "value": 4.5}]. Operators equals, notEquals, contains, notContains (any case), isEmpty, isNotEmpty, greaterThan, lessThan (numbers, also inside text such as "$1,299", or dates). |
pickFields, omitFields | Keep only, or leave out, these fields of the rows written. |
flatten | Nested objects and lists become dotted columns (address.city, images.0.url). |
maxRows | Most rows read from all sources together (default 1,000,000). |
maxFileMegabytes | A larger file or record is reported and not read (default 100). |
Examples with our own scrapers
Merge Google Jobs runs into one list of jobs. Run Google Jobs Scraper for each search or each day, then pick their datasets. Two runs of the same search a day apart, 11 and 10 rows, merged into 18: the 3 jobs both runs found appear once, and each row says which run found it.
{"datasets": ["<Monday's run>", "<Tuesday's run>"],"keyFields": ["jobId"]}
Only the new posts of the businesses you follow. Schedule Google Maps Business Posts Scraper, then this Actor on its dataset. The first run wrote all 28 posts; a run five days later read 28 and wrote the 10 nobody had seen.
{"datasets": ["<the latest posts run>"],"keyFields": ["postId"],"mode": "onlyNew","historyName": "austin-dentists"}
What moved on a local rank grid. Compare each run of Google Maps Rank Tracker with the previous one: of 26 grid points, 11 came back changed, each with its previous rank.
{"datasets": ["<the latest grid run>"],"keyFields": ["rowType", "row", "col"],"pickFields": ["rowType", "row", "col", "rank", "inTop3"],"mode": "diff","historyName": "swish-dentist"}
{ "rowType": "point", "row": 2, "col": 1, "rank": 5, "inTop3": false, "_change": "changed", "_changedFields": ["rank", "inTop3"], "_previousValues": { "rank": 3, "inTop3": true }, "_source": "dataset <the grid run's dataset id>" }
Output
The dataset holds the unique rows with their own fields, after renames, picks and flattening, plus:
| field | what it holds |
|---|---|
_source | Where the row came from: dataset <id>, the file link (tokens, signatures and keys masked as ***) or record <store>/<key>. Named by sourceField; null on a removed row. |
_change | Diff mode: new, changed, unchanged (with includeUnchanged) or removed. |
_changedFields | Diff mode: the top-level fields whose values changed. |
_previousValues | Diff mode: the previous value of each changed field. |
In only-new and diff modes a row with no value in any key field cannot be followed from run to run: it is left out and counted as a row without a key. A removed row is the row as the previous run wrote it. Removed rows are told only when every source was read whole: a row of a source that could not be read this time is not called removed.
The key-value store record SUMMARY gives each source's rows read, skipped and filtered out with its status (ok,
unreadable, empty, not_tabular, too_large, not_read) and reason, then the duplicates dropped, the rows
without a key, the rows written as unique, new, changed, unchanged or removed, the rows already seen, and the history
saved. The run's status message says the same in one line.
Pricing
Pay per event, no start fee:
| event | price | when |
|---|---|---|
item | US$0.00004 | each row written (unique, new, changed or removed) |
rows-read-1k | US$0.002 | each started block of 1,000 rows read from your sources |
Merging three runs of 10,000 rows into 25,000 unique rows costs 30 × US$0.002 + 25,000 × US$0.00004 = US$1.06. A daily only-new check of a 2,000-row scrape that finds 50 new rows costs 2 × US$0.002 + 50 × US$0.00004 = US$0.006. Sources that cannot be read or are empty, rows filtered out, duplicates dropped, rows already seen and unchanged rows (unless you ask for them) are free. Your spending limit is respected before reading and while writing: the rows the limit keeps from being written stay new for the next only-new or diff run.
Limits
- Memory and speed: the unique rows are held in memory until they are written. Measured on Apify: 100,002 rows of 2.3 KB (Maps posts) from three files, 66,668 of them unique, took 258 MB and 80 s with the default 512 MB, and 14 s with 1 GB (more memory also means more CPU). Diff mode holds the previous snapshot too, so it fits about half as many rows; rows of 12–16 KB (job ads with full descriptions) take several times more. Give the run more memory for more rows. When memory runs short the run stops reading, writes what it holds and says so; it does not fail.
- A JSON document or an Excel workbook is parsed whole: one that would not fit in memory is reported as too large
(CSV, TSV and JSON Lines are streamed, whatever their size). Excel: the first sheet;
.xlsis not read. - A history keeps ~17 bytes per seen key (a million keys ≈ 17 MB) and, for diff, the rows as written. Changing the key
fields of a history starts it again, and the run says so. Histories live in a key-value store of your account named
steadyscrape-merge-dedup-datasets-state; delete a history by deleting its<name>--seenor<name>--snapshotrecord. - Private Apify datasets and stores are readable only when picked in the form (or passed through the API). A private file link answers 401 or 403: share it publicly or upload it to a dataset.
Your data and your responsibility
The Actor reads only what you give it: the datasets and stores you pick, and each file link once, on your behalf. It never connects to private, local or reserved networks (cloud metadata addresses included), follows at most 5 redirects, and keeps nothing besides the history you name. Merge only data you have the right to use: personal data in a merged list (emails, phones, names) stays subject to the GDPR, CCPA and similar laws wherever it came from. This is an independent tool by Steady Scrape, not affiliated with or endorsed by Google (Sheets), Microsoft (Excel) or Dropbox.
Questions, a source it should read, or a comparison it should make: open an issue on the Actor's page.