Genderize.io

AI API · Gender prediction from name · Probability scoring · No auth

TL;DR

Genderize.io predicts whether a given first name is male or female, backed by demographic data from millions of public records. It returns both a binary prediction (male/female) and a probability score (0.5-1.0) so you know how confident the model is. Country-specific predictions improve accuracy — "Kim" reads different in the US vs Korea. Combined with Agify.io and Nationalize.io, you can build a surprisingly detailed demographic profile from just a name.

Quick start: https://api.genderize.io/?name=peter

No API key needed — just make a request!

How to Use This API

1. Predict Gender for "Peter"

https://api.genderize.io/?name=peter

Returns: {"name":"peter","gender":"male","probability":1.0,"count":120567}. A probability of 1.0 means 100% of records with this name were male.

2. Country-Specific — "Kim"

https://api.genderize.io/?name=kim&country_id=US
https://api.genderize.io/?name=kim&country_id=KR

"Kim" in the US is often female (surname as given name). In Korea it's strongly male. The country filter reveals this difference.

3. Batch Prediction

https://api.genderize.io/?name[]=alex&name[]=jordan&name[]=cameron

Gender-neutral names in batch form. See which way each leans statistically.

4. JavaScript — Name Demographics

async function predictGender(name, country = null) {
  const params = new URLSearchParams({ name });
  if (country) params.set('country_id', country);
  const resp = await fetch('https://api.genderize.io/?' + params);
  return resp.json();
}

async function analyzeNames(names) {
  const params = new URLSearchParams();
  names.forEach(n => params.append('name[]', n));
  const resp = await fetch('https://api.genderize.io/?' + params);
  const results = await resp.json();
  
  results.forEach(r => {
    const confidence = (r.probability * 100).toFixed(0);
    console.log(`${r.name}: ${r.gender || 'unknown'} ` +
      `(${confidence}% confidence, n=${r.count})`);
  });
}

analyzeNames(['alex', 'jordan', 'riley', 'casey']);

5. Python — Probability Heatmap

import requests

def gender_probability(name, country='US'):
    resp = requests.get(
        'https://api.genderize.io/',
        params={'name': name, 'country_id': country}
    )
    data = resp.json()
    return {
        'name': data['name'],
        'gender': data.get('gender'),
        'probability': data.get('probability', 0),
        'samples': data.get('count', 0)
    }

# Check ambiguous names across countries
for name in ['ashley', 'leslie', 'jesse', 'marion']:
    us = gender_probability(name, 'US')
    uk = gender_probability(name, 'GB')
    print(f"{name.title()} in US: {us['gender']} "
          f"({us['probability']:.0%}) — in UK: {uk['gender']} "
          f"({uk['probability']:.0%})")
Try "peter": https://api.genderize.io/?name=peter

Frequently Asked Questions

How does Genderize.io determine gender from names?
It uses a database of millions of public records (social security, census, electoral rolls) where gender is correlated with first name. The database is continuously updated with new data sources.
What does probability mean?
Probability is the ratio of records matching the predicted gender. 0.95 means 95% of people with that name were that gender. Names with probability below 0.55 should be treated as ambiguous.
Does it handle unisex names well?
Yes, that's one of its strengths. For unisex names like "Avery" or "Morgan", the API returns the statistical majority but the probability will be lower (e.g., 0.55-0.80), flagging ambiguity.
How many names does the database cover?
Over 200,000 distinct names across dozens of countries. Coverage is best for English-speaking countries but includes many European, Latin American, and Asian nations.
Can I use this for data anonymization?
Yes, it's commonly used for inferring gender distribution in anonymized datasets where only first names are available. Pair with Agify.io for age estimates and Nationalize.io for nationality predictions.
Are there rate limits on the free tier?
Yes, the free tier allows about 1,000 requests per day per IP. For higher volumes, paid plans are available. The batch endpoint helps use your quota efficiently.

API Details

API URL
https://api.genderize.io
Documentation
genderize.io
Category
AI
Authentication
Not Required
Geographic Coverage
Global — strongest for North American and European names

What You Can Build