Bulk request overview
Process up to 50 email addresses
Send a data array. GenderAPI extracts a likely name from every address and returns the matching prediction; your optional id makes database correlation deterministic.
MethodPOST
Maximum50 emails
AuthenticationBearer token
Result formatnames[]
50 emails max→Name extraction→Country-aware results
HDR
Required HTTP headers
Authorize the bulk request
Content-Typeapplication/jsonAuthorizationBearer YOUR_API_KEYJSON request body
Parameters
| Field | Type | Requirement | Description |
|---|---|---|---|
data | object[] | Required | Array containing between 1 and 50 email records. |
data[].email | string | Required | Email address from which GenderAPI extracts a likely first name. |
data[].country | string | Optional | ISO 3166-1 alpha-2 country code used as regional context. |
data[].id | string | integer | Optional | Your record identifier, returned unchanged with the corresponding result. |
Record matching
Use a unique id for each item. GenderAPI returns it with that item’s result, allowing you to update the correct database record without relying on array position alone.
Request payload
Build the email array
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" }
]
}Code examples
Send a multiple-email request
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 response
Extracted names and predictions
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"
}Response fields
| Field | Type | Description |
|---|---|---|
status | boolean | Whether the bulk request completed successfully. |
used_credits | integer | Credits consumed across all submitted emails. |
remaining_credits | integer | Credits available after the request. |
expires | integer | Package expiration time as a UNIX timestamp. |
names | object[] | Ordered collection of results for the submitted emails. |
names[].name | string | First name extracted from the email address. |
names[].q | string | Original email submitted in the request. |
names[].gender | string | null | Predicted value: male, female or null. |
names[].country | string | Country code considered for this result. |
names[].total_names | integer | Number of samples supporting this result. |
names[].probability | integer | Prediction confidence as a percentage. |
names[].id | string | integer | Input identifier returned for record correlation. |
duration | string | Total server processing time. |
Keep each request within 50 records
Validate every address and split larger datasets into batches of no more than 50. Check the extracted name and probability before applying a result.
Next guide