Developer documentation

Gender API documentation

Determine gender from a first name, full name, email address or username with simple REST requests and structured JSON responses.

REST + JSONGET requestsSingle & bulkCountry context

Basic usage

Make your first Gender API request

Send one input value and receive the predicted gender, probability, country and usage information. Start with a name, then use the dedicated email or username endpoint when that is the data you have.

Authentication

Add your API key with the key query parameter. Keep production keys on your server—never expose a private key in browser code or a public repository.

Read the authentication guide →
GET

Gender from name

First name or full name

Use the base endpoint when your input is a first name or full name.

https://api.genderapi.io/api
cURL
curl "https://api.genderapi.io/api?name=Alice&key=YOUR_API_KEY"

Optional parameters

ParameterTypeDescription
countrystringTwo-letter country code such as TR or US.
askToAIbooleanWhen true, asks the AI fallback if the name is not found in the database.
forceToGenderizebooleanAttempts a prediction for unusual inputs that may not look like human names.
Use with care: Forced predictions for fantasy names, nicknames or low-signal inputs may be less accurate.
GET

Gender from email

Email address

The email endpoint extracts a likely name from the address before performing gender detection.

https://api.genderapi.io/api/email
cURL
curl "https://api.genderapi.io/api/email?email=alice.smith%40example.com&country=TR&askToAI=true&key=YOUR_API_KEY"
forceToGenderize is not available for this endpoint because the name is extracted internally.
GET

Gender from username

Social username

Use this endpoint for usernames, handles and nicknames that may contain a recognizable name.

https://api.genderapi.io/api/username
cURL
curl "https://api.genderapi.io/api/username?username=sparkling_unicorn&country=US&askToAI=true&forceToGenderize=true&key=YOUR_API_KEY"

JSON response

Understand the GenderAPI response

All three endpoints use the same core response structure.

200 OK
{
  "status": true,
  "used_credits": 1,
  "remaining_credits": 4999,
  "expires": 1743659200,
  "q": "Alice",
  "name": "alice",
  "gender": "female",
  "country": "US",
  "total_names": 325,
  "probability": 98,
  "duration": "4ms"
}

Response fields

FieldTypeDescription
statusbooleanWhether the request completed successfully.
used_creditsintegerCredits consumed by this request.
remaining_creditsintegerCredits remaining after the request.
expiresintegerPackage expiration time as a UNIX timestamp.
qstringThe original name, email or username query.
namestringThe normalized or extracted first name.
genderstring | nullPredicted gender: male, female or null.
countrystringMost likely ISO 3166-1 alpha-2 country code.
total_namesintegerNumber of name records behind the prediction.
probabilityintegerPrediction confidence as a percentage.
durationstringServer processing time for the request.

Always URL-encode input values

Spaces and special characters must be encoded by your HTTP client. For example, use sparkling%20unicorn instead of a raw space.

Continue building

Choose the guide for your workflow

Name requestsSingle and bulk examples →Client librariesUse your preferred language →Error handlingStatus and error reference →