NameAPI is a web API
to handle people's names
in your software.

News

26.04.2024

Enhanced NameAPI Database

We've updated our NameAPI database to better handle names that include professions. We have added...


12.04.2024

Bosnian names: Echoes of Diversity and Heritage

Bosnia and Herzegovina stands out in Europe for its remarkable diversity, being a country where...


29.03.2024

Larger Name Database

We are pleased to announce a new update to our database, which now features a broader range of...


01.03.2024

Diving Deeper into Latin American Names

From the indigenous communities of the Andes to the Afro-Caribbean rhythms of the Caribbean coast,...


16.02.2024

Swagger-UI: The New and Improved Way to Use Our REST API

We are happy to announce that we have added a new feature to our REST API: Swagger-UI, which allows...


   

Name Parser


       
Name parsing is the process of splitting a name string into its components.
See also the Swagger specification.
                    
POST
       
application/json (you must set the content-type as http header)
       
We have integrated Swagger directly into our API.
Visit https://api.nameapi.org/rest/swagger-ui/.

   

Input

               
See Context.
   
{
  "context" : {
     "priority" : "REALTIME",
     "properties" : [ ]
   },
  "inputPerson" : {
    "type" : "NaturalInputPerson",
    "personName" : {
      "nameFields" : [ {
        "string" : "Petra",
        "fieldType" : "GIVENNAME"
      }, {
        "string" : "Meyer",
        "fieldType" : "SURNAME"
      } ]
    },
    "gender" : "UNKNOWN"
  }
}      
   

   

Output

   
   
A list of possible ways how a person could be parsed. The entries are sorted by likeliness & confidence, the first is the best parsing result. See ParsedPersonMatch.

One match contains the following fields:
  • Information about the person: the computed gender, the addressing given name, the addressing surname... See ParsedPerson.
  • A list of consistency problems detected by the parser is within this object. See ParserDispute.
  • A value in the range 0-1 that indicates how likely is it that this is the correct way of parsing. The higher the better.
  • A value in the range 0-1 that indicates how sure the server is about the result. The higher the better.
   
{
  "matches" : [ {
    "parsedPerson" : {
      "personType" : "NATURAL",
      "personRole" : "PRIMARY",
      "mailingPersonRoles" : [ "ADDRESSEE" ],
      "gender" : {
        "gender" : "FEMALE",
        "confidence" : 1.0
      },
      "addressingGivenName" : "Petra",
      "addressingSurname" : "Meyer",
      "outputPersonName" : {
        "terms" : [ {
          "string" : "Petra",
          "termType" : "GIVENNAME"
        }, {
          "string" : "Meyer",
          "termType" : "SURNAME"
        } ]
      }
    },
    "parserDisputes" : [ ],
    "likeliness" : 0.990354218244094,
    "confidence" : 0.9583333333333334
  }, {
    "parsedPerson" : {
      "personType" : "NATURAL",
      "personRole" : "PRIMARY",
      "mailingPersonRoles" : [ "ADDRESSEE" ],
      "gender" : {
        "gender" : "FEMALE",
        "confidence" : 0.914111763426832
      },
      "addressingGivenName" : "Petra",
      "addressingSurname" : "Meyer",
      "outputPersonName" : {
        "terms" : [ {
          "string" : "Petra",
          "termType" : "GIVENNAME"
        }, {
          "string" : "Meyer",
          "termType" : "SURNAME"
        } ]
      }
    },
    "parserDisputes" : [ ],
    "likeliness" : 0.9849926986362509,
    "confidence" : 0.951388888888889
  } ]
}