FREQUENTLY ASKED QUESTIONS

WHAT ABOUT THE NEW GENERAL DATA PROTECTION REGULATION (GDPR)?

The new European General Data Protection Regulation (GDPR) goes into effect on May 25, 2018. We can assure you that all Gender-API.com services will be in full compliance with GDPR by this date. We provide a Data Processing Agreement (DPA), which enables you to comply with your GDPR obligations. You can request this agreement here in your account. A sample agreement can be downloaded here.

WHAT HAPPENS IF A NAME CAN BE MALE AS WELL AS FEMALE?

If you can provide a country code or specific territory in your query, we can guarantee a significant improve in detecting the right gender. For example: While 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. It tells you how certain we are in having detected the right gender. If you think the value is too low, you can still ask your user to provide the right gender themselves. In most countries, however, we can determine the correct gender in over 94% of cases.

HOW DO YOU GATHER THE DATA?

To provide the highest possible accuracy, we combine the data of multiple data sources. We use data from publicly available governmental sources and combine them with data we crawl from social networks, which provides you the best possible matches. Each name has to be verified by different sources to be added to our list.

HOW MANY NAMES DO YOU HAVE STORED IN YOUR DATABASE?

Our database contains 1,847,011 validated names from 177 different countries. All over the world we store 809,765 unique names. On an average we analyze about 10,000,000 datasets per month to improve the quality of our results.

WHICH COUNTRIES ARE SUPPORTED?

