Merge & Dedup Datasets – Keep Only New Items avatar

Merge & Dedup Datasets – Keep Only New Items

Pricing

from $0.35 / 1,000 unique items

Go to Apify Store
Merge & Dedup Datasets – Keep Only New Items

Merge & Dedup Datasets – Keep Only New Items

Merge several Apify datasets into one and remove duplicates by any fields (url, id, name + city) or by full content. Optionally keep only items not seen in earlier runs, for scheduled scrapers and integrations. Keeps every field. Limited permissions. Pay only for items returned.

Pricing

from $0.35 / 1,000 unique items

Rating

0.0

(0)

Developer

Justaduck

Justaduck

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

a day ago

Last modified

Features

Limited permissions

Share

Merge & Dedup Datasets – Keep Only New Items

Merge and dedup datasets: combine several Apify datasets into one, remove duplicates by the fields you choose, and optionally keep only the items you have not seen in earlier runs.

  • What you get: one dataset with every unique item from your input datasets, with the same fields they had (the first copy of each duplicate is kept, in dataset order). The run summary says, per dataset, how many items were read, returned, removed as duplicates and skipped as already seen.
  • What it costs: US$0.50 per 1,000 items returned plus US$0.0005 per run start. Duplicates, items skipped as already seen and demo data are not charged. Apify's free plan (US$5 of usage a month) covers about 10,000 items. That is the price on Apify's Free plan; on paid Apify plans it goes down to US$0.35 per 1,000 items returned, the "from" price on the Store page.
  • Try it: You can see example output in the Output section below without running anything. To try it yourself, click Start with Datasets left empty: it merges two small demo datasets (5 job postings each) by url and returns 7 unique items in a few seconds. Demo items are marked isDemoData: true and are not charged (only the standard US$0.0005 run start).

Use it after any scraper: pick the datasets of several runs (or let an integration pass the dataset of the run that just finished), choose the dedup fields such as url or id, and get one clean list. Turn on Only items not seen in earlier runs to get just the new items every time a scheduled scraper runs: the Actor remembers which items it already returned, in your own account.

Only use datasets you have the right to process. This Actor runs with Apify's limited permissions: it can read only the datasets you select in its input, and it writes only to its own run storage and its memory store in your account.

What you can use it for

  • Only new results from a scheduled scraper: run a job board, tender or listing scraper every day and pass each run's dataset here with Only items not seen in earlier runs on; you get only the postings that were not in any earlier run.
  • Merge several runs into one list: combine the results of different searches, countries or keywords, removing items that several searches found.
  • Clean a dataset: remove exact duplicate rows, or rows with the same url, id, e-mail hash or name + city.

How to use it

  1. Open this Actor on Apify Store and try it in Apify Console. A free Apify account is enough; no credit card is needed.
  2. You can see example output in the Output section below without running anything. To try it, leave Datasets empty and click Start: the run merges two demo datasets and returns 7 unique items in a few seconds, marked isDemoData: true and not charged.
  3. In Datasets, pick your own datasets (in the order you want them merged). In Dedup fields, list the field(s) that identify the same item, such as url. Leave it empty to remove only items that are identical in every field.
  4. For scheduled runs, turn on Only items not seen in earlier runs and give a Memory name, for example jobs-weekly. Use one name per pipeline.
  5. Open the Output tab when the run finishes and export the items as JSON, CSV or Excel, or connect the next step with Apify integrations (Make, Zapier, n8n, Slack, Google Sheets, webhooks) or the Apify API.

Get only new items after any Actor (integration)

To run this automatically after another Actor (for example a scraper you run on a schedule):

  1. Open the scraper's saved task (or the Actor) → Integrations → Connect Actor or task → choose this Actor, triggered when the run succeeds.
  2. Set the input of this Actor to:
{
"datasetIds": ["{{resource.defaultDatasetId}}"],
"dedupFields": ["url"],
"onlyNewItems": true,
"memoryName": "my-scraper-new-items"
}

{{resource.defaultDatasetId}} is replaced by the dataset of the run that just finished. Each time the scraper runs, this Actor returns only the items whose url was not returned before, and you can send them on with a second integration (e-mail, Slack, Google Sheets). The same input works with a webhook that calls this Actor through the API, or with two schedules a few minutes apart (the second one using a fixed dataset name instead of {{resource.defaultDatasetId}}).

Input

FieldTypeDefaultDescription
datasetIdsarrayempty = demo run (not charged)The datasets to merge, in order. Pick them in the form, or give dataset IDs or username~dataset-name (in the API, CLI or an integration too). With limited permissions only the datasets given here can be read; Apify grants access to them by ID or name, so prefer those over Console or API URLs. Up to 100 per run; the same dataset given twice is read once.
dedupFieldsarray of strings[]Fields that identify a duplicate. Several fields are combined (all must match). Nested fields use dots: company.id. Values must match exactly, including type (the number 1 and the text "1" are different) and letter case. Items where all these fields are empty are compared by their whole content instead. Empty list = compare whole items.
onlyNewItemsbooleanfalseReturn only items whose dedup key was not returned in an earlier run with the same memory.
memoryNamestring—Required with onlyNewItems. Letters, numbers, spaces, ., _, -. Same name + same dedup fields = same memory.
forgetAfterDaysinteger90Items not seen in any run for this many days are removed from the memory (7–3,650).
maxItemsintegerno limitMaximum number of items to return. Items after the limit are not returned, not charged and not remembered.

Output

The demo run (Datasets left empty) returns items like these (two of the 7 shown). You don't need to run it to see this. Demo items carry isDemoData: true; the Actor never adds this field to items from your own datasets.

