Image Similarity Search & Clustering (CLIP / SigLIP) avatar

Image Similarity Search & Clustering (CLIP / SigLIP)

Pricing

from $0.80 / 1,000 image embeddeds

Go to Apify Store
Image Similarity Search & Clustering (CLIP / SigLIP)

Image Similarity Search & Clustering (CLIP / SigLIP)

Find visually similar images, group a photo collection into clusters of look-alikes, or search images with text. Self-hosted CLIP and SigLIP AI embeddings on CPU with cosine similarity scores. No external APIs.

Pricing

from $0.80 / 1,000 image embeddeds

Rating

0.0

(0)

Developer

Camp8 fr0

Camp8 fr0

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

a day ago

Last modified

Features

Limited permissionsSingle-tenantServer interface

Share

Image Similarity Search & Clustering: Find Similar Images, Group Look-Alikes, Search Photos by Text (CLIP / SigLIP)

Find visually similar images, group a photo collection into clusters of look-alikes and near-duplicates, or search images with a text description, all with AI image embeddings computed inside the Actor (self-hosted CLIP and SigLIP models on CPU). Every match comes with a cosine similarity score. No external API, no vector database to set up.

What does Image Similarity Search do?

The Actor downloads your images, turns each into an embedding vector, and then runs one of four modes:

  • find-similar: for each query image, the top matches from the collection (set A vs set B), or every image against all others when you give only one set
  • cluster: groups the collection into clusters of visually similar images, each with a representative image and member similarities
  • text-search: ranks the collection for each text query, e.g. a red car parked on the street or people playing cards
  • embeddings: just returns one embedding vector per image for your own vector database

Key features

  • Two models: CLIP ViT-B/32 (fast, great for image-to-image similarity and duplicates) and SigLIP base (much better text-to-image search); auto picks the right one per mode
  • Near-duplicate and look-alike detection that survives resizing, recompression, crops and small edits
  • Robust clustering (community detection around a representative image) that does not chain unrelated images together
  • Text-to-image search with similarity scores and, for SigLIP, a match probability
  • Up to 5,000 images per run, parallel downloads
  • Embeddings output (512-d CLIP or 768-d SigLIP, L2-normalized)
  • HTTP API (Standby mode) for on-demand searches
  • Transparent pay-per-event pricing; failed images are free

Use cases

  • Deduplicate photo libraries and product catalogs: group near-identical images and keep one
  • Find visually similar products for recommendations, competitor monitoring or counterfeit checks (set A = your products, set B = scraped listings)
  • Organize large image collections into visual groups (events, scenes, product types)
  • Search scraped images with natural language without building a search backend
  • Dataset curation for AI training: remove duplicates, find clusters, export embeddings
  • Brand and content monitoring: find re-uploads and variants of your images

In Apify Console

  1. Choose a mode.
  2. Paste the image collection (one URL per line). For find-similar you can add query images; for text-search add text queries.
  3. Click Start. The table shows best matches, clusters or embeddings.

Via the Apify API

curl -X POST "https://api.apify.com/v2/acts/freecamp008~image-similarity-search/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode": "cluster", "imageUrls": ["https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/bread_small.png", "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/bread.png", "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg"]}'

Standby mode (instant HTTP endpoint)

Standby keeps the models loaded. Send the input as GET query parameters or as a POST JSON body; the response is { "count": n, "items": [...] }.

# GET text search (arrays are comma-separated)
curl "https://freecamp008--image-similarity-search.apify.actor/?token=YOUR_APIFY_TOKEN&mode=text-search&textQueries=a%20zebra&imageUrls=https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg,https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/savanna.jpg"
# POST: find the closest match for a query image
curl -X POST "https://freecamp008--image-similarity-search.apify.actor/?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode": "find-similar", "queryImageUrls": ["https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/woman-with-afro.jpg"], "imageUrls": ["https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg", "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/portrait-of-woman_small.jpg"], "topK": 2}'

AI agents can pay per call: the Actor uses pay-per-event pricing and only default storages, so AI agents can call it and pay per request with x402 through Apify.

Input example

