Gender API to detect gender of any name

The gender API endpoint takes a persons first name, runs a quick gender detection and returns the gender. To determine the gender of a name we maintain a high quality database with 1.597.154 first names originating from 104 countries categorized by gender.

The gender API endpoint is very valuable for online businesses and services. By knowing a persons gender you can better segment your marketing campaigns and use the right salutation in e-mails. We've compiled a list with use cases on a separate page.

Request parameters

Name Required Description Example
api_key required Your API key is required for every API call. Register for a free API key. 93d471ea85d1937e713e8aafffb32090
firstname required The firstname that you want to know the gender from. You can query multiple firstname in a single request by making an array out of it.
Example: firstname[]=John&firstname[]=Sarah
country_code optional If you know the country code associated with the name then you can provide it. By providing the country code the accuracy of the gender will be higher. The country code should be 2 characters according to the ISO 3166-2 country code specification. If the firstname parameter contains multiple names then the country_code should also be an array. DE
ip optional If you don't know the country code you can always provide an IP address. We convert the IP address to a country_code internally. If the firstname parameter contains multiple names then the ip should also be an array.
response_type optional The API returns JSON objects written in key/value pairs by default. If needed you can also get the response as a JSON array instead. object, array
gender_type optional Different type of kind can be used as a value for gender_formatted. By default the gender field returns "male" or "female". You can change the formatting from sex (default) to gender, marital, birth and slang. sex, gender, marital, birth, slang

Request URL

This is the easiest way to use the gender API and detect the gender of a name. Each response is JSON encoded so easy to use. You can copy past the request URL in the address bar of your browser to see the response.

If you know the country code of the first name then you can add the country code parameter. By specifying the country code the accuracy will increase. All endpoints use the ISO 3166-2 for country codes. Check our list of countries to see all supported country codes.

It is possible to query multiple first names in a single request. For the rate limit this counts as a single request making it ideal of you want to process high volumes of first names. The maximum number of queries depends on you subscription. If you also use the country_code then you have to make an array of that as well.[]=John&firstname[]=Sarah

Response object

    results: 1,
    error: null,
    data: [
            name: {
                firstname: {
                    name: "John",
                    name_ascii: "John",
                    validated: true,
                    gender: "m",
                    gender_formatted: "male",
                    unisex: false,
                    gender_deviation: 0,
                    country_code: "US"
                    country_certainty: 60,
                    country_rank: 3,
                    alternative_countries: {
                        GB: 13,
                        CA: 3
            country: {
                country_code: "US",
                country_certainty: 60,
                country_code_alpha: "USA",
                name: "United States",
                continent: "North America",
                demonym: "American",
                primary_language_code: "en",
                primary_language: "English",
                currency: "USD",
                alternative_countries: {
                    GB: 13,
                    CA: 3

Response parameters

Most response parameters are self-explanatory. However, there are a few fields that need an additional explanation. These fields are listed in the table below. If you're looking for is a response parameter that is not in this list, please contact us and we'll add it to this list.

Name Type Description
validated boolean Most countries and their governments have great open data initiatives and provide official first names, gender and frequencies. The validated key is a boolean indicating if the given first name is also in the official database for the resulting country. If the validated key is 'false' then the name is derived from another country. It's still an existing name but we don't have the official database for that country.
gender enum The gender is always an "m" (male) or "f" (female). Our database holds 1.597.154 official first names and their gender received from governments. By providing the country_code in the request parameter the accuracy of the gender will be higher.
unisex boolean A unisex name is a given name that can be used by a person regardless of their gender.
gender_deviation integer The gender deviation is a percentage indication the change that the gender is the opposite as provided.
alternative_countries array The country code is the most likely country where the name originates from. The alternative countries is an array that hold the 'second best' estimations. The values are the country certainty percentages (higher is more likely).