Skip to main content

Face Search (1:N)

Endpoint​

https://api.verifik.co/v2/face-recognition/search

Searches one or more images against a face collection and returns potential matches ranked by similarity.

Headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params​

NameTypeRequiredDescription
imagesstring[]YesArray of base64 images (max suggested: 3) of the same person.
collection_idstringNoRestrict search to this collection.
max_resultsnumberNoMaximum results to return.
min_scorenumberYesMatch threshold (0.2–1.0).
search_modestringYesOne of FAST or ACCURATE.

Request​

const fetch = require("node-fetch");

async function run() {
const res = await fetch("https://api.verifik.co/v2/face-recognition/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
body: JSON.stringify({
images: ["<base64>"],
collection_id: "<collection_id>",
min_score: 0.7,
search_mode: "FAST",
max_results: 10
}),
});
console.log(await res.json());
}

run();

Response​

{
"id": "SRCH1",
"data": [
{
"id": "person_id",
"name": "John Doe",
"score": 0.93,
"thumbnails": [{ "id": "thumb_id", "thumbnail": "<base64>" }]
}
],
"signature": {
"message": "Certified by Verifik.co",
"dateTime": "January 16, 2024 3:44 PM"
}
}

Notes​

  • Provide 1–3 images of the same person in images for better recall.
  • Use ACCURATE for higher precision at the cost of latency; use FAST for speed.