Skip to main content

이름으로 사람 조회

Endpoint

GET https://api.verifik.co/v2/face-recognition/persons/lookup

이미 저장된 사람을 이름(필수)과 선택적 생년월일로 찾습니다. 생성 API가 412 person_already_set을 반환했거나 등록 전에 **사람 _id**와 컬렉션 **code**를 1:N 얼굴 검색 없이 가져와야 할 때 사용하세요.

이것은 Mongo 메타데이터 조회이며 얼굴 매칭이 아닙니다. name의 숫자는 생성과 동일하게 제거됩니다 ("Maria 123""Maria"). 이름 매칭은 대소문자를 구분하지 않는 **포함(contains)**입니다 (MariaMaria Perez Gonzalez를 찾습니다). 최소 3자를 사용하세요.

얼굴 검색의 collection_id로는 collections[].code(36자 UUID)를 사용하세요. Mongo 컬렉션 _id를 보내지 마세요.

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params

NameTypeRequiredDescription
namestringYes부분 또는 전체 이름 (숫자 제거 후 최소 3자). 대소문자 구분 없는 contains.
date_of_birthstringNoYYYY-MM-DD. 지정하면 해당 날짜로 좁힙니다.
pagenumberNo페이지 번호 (기본값: 1).
limitnumberNo페이지 크기 (기본값: 20, 최대: 100).

Request

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

async function run() {
const params = new URLSearchParams({
name: "Maria Perez",
date_of_birth: "1994-02-07",
page: "1",
limit: "20",
});

const res = await fetch(`https://api.verifik.co/v2/face-recognition/persons/lookup?${params}`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
});
console.log(await res.json());
}

run();

Response

{
"data": [
{
"_id": "693c646dfd68b59e4e8d1d58",
"name": "Maria Perez",
"date_of_birth": "1994-02-07",
"gender": "F",
"collections": [
{
"_id": "6612a020a55c329bfb3f62e6",
"code": "ed27d231-b437-42c5-94c5-a2130c447d1e",
"name": "CholloApp"
}
]
}
],
"total": 1
}

알 수 없는 이름은 200"data": [], "total": 0을 반환합니다. 404가 아닙니다.

Notes

  • 이름 일부와 선택적 생년월일을 알고 있을 때는 1:N 검색보다 이 헬퍼(또는 412 person_already_setdata)를 사용하세요.
  • 이름만으로도 충분합니다 (name=Maria). 같은 이름을 가진 사람이 많으면 date_of_birth를 추가하세요.
  • POST /v2/face-recognition/persons의 유일성도 얼굴 유사도가 아니라 컬렉션 내 이름 + 생년월일입니다.
  • collections[].code가 얼굴 검색의 collection_id입니다.