← Docs

Name API

A person's name, split, cased, and checked.

Pass a name the way a form field gave it to you. GRACE HOPPER, smith, john, and Dr. Jane Smith Jr. all come back split into first, middle, and last with prefix and suffix set aside, proper cased, and in first-name-first order.

Role words, company markers, and placeholders answer valid: false. Junk is a valid question, so it is a 200, never a 404.

Parse

GET
api.parseapi.com/name/{name}
Normalized name, validity, prefix, first, middle, last and suffix
Explore
Parameters 3
namestring · path · required

The name as you have it, URL-encoded

countrystring · query · optional

Optional ISO2 country context for the name evidence. Does not infer nationality or filter the countries array.

deepboolean · query · optional

Dictionary membership, country associations and uncertain name evidence. Included on paid plans.

Run uses the free demo. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.name("GRACE HOPPER");
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "name": "Grace Hopper",
  "valid": true,
  "prefix": null,
  "first": "Grace",
  "middle": null,
  "last": "Hopper",
  "suffix": null
}

Run uses the free demo. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.name("Smith, John");
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "name": "John Smith",
  "valid": true,
  "prefix": null,
  "first": "John",
  "middle": null,
  "last": "Smith",
  "suffix": null
}

Run uses the free demo. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.name("test test");
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "name": "test test",
  "valid": false,
  "prefix": null,
  "first": null,
  "middle": null,
  "last": null,
  "suffix": null
}

Response fields

name
Cleaned full name, comma flip resolved and proper cased
valid
Looks like a person's name. Role words, company markers, and placeholders answer false
prefix
Mr, Mrs, Ms, Dr, Prof, and friends, null when absent
first
First name
middle
Middle name or initial, null when absent
last
Last name, name particles included (de la Hoya), null on a single word
suffix
Jr, III, PhD class, null when absent

Casing

Recasing only runs on all-upper or all-lower input. Mixed case passed through as-is, so McIntyre stays McIntyre. Name particles glue to the last name and stay lowercase mid-name.

Run uses the free demo. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.name("OSCAR DE LA HOYA");
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "name": "Oscar de la Hoya",
  "valid": true,
  "prefix": null,
  "first": "Oscar",
  "middle": null,
  "last": "de la Hoya",
  "suffix": null
}

Known names and countries

Request ?deep=true on a paid plan for name evidence. Core parsing does not require a dictionary match.

deep.known reports a dictionary match, independently of gender. deep.countries lists the matched name's associated country codes. A name can belong to many countries; these associations do not establish a person's nationality. An unfamiliar name can still be valid: true.

Gender

deep.gender answers when the evidence is clear. Ambiguous first names like Taylor and Jordan return null. deep.salutation follows gender: Mr, Ms, or null. Pass ?country=IT to use a country's gender evidence; deep.countries still lists all associations. An exact compound name uses its own evidence before falling back to the parsed first name.

Deep

?deep=true Dictionary membership, country associations and uncertain name evidence. Included on paid plans.

Deep examples run with your own key. Check this API’s included units and pricing before running.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.name("GRACE HOPPER", { deep: true });
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "name": "Grace Hopper",
  "valid": true,
  "prefix": null,
  "first": "Grace",
  "middle": null,
  "last": "Hopper",
  "suffix": null,
  "deep": {
    "gender": "female",
    "salutation": "Ms",
    "known": true,
    "countries": [
      "AG",
      "AT",
      "AU",
      "BB",
      "BD",
      "BE",
      "BF",
      "BI",
      "BJ",
      "BW",
      "BZ",
      "CA",
      "CD",
      "CF",
      "CG",
      "CH",
      "CI",
      "CM",
      "CY",
      "DE",
      "DJ",
      "DM",
      "ER",
      "ES",
      "FJ",
      "FR",
      "GA",
      "GB",
      "GD",
      "GH",
      "GN",
      "GY",
      "HT",
      "IE",
      "IN",
      "JM",
      "KE",
      "KI",
      "KN",
      "LC",
      "LI",
      "LR",
      "LS",
      "LU",
      "MC",
      "ME",
      "MG",
      "MH",
      "ML",
      "MT",
      "MU",
      "MW",
      "NA",
      "NE",
      "NG",
      "NO",
      "NR",
      "NZ",
      "PG",
      "PH",
      "PL",
      "PW",
      "RS",
      "RW",
      "SB",
      "SC",
      "SE",
      "SI",
      "SL",
      "SN",
      "SZ",
      "TD",
      "TG",
      "TO",
      "TT",
      "TV",
      "UG",
      "US",
      "VC",
      "VU",
      "WS",
      "ZA",
      "ZM",
      "ZW"
    ]
  }
}

Deep fields

deep.gender
male or female from name evidence, optionally scoped by ?country=. Ambiguous or unsupported evidence stays null
deep.salutation
Mr or Ms from gender, null when gender is null
deep.known
The matching name appears in the dictionary, even when gender is null. Independent of parsing validity
deep.countries
All associated ISO2 country codes for the matching name, never the person's nationality

Build with Name

All tutorials →

Questions? Email