Get Gender by Email - Multiple Request

The Multiple Email endpoint allows you to analyze the gender of up to 50 email addresses in a single request. This is useful for bulk processing and high-performance integrations. All parameters are sent via a POST request as JSON. You must authenticate using the Bearer token method in the Authorization header.

The API extracts likely first names from each email address and determines gender for each. You can also pass an optional country filter and a custom id field for each record to match results with your database.

Request URL

POST https://api.genderapi.io/api/email/multi/country

Required HTTP Headers

  • Content-Type: application/json
  • Authorization: Bearer YOUR_API_KEY

Request Body Parameters

Field Type Required Description
data Array of Objects Yes Array of emails and their optional parameters. Maximum 50 entries per request.
email String Yes (inside each object) The email address to analyze. The API will extract the likely first name.
country String No A two-letter country code (ISO 3166-1 alpha-2) to improve prediction accuracy. Example: TR for Turkey.
id String or Integer No Optional ID you define to match results with your own database records. The same id will be returned in the response for mapping purposes.

Example Request Body

{
  "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" }
  ]
}

Example Requests


cURL Example

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":"andrea.rossi@example.it","country":"IT","id":"456"},{"email":"james.brown@example.com","country":"US","id":"789"}]}'

PHP cURL Example

<?php
$url = "https://api.genderapi.io/api/email/multi/country";

$data = array(
    "data" => array(
        array(
            "email" => "andrea.schmidt@example.com",
            "country" => "DE",
            "id" => "123"
        ),
        array(
            "email" => "andrea.rossi@example.it",
            "country" => "IT",
            "id" => "456"
        ),
        array(
            "email" => "james.brown@example.com",
            "country" => "US",
            "id" => "789"
        )
    )
);

$payload = json_encode($data);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "Content-Type: application/json",
    "Authorization: Bearer YOUR_API_KEY"
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>

JavaScript fetch Example

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: [
      { 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" }
    ]
  })
})
.then(response => response.json())
.then(data => console.log(data));

Python requests Example

import requests

url = "https://api.genderapi.io/api/email/multi/country"

payload = {
    "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" }
    ]
}

headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.post(url, headers=headers, json=payload)

print(response.json())

Example JSON Response

{
  "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": "Andrea",
      "q": "andrea.rossi@example.it",
      "gender": "male",
      "country": "IT",
      "total_names": 13537,
      "probability": 98,
      "id": "456"
    },
    {
      "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 Indicates whether the request was successful.
used_credits Integer Number of credits consumed for this request.
remaining_credits Integer Credits left in your account after this request.
expires Integer (timestamp) Package expiration date as a UNIX timestamp.
names Array of objects List of results for each input email.
names[].name String The extracted first name from the email.
names[].q String Your original email input.
names[].gender Enum[String] Predicted gender: male, female, or null.
names[].country String Country code considered during the prediction.
names[].total_names Integer Number of samples used for this prediction.
names[].probability Integer Confidence percentage for the gender prediction.
names[].id String / Integer The same id you sent in the request. Used to match your records.
duration String Total processing time for the request (e.g. 5ms).