Continue → Overview

Gender from a full name

Send the whole name and the given name is extracted before lookup. That extraction is a separate job from classification, it fails in its own way, and the response tells you which one you got.

100 free credits every day. No card.

What gets stripped

Titles are dropped (Dr, Mr, Mrs, Prof and their punctuated forms). Bracketed asides are removed, so Ayşe (Ayse) resolves cleanly. Emoji and stray punctuation go. Single letters are treated as initials, so J. Smith reaches the lookup as Smith rather than as J.

Accents fold for matching but the input is echoed back unchanged: Ayşe, Ayse and AYŞE reach the same entry, and q still shows exactly what you sent.

Extraction, then classification
curl "https://namegender.com/api?name=Dr.%20Hans%20M%C3%BCller" \
  -H "Authorization: Bearer YOUR_KEY"

# -> "name": "Hans", "gender": "male"

The name field is your audit trail

Every response reports what was actually looked up. This is the single most useful habit when working with full names, because a wrong extraction produces a confident, plausible, systematically wrong answer that nothing downstream can detect.

Two cases worth knowing. J. Smith drops the initial and classifies the surname — Smith is itself a recorded given name, so the answer arrives with high confidence and means nothing. Zhang Wei classifies the surname too, because Chinese names are written surname first and a first-token-wins rule is a Western assumption.

If name comes back as something you did not expect, the classification is irrelevant. Fix the column, not the threshold.

Particles, compounds and hyphens

Compound given names (Jean-Paul, Marie-Claire) are kept whole rather than split on the hyphen, because the compound is the name. Surname particles — van, de, bin, ibn, al — belong to the surname and are not candidates for the given name.

For surname-first cultures the reliable move is to send the given name alone in the name field. If you cannot separate the columns, send the full string and read back the name field to see which token won.

Inputs that are not names at all

A string containing characters that never appear in human names — the leading = or @ of a spreadsheet formula, pipes, code punctuation — returns empty rather than being cleaned into a name. That guard exists because =cmd|'/c calc'!A1 once normalised to cmd, found a long-tail entry, and came back as male with 95% probability.

A confidently wrong answer on a junk row is worse than a null, because every row in the output looks equally valid.

Questions

Should I send the full name or just the first name?

Send the first name when you have it as its own column. Full-name input adds an extraction step that can fail silently; a clean column removes that risk entirely.

What about names written surname first?

Send the given name alone, or check the name field in the response to confirm which token was classified. See the Chinese and Korean pages for the specifics.

Are middle names used?

No. The first token that survives title and initial stripping is the one classified, and the response reports it.

Does capitalisation or accent matter?

No. Matching folds case and accents, while q echoes your original input unchanged.

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 username

Detect gender from a username or handle. camelCase splitting, separator and digit stripping, and the handles that are not names at all.

Bulk gender detection from CSV and Excel

Upload a CSV or XLSX name list and get a gender column back, with confidence fields, automatic deduplication and the cost shown before charging.

Chinese name gender: what a character can and cannot tell you

Coverage on Han names is 99.5% but accuracy is 86.9% — the inverse of the usual pattern. Why pinyin is weaker evidence, and the name-order trap.

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.

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.