⚡ Unified API v2.0 ADVANCED

API DOCUMENTATION

Experience our high-performance unified API designed for advanced users with high request volumes. Query multiple names in a single request with lightning-fast response times.

Query by first name

This is the easiest way to query a gender by a name. Each response is JSON encoded:

POST https://gender-api.com/v2/gender

info Required Requests: 1
http Headers
Content-Type: application/json
Authorization: Bearer <your authorization token>
link
data_object JSON Payload
Field Type Required Description
first_name string Yes Name to query
country string No ISO 3166 ALPHA-2 Country Code
link
locale string No Browser Locale
ip string No Valid IPv4 or IPv6 address
id string No Max 50 chars. You can set this id to any alphanumeric value you want. As an example, you can set the id to your internal id of the dataset in your database. In an asynchronus environment this can help you to better connect the response to a previous request

code Request Examples

arrow_forward Query by first name only
{
    "first_name": "Sandra"
}
arrow_forward Query by first name and country code
{
    "first_name": "Sandra",
    "country": "US"
}
arrow_forward Query by first name and browser locale
{
    "first_name": "Sandra",
    "locale": "en_US"
}
arrow_forward Query by first name and use an IP address for localization
{
    "first_name": "Sandra",
    "ip": "54.201.16.177"
}
arrow_forward Query multiple names in a single request
[
    {
        "first_name": "Sandra",
        "country": "US"
    },
    {
        "first_name": "Jason",
        "country": "US"
    }
]

check_circle Response

{
    "input": {
        "first_name": "Sandra"
    },
    "details": {
        "credits_used": 1,
        "samples": 464,
        "country": null,
        "first_name_sanitized": "sandra",
        "duration": "436ms"
    },
    "result_found": true,
    "first_name": "Sandra",
    "probability": 0.85,
    "gender": "female"
}

list Response Fields

Field Type Description
input object The submitted payload
details.credits_used int The amount of requests used for this query
details.samples int Number of records found in our database which match your request
details.country string The country we found
details.first_name_sanitized string The name after we applied our normalizer to it
details.duration string Time the server needed to process the request
result_found bool True if we were able to query a gender for the given name
first_name string The first name we used for genderization
probability float This value (between 0 and 1) determines the reliability of our database. A value of 1 means that the results on your gender request are 100% accurate.
gender string Possible values: male, female, unknown
Chat