Near-Duplicate Content Finder (MinHash + SimHash)
Pricing
from $2.00 / 1,000 document analyzeds
Near-Duplicate Content Finder (MinHash + SimHash)
Find duplicate and near-duplicate pages and texts at scale. Fetches URLs, strips boilerplate, clusters similar content with MinHash LSH and SimHash, and flags the canonical version. No external APIs.
Pricing
from $2.00 / 1,000 document analyzeds
Rating
0.0
(0)
Developer
Camp8 fr0
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
5 days ago
Last modified
Categories
Features
Share
Near-Duplicate Content Finder: Detect Duplicate Pages & Texts with MinHash + SimHash
Near-Duplicate Content Finder detects duplicate and near-duplicate content across web pages and raw texts. Give it a list of URLs, a list of texts or a whole dataset (e.g. the output of a crawler), and it groups similar documents into clusters, flags the canonical version of each cluster, and lists every duplicate with its similarity score. It uses the same algorithms search engines use: MinHash with LSH banding (Jaccard similarity of word shingles) and 64-bit SimHash (Hamming distance). It scales to 50,000+ documents in about a minute with no O(n²) comparisons. Everything runs inside the Actor: no external APIs, no LLM costs.
What does Near-Duplicate Content Finder do?
- 🌐 Fetches web pages and strips boilerplate (navigation, header, footer, sidebars, cookie banners, scripts, styles). It prefers
<article>/<main>, or uses your own CSS selector. - 🧮 MinHash + LSH: estimates Jaccard similarity on k-word shingles (default k=5, 128 permutations). Bands and rows are tuned automatically for at least 99.5% recall at your threshold.
- ✅ Exact verification: every LSH candidate pair is checked with the exact Jaccard similarity of the shingle sets, so reported scores are exact, not estimates.
- 🔢 64-bit weighted SimHash on word 3-grams, with bit-sampling LSH. It tolerates scattered small edits (typos, synonyms, re-wording).
- 🧩 Clusters near-duplicates (union-find) and marks one canonical document per cluster (the longest, or the first in input order).
- 📦 Cluster summary JSON is saved to the key-value store (
CLUSTERS), ready to download. - ⚡ Scales: identical documents are collapsed first, and candidate search is sub-quadratic. 10k documents take about 8 s; 50k documents (3.6 KB each) take about 53 s with a peak of about 680 MB RAM.
- 🔌 HTTP API (Standby mode): POST your texts and get clusters back in one request.
Use cases
- SEO duplicate content audit: find pages on your site (or across mirrors) that Google may treat as duplicates, and pick the canonical URL
- Scraped data deduplication: clean product listings, job ads, real-estate ads or news articles that were re-posted with tiny changes
- Plagiarism and content-reuse detection across articles, product descriptions or student submissions
- RAG / LLM dataset cleaning: remove near-duplicate chunks before embedding or fine-tuning
- Syndication monitoring: find where your content was republished
- E-commerce catalogue hygiene: detect copy-pasted product descriptions across SKUs
How to use it
- Click Try for free.
- Paste URLs, and/or texts (strings or
{"id", "text"}objects), and/or pick a dataset (set its text field, e.g.textfor Website Content Crawler). - Choose the method (
bothis recommended) and the similarity threshold (0.8 by default). - Click Start. Each document becomes a row in the Documents view with its
clusterId,isCanonical, and its duplicates. The full cluster summary is in the key-value store recordCLUSTERS(linked in the run's Output tab).
Call it as an HTTP API (Standby mode)
# GET with query parameters (arrays are comma-separated)curl "https://<your-standby-url>/?urls=https://example.com,https://example.org,https://example.net" \-H "Authorization: Bearer <APIFY_TOKEN>"# POST with a JSON body: the main Standby use case (long texts)curl -X POST "https://<your-standby-url>/" \-H "Authorization: Bearer <APIFY_TOKEN>" -H "Content-Type: application/json" \-d '{"texts":[{"id":"a","text":"First long article..."},{"id":"b","text":"Second long article..."}],"method":"both","similarityThreshold":0.8}'
Response: { "count": 2, "items": [ ...one result per document... ] }
Use POST for texts: GET array parameters are split on commas, so a text containing commas must be sent as a JSON array (texts=["a, b","c"]).
You can also run it through the Apify API (run-sync-get-dataset-items), the Apify MCP server, Make, Zapier, n8n and other integrations. AI agents can pay per call with x402 (USDC) through Apify's agentic payments, without needing an Apify account.
Input example
{"urls": ["https://example.com", "https://example.org", "https://example.net", "https://www.iana.org/help/example-domains"],"texts": [{ "id": "product-a", "text": "Our stainless steel water bottle keeps drinks cold for 24 hours..." },{ "id": "product-a-copy", "text": "Our stainless-steel water bottle keeps drinks cold for 24 hours!..." }],"method": "both","similarityThreshold": 0.8,"shingleSize": 5,"numPermutations": 128,"lowercase": true,"stripPunctuation": true,"stripNumbers": false,"canonicalStrategy": "longest","maxConcurrency": 10}
| Field | Description |
|---|---|
urls | Web pages to fetch and compare |
texts | Raw texts: strings or {"id", "text"} objects |
datasetId + datasetTextField / datasetIdField | Compare the items of an existing dataset (best for 10k-50k+ documents) |
method | both (default), minhash (exact Jaccard), simhash (Hamming) |
similarityThreshold | 0.3-1.0, default 0.8 |
shingleSize | Words per shingle (default 5; use 2-3 for short texts) |
numPermutations | MinHash hash functions (default 128) |
simhashMaxDistance | Optional override of the max Hamming distance (default derived from the threshold: 0.8 → 12 bits) |
lowercase / stripPunctuation / stripNumbers | Text normalization before comparing |
canonicalStrategy | longest (default) or first |
maxDuplicatesListed | Cap on the duplicates array per result (default 100) |
contentSelector | CSS selector for the main content of fetched pages |
maxConcurrency / proxyConfiguration | Fetching options |
Output example
One item per input document:
{"id": "product-a-copy","url": null,"title": null,"wordCount": 56,"simhash": "738ba964da2a6e82","clusterId": "c3","clusterSize": 2,"isCanonical": false,"canonicalId": "product-a","duplicateCount": 1,"duplicates": [{ "id": "product-a", "url": null, "similarity": 0.9531, "jaccard": 0.8361, "simhashDistance": 3 }],"clustersUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/CLUSTERS"}
similarityis the score used for matching: Jaccard (minhash),1 - distance/64(simhash), or the higher of the two (both).jaccardis the exact Jaccard similarity of the word-shingle sets;simhashDistanceis the Hamming distance (0-64) between the two SimHashes.- Fetch failures are returned as unbilled items with an
errorfield.
The CLUSTERS record contains the settings, totals (documents, clusters, redundant documents, duplicate pairs), the LSH parameters used, and every multi-document cluster with its canonical document and duplicates.
Pricing
This Actor uses pay-per-event pricing. You only pay for analyzed documents:
| Event | Price |
|---|---|
Document analyzed (document-analyzed) | $2 per 1,000 documents ($0.002 each) |
That is about a third cheaper than comparable per-item deduplication tools (around $0.003 per item). Pages that fail to download or contain no text are not charged. Apify platform usage (compute) is billed separately: a 10,000-document run takes well under a minute on 1 GB. Set Maximum cost per run to cap your spend; the Actor only fetches and analyzes as many documents as the budget allows.
FAQ
What is the difference between MinHash and SimHash?
MinHash estimates the Jaccard similarity of word shingles (overlapping k-word sequences). It is strict and precise, ideal for copied or scraped content. SimHash compresses each document into a 64-bit fingerprint whose Hamming distance reflects cosine similarity of its features. It is more tolerant of scattered word changes. both combines them: a pair matches if exact Jaccard reaches the threshold, or if SimHash similarity reaches it and the pair also shares at least half the threshold in Jaccard. That extra guard prevents random 64-bit collisions in large corpora.
How many documents can it handle?
Tested with 50,000 synthetic documents (about 600 words each): 53 s end to end, about 680 MB peak memory. Use datasetId for large corpora, since pasting 50k texts in the input is impractical. For more than about 100k documents, raise the memory.
How accurate is it?
On a 10,000-document synthetic benchmark, checked against brute-force exact comparison of all pairs among 3,000 documents: minhash found 100% of true pairs with 100% precision; both and simhash found 99.7% with 100% precision. Reported Jaccard scores are exact, not estimates.
Which threshold should I use?
0.8 (default) catches copies with small edits. Use 0.9+ for near-exact copies only, 0.6-0.7 for loosely rewritten content. For very short texts (titles, one-liners), lower shingleSize to 2-3.
Which languages are supported? All languages that separate words with spaces (English, French, German, Spanish, Arabic, Russian…). Chinese/Japanese/Thai text without spaces is treated as long tokens, so detection is coarse there.
Does it render JavaScript?
No. Pages are fetched as HTML (fast and cheap). For JavaScript-heavy sites, crawl them first with a browser-based crawler and pass its dataset via datasetId.
Is my data private? Texts are processed inside your Apify run and nothing is sent to third parties. Fetched pages are requested directly (or through your proxy settings).
Is it legal to fetch the pages? The Actor only downloads publicly accessible pages you provide. Make sure you have the right to access and process the content, and respect the sites' terms of service.