Gender from a name
Pass a full name or a first name. Titles, punctuation and surnames are stripped before lookup; name in the response shows what was actually looked up.
Request
- Base URL: https://namegender.com
- URL: https://namegender.com/api/v1/gender
- Auth: one of:
- HTTP bearer
- API key in header X-Api-Key
Query parameters
The value to resolve.
ISO-3166 alpha-2 code. Alpha-3 (ITA) and country names (Italy, Italia, Italien) are also accepted and converted, so a free-text CRM country field can be passed as it is. Narrows the lookup to one country, which matters for names that flip gender across borders: Andrea is male in Italy and female in Germany. Omit it and the answer is the worldwide aggregate.
A language tag such as de-DE, en_US or pt_BR.UTF-8, typically the browser's navigator.language or the Accept-Language header of your sign-up form. Its region becomes the country when country is not sent. A tag without a region (en, de) sets no country: a language alone does not say which country it is spoken in. country_source in the response tells you which one was used.
The end user's IP address (IPv4 or IPv6), for example from your sign-up request. Its country is used when neither country nor a locale with a region is sent. Private and reserved ranges are ignored. The address is used for this lookup only and is not stored. IP geolocation by DB-IP (db-ip.com), CC BY 4.0.
Ask a language model when the dataset has no answer. Slower and less certain; the response reports source: "llm" so you can tell these apart. Requires AI lookups to be enabled in account settings; otherwise the call fails with ai_consent_required.
Return the most likely gender even below the confidence threshold, instead of null. Check probability before trusting the result.
Response
Resolved. gender is null when the name is not recognised — that is a successful answer of "we do not know", not an error, and it still costs one credit.
Example response
{
"data_version": "2026.10",
"took_ms": 1
}Changes
No recorded changes to this operation across all 1 revision of this API.