Skip to main content

Names

This API tries to determine what words in a given input correspond to a first-name and/or last-name.

Although this task may seem simple, in many cultures some first names can also be last names, which can cause some confusion. For example, the name Franco can be both a first name as a family name, making it hard to label.

We recommend using this API in combination with the Gender API.

Prediction labels

Limits

The maximum length accepted is 512 characters.

LabelExample
first_nameCarlota, Peter, Richard
last_namereynosa, Ericson, Aguirre
unknowntripod, careless

Invokation

curl -L -G 'http://api.textkit.ai/detect/names' \
--data-urlencode 'text=Carlota Reynosa wasnt careless' \
--header 'X-API-Key: your_api_key_here'

Response

{
"prediction": {
"first_name": [
"carlota"
],
"last_name": [
"reynosa"
],
"unknown": [
"wasn't",
"careless"
]
},
"confidence": "1",
"time_ms": 37
}
FieldMeaning
predictionThe predicted label. See above for reference
confidenceValue between 0 and 1 that indicates how confident the model is
time_msTime in milliseconds the model took to predict the label. It does not account for the network round trip time between request and response