ईमेल से जेंडर · एकल अनुरोध

Email address से gender पता करें

एक email address से संभावित first name निकालें और country-aware gender prediction पाएँ।

POSThttps://api.genderapi.io/api/email

Request overview

Email address से prediction तक

GenderAPI address के local part को analyze करता है, सबसे संभावित first name निकालता है और उसी name से gender prediction करता है। User का region पता हो तो country context दें।

MethodPOST
Content typeapplication/json
AuthenticationBearer token
Credit cost1 lookup
HDR

जरूरी HTTP headers

Request authorize करें

Content-Typeapplication/json
AuthorizationBearer YOUR_API_KEY

JSON request body

Parameters

ParameterTypeRequirementDescription
emailstringजरूरीAnalyze किया जाने वाला पूरा email address। Prediction से पहले सबसे संभावित first name निकाला जाता है।
countrystringवैकल्पिकRegional context के लिए US या IN जैसा ISO 3166-1 alpha-2 country code।
askToAIbooleanवैकल्पिकExtracted name का database result न मिलने पर true value AI fallback चालू करती है।
AI fallback

askToAI, name extraction के बाद और केवल extracted name database में न मिलने पर evaluate होता है। Email endpoint forceToGenderize स्वीकार नहीं करता।

Code examples

Email request भेजें

cURL
curl -X POST "https://api.genderapi.io/api/email" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"email":"priya.sharma@example.com","country":"IN","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: "priya.sharma@example.com", country: "IN", 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": "priya.sharma@example.com", "country": "IN", "askToAI": True}
)
print(response.json())

200 response

Extracted name और prediction

JSON
{
  "status": true,
  "used_credits": 1,
  "remaining_credits": 4999,
  "expires": 1788628316,
  "q": "priya.sharma@example.com",
  "name": "Priya",
  "gender": "female",
  "country": "IN",
  "total_names": 18342,
  "probability": 98,
  "duration": "5ms"
}

Response fields

FieldTypeDescription
statusbooleanRequest सफलतापूर्वक पूरा हुआ या नहीं।
used_creditsintegerइस request में इस्तेमाल हुए credits।
remaining_creditsintegerRequest के बाद उपलब्ध credits।
expiresintegerPackage expiry का UNIX timestamp।
qstringRequest में भेजा गया original email address।
namestringEmail address से निकाला गया first name।
genderstring | nullPredicted value: male, female या null।
countrystringPrediction में इस्तेमाल हुआ country code।
total_namesintegerPrediction को support करने वाले samples की संख्या।
probabilityintegerप्रतिशत में prediction confidence।
durationstringServer processing time।

Valid और पूरा email address इस्तेमाल करें

Name extraction address structure पर निर्भर करता है। Generic inbox, alias या पहचान योग्य name के बिना local part कोई result नहीं दे सकता; prediction इस्तेमाल करने से पहले name, gender और probability जाँचें।

अगली गाइड

Multiple email addresses analyze करें

Email multiple requestएक request में कई addresses process करें →Name single requestKnown first name सीधे भेजें →