The API fully supports 177 countries. Full support means that we collected at least 300 names in this respective country. However, in most countries our dataset is much larger. Take a look at the following table to learn more about how many names we support in which country. Keep in mind that if we do not provide a suitable support for a country ourselves, you can still crawl the requested names against the entire dataset to get an adequate result.
1.
Afghanistan
2,126
2.
Albania
6,309
3.
Algeria
24,226
4.
Andorra
760
5.
Angola
8,456
6.
Argentina
10,928
7.
Armenia
1,604
8.
Aruba
134
9.
Australia
9,978
10.
Austria
11,015
11.
Azerbaijan
4,967
12.
Bahamas
532
13.
Bahrain
4,207
14.
Bangladesh
11,096
15.
Barbados
423
16.
Belarus
3,324
17.
Belgium
28,927
18.
Belize
292
19.
Benin
4,670
20.
Bermuda
118
21.
Bhutan
177
22.
Bolivia
1,715
23.
Bosnia and Herzegovina
3,966
24.
Botswana
2,232
25.
Brazil
54,979
26.
Brunei
563
27.
Bulgaria
5,177
28.
Burkina Faso
3,266
29.
Burundi
825
30.
Cambodia
2,199
31.
Cameroon
9,275
32.
Canada
16,196
33.
Cape Verde
1,838
34.
Central African Republic
124
35.
Chad
416
36.
Chile
6,615
37.
China
25,675
38.
Colombia
14,937
39.
Comoros
458
40.
Congo - Brazzaville
4,284
41.
Congo - Kinshasa
1,260
42.
Costa Rica
2,557
43.
Croatia
3,330
44.
Cuba
1,331
45.
Cyprus
4,035
46.
Czech Republic
16,208
47.
Côte d’Ivoire
15,363
48.
Denmark
6,897
49.
Djibouti
1,596
50.
Dominican Republic
4,176
51.
Ecuador
4,694
52.
Egypt
15,454
53.
El Salvador
3,117
54.
Equatorial Guinea
744
55.
Estonia
2,387
56.
Ethiopia
3,624
57.
Faroe Islands
134
58.
Fiji
922
59.
Finland
5,324
60.
France
121,080
61.
French Guiana
886
62.
French Polynesia
352
63.
Gabon
2,886
64.
Gambia
977
65.
Georgia
1,644
66.
Germany
54,765
67.
Ghana
8,856
68.
Gibraltar
418
69.
Greece
13,004
70.
Greenland
176
71.
Grenada
130
72.
Guadeloupe
708
73.
Guam
302
74.
Guatemala
2,419
75.
Guernsey
168
76.
Guinea
1,149
77.
Guinea-Bissau
114
78.
Guyana
336
79.
Haiti
857
80.
Honduras
1,641
81.
Hong Kong SAR China
6,377
82.
Hungary
11,456
83.
Iceland
1,612
84.
India
93,892
85.
Indonesia
62,214
86.
Iran
9,792
87.
Iraq
9,476
88.
Ireland
6,889
89.
Isle of Man
166
90.
Israel
9,438
91.
Italy
68,542
92.
Jamaica
1,650
93.
Japan
23,589
94.
Jersey
458
95.
Jordan
5,650
96.
Kazakhstan
4,450
97.
Kenya
9,663
98.
Kuwait
10,214
99.
Kyrgyzstan
1,497
100.
Laos
775
101.
Latvia
2,184
102.
Lebanon
8,460
103.
Lesotho
580
104.
Liberia
700
105.
Libya
2,583
106.
Liechtenstein
179
107.
Lithuania
2,654
108.
Luxembourg
2,812
109.
Macedonia
3,693
110.
Madagascar
3,303
111.
Malawi
1,145
112.
Malaysia
25,319
113.
Maldives
793
114.
Mali
3,233
115.
Malta
2,321
116.
Martinique
614
117.
Mauritania
979
118.
Mauritius
4,181
119.
Mayotte
240
120.
Mexico
19,403
121.
Micronesia
165
122.
Moldova
2,134
123.
Monaco
563
124.
Mongolia
760
125.
Montenegro
1,060
126.
Morocco
30,312
127.
Mozambique
5,018
128.
Myanmar [Burma]
4,015
129.
Namibia
2,261
130.
Nepal
3,479
131.
Netherlands
35,226
132.
New Caledonia
351
133.
New Zealand
3,735
134.
Nicaragua
1,469
135.
Niger
1,286
136.
Nigeria
50,295
137.
Norway
7,585
138.
Oman
6,978
139.
Pakistan
13,562
140.
Palestinian Territories
2,529
141.
Panama
2,047
142.
Papua New Guinea
816
143.
Paraguay
1,441
144.
Peru
8,303
145.
Philippines
20,341
146.
Poland
14,039
147.
Portugal
24,893
148.
Puerto Rico
2,688
149.
Qatar
5,797
150.
Romania
16,743
151.
Russia
29,415
152.
Rwanda
2,318
153.
Réunion
3,639
154.
Saint Helena
1,281
155.
Saint Lucia
292
156.
San Marino
305
157.
Saudi Arabia
37,545
158.
Senegal
9,925
159.
Serbia
7,306
160.
Seychelles
498
161.
Sierra Leone
735
162.
Singapore
10,648
163.
Slovakia
5,720
164.
Slovenia
3,184
165.
Solomon Islands
128
166.
Somalia
708
167.
South Africa
29,794
168.
South Korea
28,814
169.
Spain
160,271
170.
Sri Lanka
6,962
171.
Sudan
4,286
172.
Suriname
327
173.
Swaziland
472
174.
Sweden
17,278
175.
Switzerland
22,320
176.
Syria
4,047
177.
São Tomé and Príncipe
211
178.
Taiwan
18,515
179.
Tajikistan
681
180.
Tanzania
4,808
181.
Thailand
53,024
182.
Timor-Leste
198
183.
Togo
3,348
184.
Trinidad and Tobago
1,138
185.
Tunisia
14,134
186.
Turkey
63,385
187.
Turkmenistan
536
188.
U.S. Virgin Islands
239
189.
Uganda
6,256
190.
Ukraine
11,295
191.
United Arab Emirates
14,116
192.
United Kingdom
61,245
193.
United States
97,487
194.
Uruguay
1,796
195.
Uzbekistan
2,045
196.
Venezuela
10,020
197.
Vietnam
18,169
198.
Western Sahara
197
199.
Yemen
3,658
200.
Zambia
2,119
201.
Zimbabwe
2,735

I HEARD ABOUT YOUR EMAIL API. WHAT EXACTLY IS THIS?

Our email API can extract names from email addresses and provide the appropriate gender to this respective address. This can help you to personalize your emailings with a proper salutation. For example, from the email address "marie.johnson@gmail.com", API will extract the name "Marie" and determine the correct gender, which is "female". For details please take a look at our API Docs.

I HAVE A HUGE AMOUNT OF DATA. CAN I BULK UPLOAD A CSV FILE?