{
"url": "https://www.example.com/jobs/101",
"title": "Data Analyst",
"city": "Austin",
"postedDate": "2026-11-21",
"sourceUrl": "https://api.apify.com/v2/datasets/knjG69HLEYFoQcTTT/items?format=json&offset=0&limit=1",
"isDemoData": true
}
{
"url": "https://www.example.com/jobs/106",
"title": "Data Engineer",
"city": "Chicago",
"postedDate": "2026-11-26",
"sourceUrl": "https://api.apify.com/v2/datasets/XYhmJmrqYKJ1f4HSD/items?format=json&offset=2&limit=1",
"isDemoData": true
}

Fields

FieldTypeDescription
(your fields)anyEvery field of the item as it was in your dataset, in the same order.
sourceUrlstringKept as it is when the item already has an absolute URL in sourceUrl (most scrapers do). Otherwise it is set to a link to that exact item in the Apify API (dataset, position).
originalSourceUrlanyOnly when the item had a sourceUrl value that is not an absolute URL: that original value, so nothing is overwritten.
isDemoDatabooleanOnly on demo items (the run with Datasets left empty): true. Demo items are not charged.

The output is exactly the data you put in, unchanged: every value is returned as it is in your datasets (no masking, no rewriting); only duplicates are removed and sourceUrl is added where it was missing.

Pricing

Pay per event: US$0.0005 per run start + US$0.50 per 1,000 items returned (US$0.0005 per item).

RunItems readItems returnedCost
Demo run (Datasets empty)107US$0.0005 (run start only; demo items are not charged)
Daily new items from a 2,000-item scraper (50 new a day)2,00050US$0.025 + US$0.0005
Merge 5 runs of 6,000 items, 30% overlap30,00021,000US$10.50 + US$0.0005

Discounts by Apify plan (per 1,000 items): Free $0.50, Bronze $0.45, Silver $0.40, Gold $0.35.

Free plan: Apify's free plan includes US$5 of prepaid usage every month (no credit card needed), enough for about 10,000 returned items a month.

Not charged: items removed as duplicates, items skipped as seen in earlier runs, datasets that cannot be read, and demo data (the run with Datasets left empty). Use Max items or Apify's "maximum cost per run" to cap a run.

Limits and behaviour

  • Speed: each returned item is saved and charged on its own, which sets the pace on the Apify platform: roughly 10–15 items per second. Reading and comparing is much faster, so a daily "new items only" run over a large dataset that returns few new items finishes quickly. A run lasts at most about 55 minutes; datasets not reached are listed as not-run.
  • Memory (RAM): the keys of all items read in one run are kept in memory. 256 MB is enough for about a million short keys; raise the memory for larger merges.
  • Order: datasets are read in the order given, items in dataset order; the first copy of a duplicate is the one returned.
  • Items must be JSON objects. A dataset with other values (plain strings, arrays) is skipped with a reason.
  • Hidden fields (names starting with #) and empty items are not read (clean mode of the dataset API).
  • Memory store: the "only new" memory is saved in your account in the key-value store dedup-datasets-new-items-state after each dataset, on platform migration and at the end of the run. Two runs that use the same memory at the same time are not allowed: the second one stops before returning anything. If the memory is damaged, the run stops before returning anything and tells you which records to delete.
  • If a run is aborted, items already returned are remembered; the item being written at that moment may be returned again next time.

Use with AI agents (MCP)

AI agents can run this Actor through the Apify MCP server (Model Context Protocol). There are two ways to connect:

  • Load this Actor as its own tool: add https://mcp.apify.com?tools=justaduck/dedup-datasets-new-items to your MCP client. The server exposes it as the tool justaduck--dedup-datasets-new-items.
  • Let the agent find it: connect to https://mcp.apify.com (default tools). The agent can find this Actor with search-actors, read its input schema with fetch-actor-details and start it with call-actor.

On first connection you sign in to Apify with OAuth (or send your Apify API token as a Bearer header). The agent passes the same fields as in the Input section. A run returns its dataset ID, and the agent reads the rows with get-dataset-items. Runs started this way run on your Apify account and are charged as in the Pricing section; call-actor also accepts maxTotalChargeUsd in callOptions to cap what one run can spend.

FAQ

How do I remove duplicates from an Apify dataset? Pick the dataset in Datasets, put the field that identifies an item (for example url) in Dedup fields and click Start. The output is the same dataset without duplicates.

How do I get only new items from a scheduled scraper? Turn on Only items not seen in earlier runs, give a Memory name, and connect this Actor to your scraper's task with an integration using {{resource.defaultDatasetId}} (see "Get only new items after any Actor"). Each run returns only items not returned before.

How do I merge datasets from several Actor runs? Select all the datasets in Datasets. They are read in order and merged into one output dataset; duplicates across them are removed.

Why does it say "No permission to read this dataset"? With limited permissions this Actor can read only the datasets given in its input. Select the dataset in the Datasets field, or pass its dataset ID (or username~dataset-name) there in the API, CLI or integration input. Use the ID rather than a Console or API URL, and check that the dataset is in your account or shared with you.

Can I dedup by two fields together? Yes. List both, for example name and city: two items are duplicates only when both values match.

What happens if I change the dedup fields? The memory is kept per memory name and dedup fields, so new dedup fields start a fresh memory: the first run returns all items again.

Is this an official Apify tool? No. It is built by an independent developer on the Apify platform and uses the public Apify API to read the datasets you select.

Actors by the same author whose daily results work well with "only new items":