Gender API

Keep your registration forms simple. Optimize your conversions and let us determine the gender of your customers.

https://gender-api.com/get?name=elizabeth&key=yourkey

{"name":"elizabeth", "gender":"female", "samples":355, "accuracy":100, "duration":"34ms"}

TAKE A TEST DRIVE

Go!

OPTIMIZE YOUR REGISTRATION FORMS

Without Gender-API.com

With Gender-API.com

HOW IT WORKS

Your registration form

Full Name
{ last_name: "Smith", first_name: "Jennifer", gender: "female", accuracy: 99 }

API Call

WE CAN ALSO DETERMINE THE GENDER OF AN EMAIL ADDRESS

EASY INTEGRATION

Our API can be easily integrated into every existing platform in any language. Take a look at some coding examples.

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 requests
    // 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();
    }
  }
}

CSV AND EXCEL FILE UPLOAD

Upload CSV files with up to 10,000,000 datasets or Excel files with up to 100,000 datasets per file.

input.csv
1
first_name;last_name
2
Silvia;Miller
3
Jonathan;Holmes
4
Sophia;Smith
CSV file will be processed
output.csv
1
firstname;lastname;ga_gender;ga_accuracy
2
Silvia;Miller;female;99
3
Jonathan;Holmes;male;100
4
Sophia;Smith;female;9

OUR UNIQUE FEATURES

1 For a better gender determination we can consider your customer's IP address.
2 Easily split a full name into it's parts.
3 With our CSV bulk upload feature you can query a huge dataset with one single file.
4 We can determine the first name and the gender of an email address such as sandra314@gmail.com.

PRICING

Our cloud-based infrastructure provides an availability of 99.9% and scales with your business.

Subscription Plans

BASIC
5,000 credits
Credits can be used within one month
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
7.99 €
Per month
PREMIUM
25,000 credits
Credits can be used within one month
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
35.00 €
Per month
ULTRA
100,000 credits
Credits can be used within one month
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
79.00 €
Per month
XTREME
500,000 credits
Credits can be used within one month
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
199.00 €
Per month
TEST
1 credits
Credits can be used within one month
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
0.01 €
Per month

All prices are quoted as net prices and subject to VAT.

Subscriptions can be canceled at any time.

Your account will be recharged to the selected amount of credits every month.

One-Time Payments

BASIC
5,000 credits
Credits can be used within one year
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
9.99 €
PREMIUM
25,000 credits
Credits can be used within one year
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
45.00 €
ULTRA
100,000 credits
Credits can be used within one year
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
99.00 €
XTREME
500,000 credits
Credits can be used within one year
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
299.00 €
TEST
1 credits
Credits can be used within one year
Each name query requires one credit
✓ All API endpoints
✓ CSV and Excel Upload
0.01 €

All prices are quoted as net prices and subject to VAT.

No monthly payments. You can charge your account with the required amount of credits at any time.

The credits will be added immediately to your account.

DOWNLOAD OUR PRESENTATION

Download presentation

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.
Got it