Search by picture
With the photos embedded, "find ones like this" is just a search — you hand it an image instead of words, and it returns the closest matches.
Query with an image
Instead of a text query, you give the search an image — the URL of one of your photos, or a picture a visitor uploaded. Search Stack embeds that image the same way it embedded the library, then returns the records whose pictures are closest, each with a similarity score. No query text, no tags — the pixels are the query.
POST https://api.searchstack.dev/search-result/Demo/photos/1/by-image
X-API-Key: {your key}
Content-Type: application/json
{ "image": "https://.../harbour-dawn.jpg", "size": 8 }
The results come back ranked by how visually similar they are — the same ordering the box at the top of this lesson shows when you click a photo:
{
"results": [
{ "name": "Harbour at dusk", "@image_score": 0.94 },
{ "name": "Fishing boats", "@image_score": 0.89 }
]
}
That's the lesson. A photo library with an image model attached is searchable by
picture — upload a shot, get the most similar ones back — without a single tag or caption.
The whole feature is a model on a list and a search that takes an image.
Go deeper: Image search — querying by picture in the reference.