요청 개요
이메일 주소에서 성별 예측까지
GenderAPI는 주소의 로컬 부분을 분석해 가장 가능성 높은 이름을 추출하고 성별 예측에 사용합니다. 사용자의 지역을 알고 있다면 국가 코드를 추가하세요.
01이메일 입력
→michael.smith@example.com02이름 추출
→Michael03예측
male · 97%방식POST
콘텐츠 유형application/json
인증Bearer 토큰
크레딧 비용조회 1건
이메일 데이터 개인정보 보호: GenderAPI는 이메일 요청을 저장하지 않습니다. 자세한 내용은 개인정보처리방침 을 확인하세요.
HDR
필수e HTTP-headere
요청 인증하기
Content-Typeapplication/jsonAuthorizationBearer YOUR_API_KEYJSON 요청 본문
매개변수
| 매개변수 | 유형 | 필수 여부 | 설명 |
|---|---|---|---|
email | string | 필수 | 분석할 이메일 주소입니다. GenderAPI가 예측 전에 가장 가능성 높은 이름을 추출합니다. |
country | string | 선택 | KR 또는 US 같은 ISO 3166-1 alpha-2 국가 코드로 지역별 맥락을 제공합니다. |
askToAI | boolean | 선택 | true이면 추출된 이름이 데이터베이스에 없을 때 AI 보완 기능을 사용합니다. |
AI 보완 기능
askToAI는 이름 추출 후 추출된 이름이 데이터베이스에 없을 때만 사용됩니다. 이메일 엔드포인트는 forceToGenderize를 지원하지 않습니다.
코드 예제
이메일 요청 보내기
cURL
curl -X POST "https://api.genderapi.io/api/email" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"email":"michael.smith@example.com","country":"US","askToAI":true}'JavaScript
const response = await fetch("https://api.genderapi.io/api/email", {
method: "POST",
headers: { "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY" },
body: JSON.stringify({ email: "michael.smith@example.com", country: "US", askToAI: true })
});
const data = await response.json();Python
import requests
response = requests.post(
"https://api.genderapi.io/api/email",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"email": "michael.smith@example.com", "country": "US", "askToAI": True}
)
print(response.json())200 응답
이름 추출 및 성별 예측
JSON
{
"status": true,
"used_credits": 1,
"remaining_credits": 4999,
"expires": 1743659200,
"q": "michael.smith@example.com",
"name": "Michael",
"gender": "male",
"country": "US",
"total_names": 10345,
"probability": 97,
"duration": "5ms"
}응답 필드
| Felt | 유형 | 설명 |
|---|---|---|
status | boolean | 요청이 오류 없이 처리되었는지 나타냅니다. |
used_credits | integer | 요청에 사용된 크레딧 수입니다. |
remaining_credits | integer | 요청 후 사용할 수 있는 크레딧 수입니다. |
expires | integer | 요금제 만료 시각의 UNIX 타임스탬프입니다. |
q | string | 전송한 원래 이메일 주소입니다. |
name | string | 이메일 주소에서 추출한 이름입니다. |
gender | string | null | 예측값으로 male, female 또는 null을 반환합니다. |
country | string | 예측에 사용된 국가 코드입니다. |
total_names | integer | 예측의 근거가 된 이름 레코드 수입니다. |
probability | integer | 예측 신뢰도를 백분율로 표시합니다. |
duration | string | 서버 처리 시간입니다. |
유효하고 완전한 이메일 주소 사용
이름 추출 결과는 주소 구조에 따라 달라집니다. 공용 받은편지함, 별칭 또는 알아볼 수 있는 이름이 없는 로컬 부분은 빈 결과를 반환할 수 있습니다. 예측을 사용하기 전에 name, gender,probability를 확인하세요. 이메일 요청은 저장되지 않습니다.
다음 가이드