logo

API to extract the name and surname from a mail or string

JSON API extracción nombres

We have just released an extension of our API to verify names. The purpose of this API is to extract the first and/or last name from an email or any string. I will give you a practical example to understand its usefulness. Let’s imagine that we have the email of a customer, but at the time of registration we do not ask for the first and last name. It is common, especially in corporate email addresses, that the full name or part of it form the suffix of the email. This would be the text in front of the “@” character. Ex: [email protected] corresponds to a user with the surname Pous Ex: [email protected] would correspond to a user with the name Antxon and the surname Pous Ex: [email protected] would correspond to a user with the name Antxon. All this information can be obtained accurately with the API extraction of names and surnames. Apart from extracting the identity, the API also allows us to know the sex of the person by analyzing the name and to know its origin, since we can know in which countries that name is most used. In the image below you can see all the information we extract from the email “[email protected]”.

JSON API name extraction

The Verificaremails API for extracting first and last names from strings is defined as follows:

Endpoint and Method

The endpoint uses the POST method and the URL is https://api.verificarnombres.com/split.

API extraction names

Operation

This API is designed to parse a text string and extract possible first and last names from it. It is especially useful for processing unstructured data and obtaining contact information in an automated way.

Input Parameters

The API requires the following parameter in the request body:

  • text: The text string from which you want to extract the names and surnames.

Reply

The API returns a JSON response with the following information:

  • name: The name extracted from the text.
  • surname: The last name taken from the text.
  • full_name: The full name extracted, combining first and last name.
{
“status”: true,
“message”: {
“result”: {
“first_name”: {
“country”: {
“Bolivia, Plurinational State of”: 0.004,
“Spain”: 0.939,
“France”: 0.026,
“Italy”: 0.013,
“Mexico”: 0.009,
“United States”: 0.009
},
“gender”: {
“Female”: 0.009,
“Male”: 0.991
},
“rank”: {
“Spain”: 2534,
“Bolivia, Plurinational State of”: null,
“France”: null,
“Italy”: null,
“Mexico”: null,
“United States”: null
},
“name”: “Antxon”.
},
“last_name”: {
“country”: {
“Canada”: 0.007,
“Switzerland”: 0.014,
“Chile”: 0.01,
“Algeria”: 0.071,
“Spain”: 0.378,
“France”: 0.429,
“Italy”: 0.01,
“Morocco”: 0.01,
“Mexico”: 0.024, “United
States”: 0.047}, “gender”: {}, “rank”: {“Spain”: 6987, “Canada”: null, “Switzerland”: null, “Chile”: null, “Algeria”:
null,
“France”: null,
“Italy”: null,
“Morocco”: null,
“Mexico”: null,
“United States”: null
},
“name”: “Pous”
},
“last_name2”: null
}
}
}

Practical Use

This API is particularly useful in scenarios such as:

  • Processing of e-mails or documents to extract contact information.
  • Analysis of unstructured databases to obtain names of individuals.
  • Automation of data entry tasks in CRM or similar systems.

The ability to extract first and last names from text strings allows companies and developers to improve efficiency in personal data handling and contact management.

If you wish to evaluate the API you can contact us via chat and we will provide you with access. I hope you like it 😉

- IMPROVE THE QUALITY OF YOUR DATA IN A SIMPLE WAY -

VERIFY EMAILS
TELEPHONES,
POSTAL ADDRESSES
NAMES AND LAST NAMES...