As a registered user you can upload any CSV file containing a first name column. For a better determination result, you can optionally add a country column to your dataset. While it is not necessary to specifically name the columns, our assistant guides you through the process by letting you choose which column contains which token, first name or country included. The feature is located within your account. Processed records will be charged like requests so that you can upload a CSV file with up to 500 entries for free every month. The CSV bulk upload requires a Gender-API.com account.

HOW IS THE CSV FILE TO BE FORMATTED?

We support CSV files created on Windows, Mac OSX or Linux. In addition, we support files with delimiters like ";", "," or a tab. The enclosure char must be a ". Furthermore, you can upload multi-line CSV files with a maximum of 10,000,000 rows and 301MB. To achieve the best results possible, we however recommend using a UTF-8 formatted CSV file with semicolon as delimiter. Otherwise, the CSV file can contain further, arbitrary rows which will also be included in the output file. The file must contain at least one column with first names only. Click here to download a sample file. Please create a Gender-API.com account to upload a CSV file.

CAN I UPLOAD AN EXCEL FILE?

You can upload Excel files with up to 200,000 rows. For larger datasets, please use our CSV file upload. We support .xlsx files with a single sheet. If you upload a file with more than one sheet, only the first will be processed. The first row in your sheet must contain the column names. The file must contain at least one column with first names, the country column is optional. Download sample file here. Example:
Excel Example

DO YOU PROVIDE ANY LIBRARIES FOR PROGRAMMING LANGUAGES?

Due to the simplicity of our API, we do not provide a lib for any programming language, except the jQuery Plugin. Most languages support a json parser out-of-the-box and for almost every other language, there is already an external lib you can use. Take a look at our coding examples to get started with using the API:

First install our library with composer:

$ composer require gender-api/client
use GenderApi\Client as GenderApiClient;

try {
    $apiClient = new GenderApiClient('insert your API key');

    // Query a single name
    $lookup = $apiClient->getByFirstName('elisabeth');
    if ($lookup->genderFound()) {
        echo $lookup->getGender();      // female
    }

    // Query a full name and improve the result by providing a country code
    $lookup = $apiClient->getByFirstNameAndLastNameAndCountry('Thomas Johnson', 'US');
    if ($lookup->genderFound()) {
        echo $lookup->getGender();      // male
        echo $lookup->getFirstName();   // Thomas
        echo $lookup->getLastName();    // Johnson
    }

} catch (GenderApi\Exception $e) {
    // Name lookup failed due to a network error or insufficient credits
    // left. See https://gender-api.com/en/api-docs/error-codes
    echo 'Exception: ' . $e->getMessage();
}

See full client documentation here:

https://github.com/markus-perl/gender-api-client

function getGender($firstname) {
    $myKey = 'insert your server key here';
    $data = json_decode(file_get_contents(
        'https://gender-api.com/get?key=' . $myKey .
        '&name=' . urlencode($firstname)));
    return $data->gender;
}

echo getGender('markus'); //Output: male

First install our library with npm:

$ npm i gender-api.com-client --save
import {Client as GenderApiClient, ResultSingleName} from "gender-api.com-client";

const genderApiClient = new GenderApiClient("your API key");

try {
    genderApiClient.getByFirstName('theresa', (response: ResultSingleName) => {
      console.log(response.gender); //female
      console.log(response.accuracy); //98
    });
  
    genderApiClient.getByFirstNameAndCountry('john', 'US', (response: ResultSingleName) => {
      console.log(response.gender); //male
      console.log(response.accuracy); //99
    });
}
catch(e) {
  console.log('Error:', e);
}

See full client documentation here:

https://github.com/markus-perl/gender-api-client-npm

First install our library with npm:

$ npm i gender-api.com-client --save
try {
    var GenderApi = require('gender-api.com-client');

    var genderApiClient = new GenderApi.Client('your api key');

    genderApiClient.getByFirstName('theresa', function (response) {
        console.log(response.gender); //female
        console.log(response.accuracy); //98
    });

    genderApiClient.getByFirstNameAndCountry('john', 'US', function (response) {
        console.log(response.gender); //male
        console.log(response.accuracy); //99
    });

}
catch(e) {
    console.log('Error:', e);
}

See full client documentation here:

https://github.com/markus-perl/gender-api-client-npm

