Bulk request overview
Process up to 50 usernames
Send a data array. GenderAPI extracts potential name signals from each handle and returns results with your optional record id.
Handles may contain brands, fantasy terms or unrelated words. Bulk requests do not accept askToAI or forceToGenderize. For higher-confidence handling of unusual inputs, use the single request.
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 username records. |
data[].username | string | Required | Username or handle to analyze; underscores and numbers are supported. |
data[].country | string | Optional | ISO 3166-1 alpha-2 country code used as regional context. |
data[].id | string | integer | Optional | Your identifier, returned unchanged with the corresponding result. |
Latin-character usernames generally provide clearer name signals. Use unique id values and evaluate the extracted name and probability before updating records.
Request payload
Build the username array
{
"data": [
{ "username": "anna_smith88", "country": "US", "id": "123" },
{ "username": "michael_bauer", "country": "DE", "id": "456" },
{ "username": "giulia_rossi", "country": "IT", "id": "789" }
]
}Code examples
Send a multiple-username request
curl -X POST "https://api.genderapi.io/api/username/multi/country" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"data":[{"username":"anna_smith88","country":"US","id":"123"},{"username":"michael_bauer","country":"DE","id":"456"}]}'const data = [
{ username: "anna_smith88", country: "US", id: "123" },
{ username: "michael_bauer", country: "DE", id: "456" }
];
const response = await fetch("https://api.genderapi.io/api/username/multi/country", {
method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY" },
body: JSON.stringify({ data })
});200 response
Extracted names and predictions
{
"status": true, "used_credits": 3, "remaining_credits": 7265, "expires": 1717069765,
"names": [
{ "name": "Anna", "q": "anna_smith88", "gender": "female", "country": "US", "total_names": 1234, "probability": 92, "id": "123" },
{ "name": "Michael", "q": "michael_bauer", "gender": "male", "country": "DE", "total_names": 5678, "probability": 89, "id": "456" }
], "duration": "5ms"
}Response fields
| Field | Type | Description |
|---|---|---|
status | boolean | Whether the bulk request completed successfully. |
used_credits | integer | Credits consumed across submitted usernames. |
remaining_credits | integer | Credits available after the request. |
expires | integer | Package expiration time as a UNIX timestamp. |
names | object[] | Results for the submitted usernames. |
names[].name | string | Potential name extracted from the username. |
names[].q | string | Original username 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
Split larger inputs into batches. A username is an indirect signal, so verify the extracted name and establish an acceptable probability threshold before applying results.
Next reference