다중 요청 개요
최대 50개 이메일 주소 처리
data 배열을 보내면 GenderAPI가 각 주소에서 이름을 추출하고 결과를 반환합니다. 선택적id로 시스템의 원본 레코드와 정확히 연결할 수 있습니다.
방식POST
최대이메일 50개
인증Bearer 토큰
결과 형식names[]
최대 이메일 50개→이름 추출→국가별 맥락이 포함된 결과
HDR
필수 HTTP 헤더
다중 요청 인증하기
Content-Typeapplication/jsonAuthorizationBearer YOUR_API_KEYJSON 요청 본문
매개변수
| 필드 | 유형 | 필수 여부 | 설명 |
|---|---|---|---|
data | object[] | 필수 | 1~50개의 이메일 레코드 목록입니다. |
data[].email | string | 필수 | GenderAPI가 이름을 추출할 이메일 주소입니다. |
data[].country | string | 선택 | 지역별 맥락에 사용할 ISO 3166-1 alpha-2 국가 코드입니다. |
data[].id | string | integer | 선택 | 관련 결과와 함께 변경 없이 반환되는 사용자 시스템의 레코드 ID입니다. |
레코드 연결
각 항목에 고유한 id를 사용하세요. GenderAPI가 결과와 함께 ID를 반환하므로 배열 순서에 의존하지 않고 올바른 레코드를 갱신할 수 있습니다.
요청 페이로드
이메일 배열 구성하기
JSON
{
"data": [
{ "email": "andrea.schmidt@example.com", "country": "DE", "id": "123" },
{ "email": "andrea.rossi@example.it", "country": "IT", "id": "456" },
{ "email": "james.brown@example.com", "country": "US", "id": "789" }
]
}코드 예제
다중 이메일 요청 보내기
cURL
curl -X POST "https://api.genderapi.io/api/email/multi/country" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"data":[{"email":"andrea.schmidt@example.com","country":"DE","id":"123"},{"email":"james.brown@example.com","country":"US","id":"789"}]}'JavaScript
const data = [
{ email: "andrea.schmidt@example.com", country: "DE", id: "123" },
{ email: "james.brown@example.com", country: "US", id: "789" }
];
const response = await fetch("https://api.genderapi.io/api/email/multi/country", {
method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY" },
body: JSON.stringify({ data })
});200 응답
이름 추출 및 성별 예측
JSON
{
"status": true, "used_credits": 3, "remaining_credits": 7265,
"expires": 1717069765,
"names": [
{ "name": "Andrea", "q": "andrea.schmidt@example.com", "gender": "female", "country": "DE", "total_names": 644, "probability": 88, "id": "123" },
{ "name": "James", "q": "james.brown@example.com", "gender": "male", "country": "US", "total_names": 45274, "probability": 100, "id": "789" }
], "duration": "5ms"
}응답 필드
| 필드 | 유형 | 설명 |
|---|---|---|
status | boolean | 다중 요청이 오류 없이 처리되었는지 나타냅니다. |
used_credits | integer | 전송한 모든 이메일 주소에 사용된 크레딧입니다. |
remaining_credits | integer | 요청 후 사용할 수 있는 크레딧입니다. |
expires | integer | 요금제 만료 시각의 UNIX 타임스탬프입니다. |
names | object[] | 전송한 이메일 주소의 결과 목록입니다. |
names[].name | string | 이메일 주소에서 추출한 이름입니다. |
names[].q | string | 전송한 원래 이메일 주소입니다. |
names[].gender | string | null | 예측값으로 male, female 또는 null을 반환합니다. |
names[].country | string | 결과에 사용된 국가 코드입니다. |
names[].total_names | integer | 결과의 근거가 된 이름 레코드 수입니다. |
names[].probability | integer | 예측 신뢰도 백분율입니다. |
names[].id | string | integer | 레코드 연결을 위해 반환되는 입력 ID입니다. |
duration | string | 전체 서버 처리 시간입니다. |
요청당 최대 50개 레코드로 제한
각 주소를 검증하고 큰 데이터셋은 최대 50개 단위로 나누세요. 결과를 사용하기 전에 name과probability를 확인하세요. 이메일 요청은 저장되지 않습니다.
다음 가이드