Dataset Dedupe by Rules: URL, E-mail, Phone + Review avatar

Dataset Dedupe by Rules: URL, E-mail, Phone + Review

Pricing

from $0.30 / 1,000 compared rows

Go to Apify Store
Dataset Dedupe by Rules: URL, E-mail, Phone + Review

Dataset Dedupe by Rules: URL, E-mail, Phone + Review

Remove duplicates from Apify datasets and JSON, JSONL or CSV files with ordered rules: exact, text, URL, domain, phone, e-mail and number tolerance. See which rule matched. Fuzzy matches are never merged: they go to a review list with score and reason.

Pricing

from $0.30 / 1,000 compared rows

Rating

0.0

(0)

Developer

Bardach Technologies

Bardach Technologies

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

Dataset Dedupe by Rules removes duplicates from your scraped data using rules you can read and change: exact values, normalised text, URL, domain, phone, e-mail and number tolerance. Give it Apify datasets or links to JSON, JSONL or CSV files, list your rules in order, and get the unique rows plus a record of which rule matched which rows and why.

Fuzzy matching never merges anything. A fuzzy_review rule only lists similar pairs, with a score and a reason, so a person can decide. If you want similar names merged automatically, this is not the right tool.

What you get

Record (_dedupe.recordType)What it is
uniqueYour row, unchanged apart from the _dedupe details and any fields you chose to fill. _dedupe.compared says whether any rule could compare it
duplicate_groupOne group: the kept row, the members, and each match with its rule and reason (optional)
needs_reviewTwo rows a fuzzy_review rule found similar. Not merged: both stay in the output. Holds score, reason and where the rows came from
invalidA record that could not be used: where it was and why, without its content
summaryInput, unique, duplicate and invalid counts, in total and per rule

Records always come in this order. The OUTPUT record gives two ready query strings for the dataset's items link: uniqueRowsQuery (for example limit=5120&omit=_dedupe) for the clean rows and reviewRowsQuery for the review list alone.

How to use it

  1. Add Dataset IDs, File URLs, or both.
  2. Write your match rules. The first rule is applied first.
  3. Choose which row stays and whether empty fields are filled from its duplicates.
  4. Start the run. Without data it runs on a small sample for free, so you can see the output.
{
"datasetIds": ["WkzbQMuFYuamGv3YF"],
"fileUrls": ["https://files.example.com/leads.csv"],
"rules": [
{ "id": "same-site", "type": "normalized_url", "fields": ["website"] },
{ "id": "same-mail", "type": "email", "fields": ["email"] },
{ "id": "same-price", "type": "numeric", "fields": ["price"], "blockFields": ["sku"], "tolerance": 0.5 },
{ "id": "similar-name", "type": "fuzzy_review", "fields": ["company"], "blockFields": ["city"], "threshold": 0.85 }
],
"survivor": "most_complete",
"mergeEmptyFields": true
}

Match rules

TypeRows match whenMerges?
exactThe values are identical (1 and "1" differ; key order inside objects does not matter)Yes
normalized_textEqual apart from case, repeated spaces, invisible characters and punctuation at the edge of a word (Acme, Inc. = acme inc)Yes
normalized_urlSame address, ignoring http/https, www., the scheme's own default port, # parts, trailing slashes, query order and tracking parameters such as utm_*, gclid, fbclidYes
domainSame host name without www. (shop.example.com and example.com differ)Yes
phoneSame number after normalising, extension included; compared as hashes onlyYes
emailSame valid address, ignoring case and mailto:; compared as hashes onlyYes
numericEqual blockFields and a difference within tolerance, measured from the lowest value of the cluster, so a chain of small steps does not mergeYes
fuzzy_reviewSimilar text. See belowNever

normalized_text is deliberately strict. Accents, signs, symbols and punctuation inside a word all count, so these stay apart: Müller / Muller, Maße / Masse, C++ / C#, (-5) / (5), 5 % / 5, 1.5 / 1/5, 1,000 / 1.000.

Values that are not usable never match and are not billed: empty text, invisible characters, [null], ["N/A"], {"a":""}, and placeholders in any spelling such as N/A., (none), unknown!, -. Over-long values are also refused for their rule: URLs above 8,192 characters, e-mails above 320, phone numbers above 64. Dates are not phone numbers, addresses with a user name are not URLs, and a value written without a scheme must end like a real host, so main.py, Dr.No and v1.2 are not domains.

A rule with several fields needs all of them to match, field by field. With a single field that holds a list, one shared value is enough. Rules work together: if rule 1 joins A and B and rule 2 joins B and C, all three are one group.

What fuzzy_review does

The score runs from 0 to 1 and compares the two texts with case, Latin accents, punctuation and word order ignored. A pair at or above threshold (default 0.85) becomes a needs_review record with one of these reasons:

ReasonMeaning
same_wordsThe same words, possibly in another order or split across fields differently
possible_typoOne or two words are one edit apart. This can still be two different names (Stanford / Stamford)
numbers_differWords holding a digit differ or come in another order (Store 12 / Store 13)
words_differOther differences

