Continue → Overview

Gender from a username

AyseYilmaz, ayse_yilmaz_34 and @AyseYilmaz84 all reach the same lookup. Handles that are not names reach it too, and that is the part worth planning for.

100 free credits every day. No card.

Normalisation, in order

A leading @ is trimmed. camelCase and PascalCase are split first, so AyseYilmaz becomes Ayse Yilmaz before anything else happens. Then separators and digits become spaces, titles and single letters are dropped, and the first surviving token is looked up.

That ordering matters: splitting on digits first would turn xX_kevin_Xx into a different shape. As written, it resolves to kevin.

The camelCase step is the one that earns its place. Handles from workplace tools and developer platforms are overwhelmingly PascalCase or dot-separated versions of a real name, and without that split AyseYilmaz is a single unknown token rather than two known ones. It is also the step most home-grown parsers leave out, because it only shows up as a problem on the population where this feature is actually worth using.

Endpoint
curl "https://namegender.com/api/username?username=AyseYilmaz84" \
  -H "Authorization: Bearer YOUR_KEY"

# -> "name": "Ayse", "gender": "female"

Handles that are not names

Most usernames are not names, and the outcomes vary in ways worth knowing before you write the results anywhere. These are live results:

Handle Extracted Answer
xX_kevin_Xx Kevin male, 100, 65,494 obs, high
AyseYilmaz Ayse female, 100, 655 obs, high
@darkstar99 Darkstar null, unknown
user12345 User female, 95, 0 obs, unverified
the_coding_guy The male, 80, 0 obs, unverified

Where this is actually worth doing

Username inference earns its place when the handle is derived from a real name, which is common in workplace tools, developer platforms and email-derived accounts, and rare in gaming or pseudonymous communities.

The last two rows above share a signal: total_names: 0 with confidence: unverified. Common English words are attested as given names somewhere in a 195-country reference dataset, so they resolve rather than returning null. For username input specifically, treat unverified as unusable rather than as weak evidence — the base rate of junk is far higher here than in a name column, so the same tier means something different.

If you cannot tell which population you have, measure it: run a sample, count how many rows come back with high or medium confidence after discarding unverified, and decide from that number rather than from a vendor claim. It is a twenty-minute exercise and it settles the question permanently.

Questions

Which separators are handled?

Dots, underscores, hyphens, plus signs and digit runs, plus camelCase and PascalCase boundaries. A leading @ is trimmed.

What comes back for a handle with no name in it?

Usually null with confidence unknown. Sometimes a common word is itself an attested name and returns unverified with zero observations — filter on that field.

Is it more or less accurate than email?

Classification is identical; extraction is noisier, because a username is under no obligation to contain a name at all.

Can I pass a country?

Yes, the same country parameter applies.

Related pages

Gender from an email address

Detect gender from an email address. The exact local-part transform, the role addresses that produce confidently wrong answers, and the pre-filter to run first.

Gender from a full name

Predict gender from a full name. How the given name is extracted from titles, initials, particles and surname-first orders, and how to audit that it worked.

Customer and lead gender enrichment

Append a gender column to a customer list, CRM export or lead database, with a confidence field you can filter on and no monthly credit expiry.

Gender from an email address or a username: the extraction is the hard part

Turning an address into a gender is two jobs, and almost every failure is in the first. The exact transform, the confidently wrong cases, and a pre-filter.

probability, confidence and total_names: reading a gender response properly

Reading the gender field alone discards everything that says whether to believe it. What each response field means and the thresholds behind confidence.

Check it against your own list

Every number on this page is reproducible with a free key. If your data breaks it, that is the more interesting result.