Name API
Split a full name into clean, useful fields.
GET /name/{name}API Explorer ↗Return a normalized name, its parts and whether it looks like a personal name.
Parameters
- namestring · path · required
The name as you have it, URL-encoded
Length: 1 to 120 characters
- countrystring · query · optional
Optional ISO2 country context for the name evidence. Does not infer nationality.
Pattern:
^[a-zA-Z]{2}$- name_localestring · query · optional
Optional BCP 47 name-formatting locale, such as en or ja. Defaults to en. Selects supported CLDR 47 rules, using locale parents where available. Unsupported locales return 400. Changes formatting only, not parsing or gender. Never inferred from country, lang or browser language.
Length: 2 to 64 characters
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.name("Dr. John Smith Jr.");
console.log(result);{
"name": "John Smith",
"valid": true,
"prefix": "Dr",
"first": "John",
"middle": null,
"last": "Smith",
"suffix": "Jr",
"gender": "male",
"short": "J. Smith",
"directory": "Smith, John",
"initials": "JS"
}Use your API key in your app. Keep secret keys on your server. SDK setup
Response fields
valid checks whether the input looks like a personal name. Placeholders, role words and company markers return HTTP 200 with valid: false. It does not verify a person's identity.
- nameLink to namestring
- Cleaned full name, comma flip resolved and proper cased
- validLink to validboolean
- Looks like a person's name. Role words, company markers, and placeholders answer false
- prefixLink to prefixstring or null
- Mr, Mrs, Ms, Dr, Prof, and friends, null when absent
- firstLink to firststring or null
- First name
- middleLink to middlestring or null
- Middle name or initial, null when absent
- lastLink to laststring or null
- Last name, name particles included (de la Hoya), null on a single word
- suffixLink to suffixstring or null
- Jr, III, PhD class, null when absent
Included on paid plans
Available formats and gender evidence are included automatically in the same request. Unknown values are null.
- genderLink to genderstring or null
- male or female from name evidence, optionally scoped by ?country=. Ambiguous or unsupported evidence stays null
- shortLink to shortstring or null
- Compact name using name_locale formatting rules, such as R.J. Smith. Null when the name is invalid
- directoryLink to directorystring or null
- Name formatted for directory listings, such as Smith, Robert James. Null when the name is invalid
- initialsLink to initialsstring or null
- Name initials using name_locale formatting rules, such as RJS. Null when the name is invalid
Behavior
Casing and name order
All-uppercase and all-lowercase names are recased. Mixed case, such as McIntyre, is preserved. Particles stay with the last name, as in Oscar de la Hoya. A comma marks surname-first input: Smith, John becomes John Smith. Prefixes and suffixes have their own fields.
Formatting and locales
Formatting uses English rules by default. Set name_locale, such as ja or fr, to choose formatting rules. Supported locale parents provide regional fallbacks; unsupported locales return 400.
The locale controls short, directory and initials. It does not translate names, change how the input is split or select gender evidence. It is never inferred from country or browser language. Invalid names return null for these formats.
Gender evidence
gender uses name evidence when the answer is clear. Ambiguous or unsupported names return null. Use country, such as IT, to select country-specific evidence. An exact compound name uses its own evidence before the parsed first name. Parsing itself does not require a dictionary match.