Python 3.*
import json

from urllib.request import urlopen

myKey = "insert your server key here"
url = "https://gender-api.com/get?key=" + myKey + "&name=kevin"
response = urlopen(url)
decoded = response.read().decode('utf-8')
data = json.loads(decoded)
print( "Gender: " + data["gender"]); #Gender: male

Python 2.*
import json
import urllib2

myKey = "insert your servery key here"
data = json.load(urllib2.urlopen("https://gender-api.com/get?key=" + myKey + "&name=markus"))
print "Gender: " + data["gender"]; #Gender: male
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import com.google.gson.Gson;
import com.google.gson.JsonObject;

public class Main {

  public static void main(String[] args) {

  try {

    String myKey = "insert your server key here";
    URL url = new URL("https://gender-api.com/get?key=" + myKey + "&name=markus");
    HttpURLConnection conn = (HttpURLConnection) url.openConnection();

    if (conn.getResponseCode() != 200) {
      throw new RuntimeException("Error: " + conn.getResponseCode());
    }

    InputStreamReader input = new InputStreamReader(conn.getInputStream());
    BufferedReader reader = new BufferedReader(input);

    Gson gson = new Gson();
    JsonObject json = gson.fromJson(reader, JsonObject.class);
    String gender = json.get("gender").getAsString();
    System.out.println("Gender: " + gender); // Gender: male
    conn.disconnect();

    } catch (IOException e) {
      e.printStackTrace();
    }
  }
}

Download A Sample Project Here:

Documentation:

https://github.com/microknights/Gender-API
// Contributed Client: https://github.com/microknights/Gender-API

using MicroKnights.Gender_API;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace GenderAPI
{
    class Program
    {
        public static async Task RunTests(GenderApiClient client)
        {
            var responseStats = await client.GetStatistics();
            if( responseStats.IsSuccess ) {
                Console.WriteLine($"IsLimitReached: {responseStats.IsLimitReached}");
                Console.WriteLine($"Remaning requests: {responseStats.RemaningRequests}");

                const string Name = "Frank Nielsen";
                var responseName = await client.GetByNameAndCountry2Alpha(Name, "DK");
                if( responseName.IsSuccess ) {
                    Console.WriteLine($"{Name} is {responseName.GenderType.DisplayName}");
                }
                else {
                    Console.WriteLine($"ERRORS: {responseName.ErrorCode}-{responseName.Exception.Message}");
                }
            }
            else {
                Console.WriteLine($"ERRORS: {responseStats.ErrorCode}-{responseStats.Exception.Message}");
            }
        }

        public static Task UsingServiceProvider(string apiKey){
            // client is thread-safe, and can be used static.
            var serviceProvider = new ServiceCollection()
                .UseGenderAPI(apiKey)
                .BuildServiceProvider();

            return RunTests(serviceProvider.GetRequiredService<GenderApiClient>());
        }

        public static Task PlainConsole(string apiKey){
            // client is thread-safe, and can be used static.
            var client = new GenderApiClient(
                new HttpClient
                {
                    BaseAddress = new Uri("https://gender-api.com")
                }, 
                new GenderApiConfiguration
                {
                    ApiKey = apiKey
                });
            return RunTests(client);
        }

        static async Task Main(string[] args)
        {
            var apiKey = "?";

            await PlainConsole(apiKey);
            await UsingServiceProvider(apiKey);
        }
    }
}

HOW DO REQUESTS GET COUNTED?

Every account will be recharged to 500 credits on the first day of every month if there are less than this number of credits left. Only if a result is found, the request will be counted. One credit will be charged for each request. If multiple names are requested in one query, each name will be counted as a single request.

HOW CAN I BUY MORE CREDITS?

You can choose between either a subscription plan or one-time-payment. One-time-payment is recommended, if you want to process a large CSV file or if you prefer to use your credits on a irregular basis. You can charge your account with the required amount of credits at any time. Credits bought with one-time-payment can be used within one year. If you prefer to sign up for a subscription plan, your account will be refilled to the selected amount of credits every month. Subscriptions can be changed or canceled at any time.
We use cookies and similar technologies to recognize your repeat visits and preferences, as well as to measure the effectiveness of campaigns and analyze traffic.
You can learn more about which cookies we use or edit them here.