Gender API

Gender API

Keep your registration forms simple. Optimize your conversions and let us determine the gender of your customers.
Free Plan $0.00 Monthly Subscribe
50 Requests / Monthly
Free for Lifetime
No Credit Card Required
MOST POPULAR
Starter Plan $7.99 Monthly Subscribe
5,000 Requests / Monthly
Standard Support
6M+ Names
189 Supported Countries
Pro Plan $34.99 Monthly Subscribe
35,000 Requests / Monthly
Standard Support
6M+ Names
189 Supported Countries
Enterprise Plan $79.99 Monthly Subscribe
100,000 Requests / Monthly
Standard Support
6M+ Names
189 Supported Countries
Custom Plan Volume Monthly Contact Us
Any requests volume you need
6M+ Names
189 Supported Countries

Gender-API helps you determine whether a first name is more likely to be used by males or females. Optimize your websites and apps. With an easy-to-implement API.

Gender-API helps you determine whether a first name is more likely to be used by males or females. Optimize your websites and apps. With an easy-to-implement API.

Gender-API will determine the gender of your customers by their first name.

Example Request


curl --request POST 
--url 'https://api.apilayer.com/gender/gender/by-first-name' 
--header 'apikey: YOURKEY' 
--data-raw '{"first_name":"Sandra"}'

Gender-API will help you enrich existing records by querying multiple names with a single API call.

Example Request


curl --request POST 
--url 'https://api.apilayer.com/gender/gender/by-first-name' 
--header 'apikey: YOURKEY' 
--data-raw '[{"first_name":"Sandra"},{"first_name":"Jason"}]'

Furthermore, Gender-API lets you localize your lookups. For example, while Andrea is male in Italy, Andrea is a female name in Germany and can even be both in the US. Our API will consider all these possibilities and give you a probability score on how certain we are that the result is correct.

Example Request


curl --request POST 
--url 'https://api.apilayer.com/gender/gender/by-first-name' 
--header 'apikey: YOURKEY' 
--data-raw '{"first_name":"Sandra", "country": "DE"}'

Example 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"
}

Also, the API can split a full name into its parts. If you query a name like ""Theresa Miller"", our API will return the first name, the last name, and the possible gender of this person.

Example Request


curl --request POST 
--url 'https://api.apilayer.com/gender/gender/by-first-name' 
--header 'apikey: YOURKEY' 
--data-raw '{"full_name":"Theresa Miller"}'

Example Response


{
    "input": {
        "full_name": "Theresa Miller"
    },
    "details": {
    "credits_used": 1,
        "duration": "33ms",
        "samples": 8961,
        "country": null,
        "first_name_sanitized": "theresa"
    },
    "result_found": true,
    "last_name": "Miller",
    "first_name": "Theresa",
    "probability": 0.98,
    "gender": "female"
}

Use the email API to extract names from an email address:

Example Request


curl --request POST 
--url 'https://api.apilayer.com/gender/gender/by-email-address' 
--header 'apikey: YOURKEY' 
--data-raw '{"email":"[email protected]"}'

Example Response


{
    "input": {
        "email": "[email protected]"
    },
    "details": {
        "credits_used": 1,
        "duration": "12ms",
        "samples": 8961,
        "country": null,
        "first_name_sanitized": "theresa"
    },
    "result_found": true,
    "last_name": "Miller",
    "first_name": "Theresa",
    "probability": 0.98,
    "gender": "female"
}

What happens if a name can be male as well as female?

Depending on your API version or the integration you're using, our endpoints will either return an accuracy or a probability value in the response. The accuracy parameter returns how sure we are that this name is either male or female. The value is calculated by the number of records in our database. For example, if we have 100 samples of a name, 96 are female, and 4 are male, the accuracy is 96% (or a .96 probability). A low accuracy indicates that this name is probably used by multiple genders and cannot be conjugated to a specific gender.

Can there be differences for the same name per country?

While the name Andrea is male in Italy, Andrea is a female name in Germany and can even be both in the US. In this case, we provide an accuracy value in the query result, ranging between 0 and 100 (or a probability value between 0 and 1). It tells you how certain we are in having detected the correct gender. You can significantly increase the API's result quality by providing some geographical information about your query. Geographical information can be a country code, the browser's locale, or an IP address.

Which countries are supported?

The API currently supports 191 countries and contains 6,084,389 validated names. For example, you can look up 475,460 names in Germany, 671,968 in the US, or 576,234 in India.

Gender API Reference

This API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Just Getting Started?

Check out our development quickstart guide.

Authentication

Gender API uses API keys to authenticate requests. You can view and manage your API keys in the Accounts page.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All requests made to the API must hold a custom HTTP header named "apikey". Implementation differs with each programming language. Below are some samples.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Endpoints

Get A Name Country of Origin.

Parameters

body (required)

JSON body for first name and other data. Example: {"first_name":"Johann"}

Location: Body, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Query by A Single Email Address.

Parameters

body (required)

JSON body for email address and other data. Example: {"email":"[email protected]"}

Location: Body, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Query By A Single First Name.

Parameters

body (required)

JSON body for first name and other data. Example: {"first_name":"Sandra"}

Location: Body, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Query By A Single Full Name.

Parameters

body (required)

JSON body for full name and other data. Example: {"full_name":"Theresa Miller"}

Location: Body, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Rate Limiting

Each subscription has its own rate limit. When you become a member, you start by choosing a rate limit that suits your usage needs. Do not worry; You can upgrade or downgrade your plan at any time. For this reason, instead of starting with a larger plan that you do not need, we can offer you to upgrade your plan after you start with "free" or "gold plan" options and start using the API.

When you reach a rate limit (both daily and monthly), the service will stop responding and returning the HTTP 429 response status code (Too many requests) for each request with the following JSON string body text.

{
"message":"You have exceeded your daily\/monthly API rate limit. Please review and upgrade your subscription plan at https:\/\/apilayer.com\/subscriptions to continue."
}

A reminder email will be sent to you when your API usage reaches both 80% and 90%, so that you can take immediate actions such as upgrading your plan in order to prevent your application using the API from being interrupted.

You can also programmatically check your rate limit yourself. As a result of each request made to the APILayer, the following 4 fields provide you with all the necessary information within the HTTP Headers.

x-ratelimit-limit-month: Request limit per month
x-ratelimit-remaining-month: Request limit remaining this month
x-ratelimit-limit-day: Request limit per day
x-ratelimit-remaining-day: Request limit remaining today

You can contact our support unit if you need any assistance with your application regarding to handle the returned result by looking at the header information.

Error Codes

APILayer uses standard HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate a clientside error, which means that failed given the information provided (e.g., a missing parameter, unauthorized access etc.). Codes in the 5xx range indicate an error with APILayer's servers (normally this should'nt happen at all).

If the response code is not 200, it means the operation failed somehow and you may need to take an action accordingly. You can check the response (which will be in JSON format) for a field called 'message' that briefly explains the error reported.

Status Code Explanation
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
404 - Not Found The requested resource doesn't exist.
429 - Too many requests API request limit exceeded. See section Rate Limiting for more info.
5xx - Server Error We have failed to process your request. (You can contact us anytime)

You can always contact for support and ask for more assistance. We'll be glad to assist you with building your product.