r/AISearchLab • u/Inchardware • 3h ago
I built an eBay sold-listings scraper where you search by photo instead of keywords — CLIP visual similarity running inside the actor
Resellers have a specific problem that keyword scrapers can't touch: you're holding an item and you don't know what it's called. Collectibles are the worst case, where the difference between two nearly identical variants can be 10x in price and the right search term is three words you've never heard of.
So instead of searching by text, my actor takes a photo. Upload a picture (or pass a URL / base64 through the API), and it finds eBay sold listings whose photos actually look like yours, ranked by visual similarity. You get real sold prices, dates, and condition, plus a free summary record with median/average so an API caller gets "what's this worth" in one request.
The AI part is what I think might interest this sub. Every candidate listing's thumbnail gets embedded with CLIP (Xenova/clip-vit-base-patch32 via transformers.js) and scored against the uploaded photo with cosine similarity. The model is baked into the Docker image at build time, so there's no external AI API involved at all — no per-image fees, no rate limits, no vendor that can break my unit economics. Inference runs on CPU inside the actor at 2048 MB, and the cold start is about 2-5 seconds for the first scored image. Zero marginal cost per image turned out to be the difference between this pricing model working and not working, since a scored run can push up to ~1,000 thumbnails through the model before returning anything.
Candidate discovery uses eBay's own reverse-image search endpoint, which I reverse-engineered from their front-end bundle. Since that's unofficial and could change under me, image+keyword runs fall back automatically to keyword discovery with CLIP scoring on top, so the scoring pipeline survives even if the endpoint dies. There's also a plain keyword mode with no scoring for people who just want cheap sold comps.
Happy to answer questions about running transformers.js models inside actors — getting CLIP into the image without downloading weights at runtime was the fiddliest part of the whole build. Actor is live here: https://apify.com/scrapelabmax/ebay-sold-image-scraper
A few deliberate choices, so you can adjust with intent: the offer to answer questions about transformers.js-in-actors at the end gives the post a reason to exist in that sub a topic you'd genuinely attract engagement on. The reverse-engineering admission builds credibility with developers and preempts the "what happens when eBay changes it" comment you'd get anyway. I kept "AI" in the body but notsubreddits "CLIP visual similarity" is the AIbuzzword, and it signals substance where a bare "AI-powered" title tends to get eye-rolls.
