1
first_name;last_name
2
Silvia;Miller
3
Jonathan;Holmes
4
Sophia;Smith
https://gender-api.com/get?name=elizabeth&key=yourkey
{"name":"elizabeth", "gender":"female", "samples":355, "accuracy":100, "duration":"34ms"}
Our API can be easily integrated into every existing platform in any language. Take a look at some coding examples.
$ composer require gender-api/client
useGenderApi\Clientas GenderApiClient;try{$apiClient=newGenderApiClient('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();// maleecho$lookup->getFirstName();// Thomasecho$lookup->getLastName();// Johnson}}catch(GenderApi\Exception$e){// Name lookup failed due to a network error or insufficient remaining requests// left. See https://gender-api.com/en/api-docs/error-codesecho'Exception: '.$e->getMessage();}
Upload CSV files with up to 10,000,000 datasets or Excel files with up to 100,000 datasets per file.
Join us today and receive up to 100 requests for free every month.