{
"mode": "find-similar",
"imageUrls": [
"https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg",
"https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg",
"https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/woman-with-afro.jpg",
"https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/portrait-of-woman_small.jpg"
],
"queryImageUrls": [],
"textQueries": [],
"model": "auto",
"topK": 5,
"minSimilarity": 0,
"clusterThreshold": 0,
"minClusterSize": 2,
"includeUnclustered": false
}
FieldDescription
modefind-similar, cluster, text-search or embeddings.
imageUrlsThe image collection (up to 5,000 distinct images).
queryImageUrlsfind-similar only: images to look up in the collection. Empty = all vs all.
textQueriestext-search only: one query per line (English).
modelauto (default), clip-fast or siglip-accurate.
topKMatches per query (default 5).
minSimilarityDrop matches below this cosine similarity.
clusterThresholdcluster: 0 = automatic (0.80 CLIP / 0.85 SigLIP); ~0.93+ groups only near-duplicates.
minClusterSizecluster: smallest cluster to return (default 2).
includeUnclusteredcluster: also return single images as clusters of size 1.
downloadConcurrencyParallel downloads (default 8).

Output examples

find-similar (one row per query image):

{
"mode": "find-similar",
"queryImageUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/woman-with-afro.jpg",
"bestMatchUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/portrait-of-woman_small.jpg",
"bestSimilarity": 0.6651,
"matchCount": 2,
"matches": [
{ "imageUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/portrait-of-woman_small.jpg", "similarity": 0.6651 },
{ "imageUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/corgi.jpg", "similarity": 0.5087 }
],
"model": "clip-fast"
}

cluster (one row per cluster):

{
"mode": "cluster",
"clusterId": 1,
"size": 2,
"representativeUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/bread_small.png",
"averageSimilarity": 0.9947,
"imageUrls": [
"https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/bread_small.png",
"https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/bread.png"
],
"members": [
{ "imageUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/bread_small.png", "similarityToRepresentative": 1 },
{ "imageUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/bread.png", "similarityToRepresentative": 0.9947 }
],
"threshold": 0.8,
"model": "clip-fast"
}

text-search (one row per query):

{
"mode": "text-search",
"query": "cats on a sofa",
"bestMatchUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg",
"bestSimilarity": 0.1081,
"matchCount": 2,
"matches": [
{ "imageUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg", "similarity": 0.1081, "matchProbability": 0.43928 },
{ "imageUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg", "similarity": 0.0021, "matchProbability": 0 }
],
"model": "siglip-accurate"
}

embeddings rows contain imageUrl, model, dim and embedding (array of numbers). Images that fail to download or decode produce { "imageUrl": "...", "error": "...", "isError": true } and are not charged.

Pricing

This Actor uses pay-per-event pricing with two events:

EventPricePer 1,000
image-embedded: one image downloaded and turned into an AI embedding$0.0008$0.80
result-row: one output row (matches of one query, one cluster, or one embedding)$0.0005$0.50

Example: clustering 1,000 product photos into 120 clusters costs 1,000 x $0.0008 + 120 x $0.0005 = $0.86. Apify platform usage (compute, storage) is billed separately according to your plan. With Maximum cost per run, the Actor embeds only as many images as it can still pay results for, then returns results for those.

FAQ

What similarity score means "the same image"? With CLIP, resized or recompressed copies of the same image score about 0.97-1.0, crops and edits about 0.9+, the same kind of subject (two portraits, two cat photos) about 0.65-0.85, and unrelated images usually below 0.6. Text-to-image scores are on a different, much lower scale (SigLIP: a good match is often 0.05-0.15), so compare them only within one query.

Which model should I use? Keep auto: CLIP for image-to-image (sharper separation between related and unrelated images, ~4x faster) and SigLIP for text-to-image search (in our tests it ranked the right image first for every query, while CLIP confused e.g. a tiger with a zebra).

How many images can I process? Up to 5,000 distinct images per run. Clustering compares all pairs, which stays fast for a few thousand images. Expect roughly 0.2-0.5 s per image for CLIP and 1-2 s for SigLIP at the default 2 GB memory; more memory means more CPU.

What are the limits? Similarity is semantic and visual: it finds "the same product photo" or "a similar scene", not exact pixel matches, and it is not a face-recognition or reverse-image web search. Text queries must be in English. Images up to 30 MB; animated GIFs use the first frame.

Are my images private? Yes. Images are processed inside your Apify run by models bundled with the Actor; nothing is sent to external AI services.

Is it legal to use? Yes. Make sure you have the right to download and process the images. The Actor does not identify people.

Which models and licenses are used? OpenAI CLIP ViT-B/32 (MIT license; ONNX export Xenova/clip-vit-base-patch32) and Google SigLIP base-patch16-224 (Apache-2.0; ONNX export Xenova/siglip-base-patch16-224). Vision encoders run in fp32, text encoders in int8 (same rankings as fp32 in our tests). Both models are bundled in the Actor image.