Dataset Deduplicate & Merge - Remove Duplicates, JSON & CSV
Pricing
$0.01 / 1,000 unique item saveds
Dataset Deduplicate & Merge - Remove Duplicates, JSON & CSV
Merge Apify datasets and JSON, JSONL or CSV files, then remove duplicates by any fields. Pick, rename and filter fields, keep first or last, output only new items. Works with limited permissions. $0.01 per 1,000 items.
Pricing
$0.01 / 1,000 unique item saveds
Rating
0.0
(0)
Developer
Wood Between Studio
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Features
Share
Dataset Deduplicate & Merge: Remove Duplicates from Apify Datasets, JSON & CSV
Merge any number of Apify datasets and JSON, JSON Lines or CSV files into one clean dataset, and remove duplicates by the fields you choose (URL, ID, title + company, anything). Keep the first or last copy, get only new items compared with older runs, and pick, rename, drop or require fields on the way. It runs with limited permissions: it can only read the datasets you pick, nothing else in your account.
Why use it?
- Reliable with limited permissions. Datasets are chosen with the standard Apify dataset picker and opened read-only, so runs don't fail with "insufficient permissions".
- Dedup by any fields, including nested dot paths (
location.city), or by the whole item. - Loose matching (on by default): ignores case, extra spaces,
http://vshttps://,www.and trailing slashes, sohttps://www.Site.com/a/andsite.com/acount as the same. - Only new items. Point
onlyNewSinceat last week's datasets and get just the items you have not seen before. Ideal after a scheduled scraper run. - Keep first or last. Use "last" to let newer datasets overwrite older ones.
- Mix sources. Apify datasets plus public JSON, JSONL or CSV URLs (exports, GitHub raw files, Google Sheets CSV links).
- Shape the output. Keep only some fields, remove fields, rename columns, drop items missing required fields, add a
_sourcecolumn. - Cheap and fair. $0.01 per 1,000 unique items saved. Duplicates and dropped items are free.
Use cases
- Combine results of several scraper runs (Google Maps, jobs, products, real-estate listings) into one list without duplicates
- Daily or weekly "what's new" feeds: only new listings, jobs, posts or products since the last run
- Clean a CSV or JSON export before importing it into a CRM, spreadsheet or database
- Merge datasets from different Actors and rename their columns to one schema
Input
| Field | Default | Notes |
|---|---|---|
datasetIds | Your datasets (picker, IDs or names). Merged in order | |
fileUrls | Public JSON, JSONL or CSV URLs | |
dedupFields | whole item | e.g. ["url"] or ["title", "company"] |
keep | first | first or last |
normalize | true | Loose matching of dedup values |
onlyNewSince | Older datasets; items already in them are dropped | |
fields / omitFields | Keep only / remove fields (dot paths OK) | |
rename | {"Title": "title"} | |
requireFields | Drop items where these are empty | |
addSourceField | false | Adds _source |
outputDuplicates | false | Saves removed duplicates to a separate dataset (free) |
maxItems | 0 | Cap on unique items (0 = none) |
{"datasetIds": ["YOUR_DATASET_ID_1", "YOUR_DATASET_ID_2"],"dedupFields": ["url"],"keep": "last","fields": ["url", "title", "price"]}
Output
The default dataset holds the unique items (with your field changes). The SUMMARY record in the key-value store shows counts per source:
{"itemsRead": 205, "uniqueItemsSaved": 10, "duplicatesRemoved": 190, "alreadyKnownRemoved": 0, "droppedMissingFields": 5,"dedupFields": ["userId"], "keep": "first","sources": [{ "source": "dataset:abc123", "items": 100, "error": null }],"chargedItems": 10}
Pricing
$0.01 per 1,000 unique items saved ($0.00001 per item). Platform usage is included. Items read but removed as duplicates, already-known items, items missing required fields and failed sources are not charged. Set a maximum charge per run for a hard cap; the Actor stops cleanly when it is reached.
Limits and tips
- Order matters: with
keep: "first", earlier datasets win; with"last", later ones win. - For tens of millions of items, raise memory (each unique key uses about 100 bytes).
- CSV files need a header row. JSON files can be an array, an object with
items/data, or JSON Lines. - File URLs must be public. Only use data you have the right to process.
Support
Need fuzzy matching, a different output format or a feature? Open an issue on the Issues tab. We read every one.
Call it from curl, JavaScript or Python
You can run this Actor in the Apify Console with no code, or call it as an API from curl, JavaScript or Python. Replace YOUR_TOKEN with an Apify API token.
curl
curl "https://api.apify.com/v2/acts/wood-between-studio~dataset-dedup-merge/run-sync-get-dataset-items?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"datasetIds": ["YOUR_DATASET_ID_1", "YOUR_DATASET_ID_2"], "dedupFields": ["url"], "keep": "last"}'
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('wood-between-studio/dataset-dedup-merge').call({"datasetIds": ["YOUR_DATASET_ID_1","YOUR_DATASET_ID_2"],"dedupFields": ["url"],"keep": "last"});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python
import osfrom apify_client import ApifyClientclient = ApifyClient(os.environ["APIFY_TOKEN"])run = client.actor("wood-between-studio/dataset-dedup-merge").call(run_input={"datasetIds": ["YOUR_DATASET_ID_1","YOUR_DATASET_ID_2"],"dedupFields": ["url"],"keep": "last"})items = client.dataset(run["defaultDatasetId"]).list_items().itemsprint(items)
You can also schedule the Actor, cap the spend per run, and send the dataset to Google Sheets, Slack or a webhook from the Console. Store page: apify.com/wood-between-studio/dataset-dedup-merge.