Bulk request overview
Process up to 100 names
Send a data array and receive one result per record. Add an id from your system to reliably join each prediction back to its source record.
askToAI and forceToGenderize are unavailable. For names in non-Latin scripts or inputs that need AI fallback, use the single-name endpoint.
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 100 name records. |
data[].name | string | Required | First name to analyze. |
data[].country | string | Optional | ISO 3166-1 alpha-2 country code. Falls back to a global result when no country result exists. |
data[].id | string | integer | Optional | Your record identifier, returned unchanged so results can be matched to input records. |
If no match exists for the supplied country, GenderAPI returns the available global name result. Use ISO 3166-1 alpha-2 values such as DE, IT or US.
Request payload
Build the data array
{
"data": [
{ "name": "Andrea", "country": "DE", "id": "123" },
{ "name": "andrea", "country": "IT", "id": "456" },
{ "name": "james", "country": "US", "id": "789" }
]
}Code examples
Send a multiple-name request
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":"Andrea","country":"DE","id":"123"},{"name":"andrea","country":"IT","id":"456"}]}'const data = [
{ name: "Andrea", country: "DE", 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
Match results with your records
{
"status": true,
"used_credits": 3,
"remaining_credits": 7265,
"expires": 1717069765,
"names": [
{ "name": "andrea", "q": "Andrea", "gender": "female", "country": "DE", "total_names": 644, "probability": 88, "id": "123" },
{ "name": "andrea", "q": "andrea", "gender": "male", "country": "IT", "total_names": 13537, "probability": 98, "id": "456" }
],
"duration": "5ms"
}Response fields
| Field | Type | Description |
|---|---|---|
status | boolean | Whether the bulk request completed successfully. |
used_credits | integer | Credits consumed across all submitted names. |
remaining_credits | integer | Credits available after the request. |
expires | integer | Package expiration time as a UNIX timestamp. |
names | object[] | Ordered collection of name prediction results. |
names[].name | string | Normalized name used for the prediction. |
names[].q | string | Original name 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 100 records
Validate the array before sending it and use a unique id for deterministic record matching. Split larger datasets into batches of no more than 100 names.
Next guide