नाम से जेंडर · एकाधिक अनुरोध

एक request में multiple names analyze करें

Optional country context और अपने record identifiers के साथ अधिकतम 100 names submit करें।

POSThttps://api.genderapi.io/api/name/multi/country

Bulk request overview

अधिकतम 100 names process करें

data array भेजें और हर record के लिए एक result पाएँ। हर prediction को source record से सही ढंग से जोड़ने के लिए अपने system का id दें।

MethodPOST
Maximum100 names
AuthenticationBearer token
AI fallbackSupported नहीं
Bulk requests AI inference इस्तेमाल नहीं करते।

askToAI और forceToGenderize उपलब्ध नहीं हैं। Non-Latin script या AI fallback की जरूरत वाले name के लिए single-name endpoint इस्तेमाल करें।

HDR

जरूरी HTTP headers

Bulk request authorize करें

Content-Typeapplication/json
AuthorizationBearer YOUR_API_KEY

JSON request body

Parameters

FieldTypeRequirementDescription
dataobject[]जरूरी1 से 100 name records वाली array।
data[].namestringजरूरीAnalyze करने के लिए first name।
data[].countrystringवैकल्पिकISO 3166-1 alpha-2 country code। Country result न मिलने पर global result इस्तेमाल होता है।
data[].idstring | integerवैकल्पिकआपका record identifier, जो result को source record से जोड़ने के लिए बिना बदलाव लौटता है।
Country fallback

Supplied country के लिए match न मिले तो GenderAPI उपलब्ध global name result लौटाता है। IN, DE या US जैसे ISO 3166-1 alpha-2 values इस्तेमाल करें।

Request payload

Data array बनाएँ

JSON
{
  "data": [
    { "name": "Priya", "country": "IN", "id": "123" },
    { "name": "Andrea", "country": "IT", "id": "456" },
    { "name": "James", "country": "US", "id": "789" }
  ]
}

Code examples

Multiple-name request भेजें

cURL
curl -X POST "https://api.genderapi.io/api/name/multi/country" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"data":[{"name":"Priya","country":"IN","id":"123"},{"name":"Andrea","country":"IT","id":"456"}]}'
JavaScript
const data = [
  { name: "Priya", country: "IN", id: "123" },
  { name: "Andrea", country: "IT", id: "456" }
];

const response = await fetch("https://api.genderapi.io/api/name/multi/country", {
  method: "POST",
  headers: { "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY" },
  body: JSON.stringify({ data })
});

200 response

Results को अपने records से match करें

JSON
{
  "status": true,
  "used_credits": 2,
  "remaining_credits": 7265,
  "expires": 1717069765,
  "names": [
    { "name": "priya", "q": "Priya", "gender": "female", "country": "IN", "total_names": 1000, "probability": 95, "id": "123" },
    { "name": "andrea", "q": "Andrea", "gender": "male", "country": "IT", "total_names": 13537, "probability": 98, "id": "456" }
  ],
  "duration": "5ms"
}

Response fields की जानकारी

FieldTypeDescription
statusbooleanBulk request सफलतापूर्वक पूरा हुआ या नहीं।
used_creditsintegerसभी submitted names में इस्तेमाल हुए credits।
remaining_creditsintegerRequest के बाद उपलब्ध credits।
expiresintegerPackage expiry का UNIX timestamp।
namesobject[]Name prediction results का ordered collection।
names[].namestringPrediction के लिए इस्तेमाल हुआ normalized name।
names[].qstringRequest में भेजा गया original name।
names[].genderstring | nullPredicted value: male, female या null।
names[].countrystringइस result में इस्तेमाल हुआ country code।
names[].total_namesintegerइस result को support करने वाले samples की संख्या।
names[].probabilityintegerप्रतिशत में prediction probability।
names[].idstring | integerRecord matching के लिए लौटाया गया input identifier।
durationstringकुल server processing time।

हर request को 100 records के भीतर रखें

Array भेजने से पहले validate करें और deterministic record matching के लिए unique id इस्तेमाल करें। बड़े datasets को अधिकतम 100 names के batches में बाँटें।

अगली गाइड

Email से gender पता करें

Email single requestEmail से name extract और analyze करें →Name single requestएक name के लिए AI fallback इस्तेमाल करें →