Expect misses. This rule finds spelling slips, not different ways of writing a name: Acme Corp / Acme Corporation and 123 Main Street / 123 Main St usually score below the threshold and are not listed at all. Many listed pairs are not duplicates. Lowering the threshold finds more and lists more noise.

Candidates are rows sharing blockFields, or, without them, the first four letters of a word. A block over 200 rows is not compared, texts over 4,096 characters are not compared, and comparisons are limited per run by count (500 per input row, at least 20,000, at most 5 million) and by a work budget that grows with the rows billed. The summary reports oversizeBlocks, rowsInOversizeBlocks and comparisonLimitReached per rule. The needs_review records show the compared text, so do not use this rule on a field you do not want to see there.

What is kept, and what is limited

Every run satisfies: input rows = valid + invalid, and valid = unique + duplicates.

  • A row with no content at all ({}, only blanks or placeholders, only true/false flags) is invalid with reason empty_row: free and not written.
  • A row with content that no rule could compare stays unique and is written free, up to 5 per billed row (at least 100). Rows beyond that are not written; uncomparedRowsNotWritten counts them. Add a rule that covers them if you need them all.
  • invalid and needs_review records are each listed up to 5 per billed row (at least 100, at most 10,000), best scores first. The totals in the summary are always complete.
  • Rows nested more than 64 levels deep and rows too large to write are invalid, counted by reason.
  • If nothing is comparable after 50,000 rows or 32 MB, the run stops free, because the rules do not fit the data. If at least 10,000 rows are unreadable and they outnumber readable rows nine to one, it also stops free.
  • A rule that finds no value fails a small run free, since that nearly always means a misspelled field. On a larger run where other rules did compare rows, the run finishes and names the rule in rulesWithoutValues.

Same input, same output

Rows are read in the order given and every tie has a fixed rule, so the same input and settings give the same result. If a run is restarted it reads the input again and checks a digest of it. If the digest matches, it continues after the last row already written. If the input changed in between, the run stops rather than mix two versions.

Limits

LimitDefaultHighest
Input rows per run1,000,0005,000,000
Input size per run1,024 MB4,096 MB
Size of one row1,024 KB5,120 KB
Datasets, files20 each20 each
Download time per file1 hour1 hour

At a row or size limit, or at your maximum charge, reading stops and the run ends as stoppedEarly: the result is correct for the rows read. If the disk fills up, the run fails without a charge; more memory also gives more disk.

Memory. Datasets are read in pages that are sized by bytes: the first page holds 10 items, then each page holds as many items as fit in about 32 MB of JSON (at most 1,000). A single item can be as large as the platform allows (about 9 MB), so a page of very large items is small. Files are read in 64 KB chunks and one row at a time. Not measured on the platform.

Web pages are refused. A file link that answers with a web page (an HTML or XML content type, or a body that starts with <) is refused whatever fileFormat you chose: the run stops with a clear message, nothing is parsed and nothing is charged.

Names shown back. Rule ids, field names, dataset ids, file host names and unknown option names that you typed are shown in the result and in messages with phone numbers, e-mail addresses and digit chains of 8 or more digits replaced by [removed]. Matching still uses what you typed.

Not supported: compressed files, Excel files, password-protected links, automatic fuzzy merging, and matching phonetic or translated names.

CSV exports and formulas

Your values are written unchanged. A value such as =HYPERLINK(...) stays a formula when the dataset's CSV export is opened in a spreadsheet. If your data comes from strangers, sanitise it first, for example with Dataset Export to XLSX, CSV and Parquet.

Which dedupe Actor?

Use Dataset Merge & Deduplicate (dataset-merge-dedup) to combine datasets and drop rows with identical field values, with keep-first or keep-last and resume by position. Use this Actor when you need files as input, normalised URL, e-mail, phone or number rules, an audit trail of why rows matched, or a review list of similar pairs.

Your data

Row values are never written to the log. Phone and e-mail rules store and compare hashes in their working index, and group rows show no hash or value for them. Your rows are in the run's working folder only while it runs, and the result stays in your own run's storage.

Pricing

USD 0.30 per 1,000 compared rows, with a minimum of USD 0.03 per run (100 rows), plus Apify's small start fee. A compared row is one that at least one of your rules could compare, whether it turns out unique or duplicate.

A run is billed for the largest of three figures:

FigureExample
Compared rows5,000 compared rows: USD 1.50
The minimum of 100 rows1 compared row: USD 0.03
One row per 256 KB of data read1 compared row and 1 GB of data: 4,096 rows, USD 1.23

OUTPUT shows billableRows (compared), bytesRead, chargedRows (billed) and chargeBasis (which figure applied).

Free: runs that compared nothing, the sample data, failed runs, and rows that are invalid, empty or not comparable. Their size still counts towards the 256 KB figure when the run compared something, because they had to be read.

The charge is made once, after the whole result is written. If a restart interrupts it, it is not sent again, so you are not billed twice. A run with a maximum charge stops reading before going over it, and a limit below the minimum is refused before anything is read.

Run outcomes

OUTPUT.outcome is complete, stoppedEarly (with stopReason: maxCharge, maxInputRows or maxInputBytes) or failed. A failed run explains why in its status message.