Parse name

This API endpoint parses a complete name or email address and returns the first name, middle names and surname. Additionally, it also returns the gender, salutation, title, nickname, email provider and the most likely nationality of the given name.

The name parsing endpoint is very useful for online businesses and services. It shortens forms, validates names and enriches existing customer databases with the gender, salutation and nationality of any given name. Use our API and Web App to parse names into useful components.

Don't want to write your own code and start parsing names quickly? We've done the heavy lifting for you. Have a look at our extended example code on Github.

Request parameters

Name Required Description Example
api_key required Your API key is required for every API call. Register for a free API key. 93d471ea85d1937e713e8aafffb32090
name required * The complete name that you want to parse. Depending on your subscription you can query multiple names in a single request by making an array out of it.
Example: name[]=John Bruch&name[]=John Bruch
John Bruch
email required * The email address that you want to parse. Depending on your subscription you can query multiple email addresses in a single request by making an array out of it.
Example: email[]=alopez@t-online.de&email[]=j.bruch.87@yahoo.com
j.bruch.87@yahoo.com
validate optional We validate a name by checking if the given name is possibly fake. When the parameter 'validate' is set to 'true' we will compare the name with 13.738 famous, fictional and humorous names. Additionally, we will also check if the first name and surname are existing names. true
country_code optional If you know the country code associated with the name then you can provide it. How we parse names depends on the given country. By providing the country code the accuracy of the name and gender will be higher. The country code should be 2 characters according to the ISO 3166-2 country code specification. If the name parameter contains multiple names then the country_code should also be an array. DE
ip optional If you don't know the country code you can always provide an IP address. We convert the IP address to a country_code internally. If the name parameter contains multiple names then the ip should also be an array. 66.249.64.85
Note: required * means that either the 'name' or 'email' address is required. They can not be mixed or used at the same time.

Request URL

This is the easiest way to parse a name into it useful components. Each response is JSON encoded so easy to use. You can copy past the request URL in the address bar of your browser to see the response.

https://api.parser.name/?api_key=YOUR_KEY&endpoint=parse&name=John%20Bruch

If you know the country code of the name then you can add the country code parameter. By specifying the country code the accuracy of the gender will increase. All endpoints use the ISO 3166-2 for country codes. Check our list of countries to see all supported country codes.

https://api.parser.name/?api_key=YOUR_KEY&endpoint=parse&name=John%20Bruch&country_code=US

It is possible to query multiple names in a single request. You can send a maximum array of 10 names in the same request. For the rate limit this counts as a single request making it ideal of you want to process high volumes of names. If you also use the country_code then you have to make an array of that as well.

https://api.parser.name/?api_key=YOUR_KEY&endpoint=parse&name[]=John%20Bruch&name[]=Sarah%20Jones

You can also get the name from a person out of the email address. The email parameter extracts the username from email address and then parses the username. The response object will contain all the name parts and information about the email provider.

https://api.parser.name/?api_key=YOUR_KEY&endpoint=parse&email=j.bruch.87@yahoo.com

Response objects

There are two different response objects with three different status codes possible. If the name can be parsed you will receive an object with all the components of the parsed name and the status code will be 200. If the name can not be parsed, because it is misspelled, you will receive an error and there are two possibilities. In some cases we can detect the spelling mistake that are made in the first name, and we'll return a list with the possible first names accompanied by status code 404. If we can't parse the name and can't detect any spelling mistakes we'll return a status code 400.

This is how a successful parsed response objects looks like:

{
    results: 1,
    error: null,
    data: [
        {
            salutation: {
                salutation: "Mr.",
                initials: "J.",
                lastname: "Bruch"
            },
            title: null,
            name: {
                nickname: null,
                firstname: {
                    name: "John",
                    name_ascii: "John",
                    validated: true,
                    gender: "m",
                    gender_formatted: "male",
                    unisex: false,
                    gender_deviation: 0,
                    country_code: "US",
                    country_certainty: 60,
                    country_rank: 3,
                    alternative_countries: {
                        GB: 13,
                        CA: 3
                    }
                },
                middlenames: null,
                lastname: {
                    name: "Bruch",
                    name_ascii: "Bruch",
                    validated: true,
                    country_code: "US",
                    country_certainty: 62,
                    country_rank: 1,
                    alternative_countries: {
                        GB: 24,
                        CA: 3,
                        AU: 3
                    }
                }
            },
            email: {
                address: "j.bruch.87@yahoo.com",
                username: "j.bruch.87",
                domain: "yahoo.com",
                provider: {
                    name: "Yahoo Mail",
                    country_code: "US"
                },
                business: false
            },
            country: {
                country_code: "US",
                country_certainty: 63,
                country_code_alpha: "USA",
                name: "United States",
                continent: "North America",
                demonym: "American",
                primary_language_code: "en",
                primary_language: "English",
                currency: "USD",
                alternative_countries: {
                    GB: 19,
                    CA: 3,
                    AU: 3
                }
            },
            validation: {
                pass_loose: true,
                pass_strict: true,
                listed_in: [ ],
                listed_as: [ ]
            }
        }
    ]
}

This is how an unsuccessful parsed response objects looks like:

{
    results: 0,
    error: "The service could not find a name in 'Chriatian'. Select of the following suggested first names instead.",
    data: [
        {
            firstnames: [
                {
                    name: "Christian",
                    name_ascii: "christian",
                    similarity: 89,
                    levenshtein: 1,
                    frequency: 43419,
                },
               {
                    name: "Christiaan",
                    name_ascii: "christiaan",
                    similarity: 84,
                    levenshtein: 2,
                    frequency: 680,
                },
               {
                    name: "Christiana",
                    name_ascii: "christiana",
                    similarity: 84,
                    levenshtein: 2,
                    frequency: 604,
                }
            ]
        }
    ]
}

Response parameters

Most response parameters are self-explanatory. However, there are a few fields that need an additional explanation. These fields are listed in the table below. If you're looking for is a response parameter that is not in this list, please contact us and we'll add it to this list.

Name Type Description
validated boolean The 'validated' key is a boolean indicating if a first name, middle name or surname exists in an official database. If the validated key is 'false' for the 'firstname' then the name is derived from another country. It's still an existing first name, but we don't have the official database for that country. If the validated key is 'false' for the surname it means it does not exist in the resulting country.
gender enum The gender is always an 'm' (male) or 'f' (female). Our database holds 2.208.942 official first names and their gender received from governments. By providing the country_code in the request parameter the accuracy of the gender will be higher.
unisex boolean A unisex name is a given name that can be used by a person regardless of their gender.
gender_deviation integer The gender deviation is a percentage indication the change that the gender is the opposite as provided.
alternative_countries array Each name (first name, middle name or surname) has a country code. The country code is the most likely country where the name originates from. The alternative countries is an array that hold the 'second best' estimations. The values are the country certainty percentages (higher is more likely). After analyzing all names and countries the services makes a selects the most likely country where the complete name originates from.
email array If the parameter 'email' is used then the email array will contain additional information about the email provider. It contains the name and country of the email provider and also tells if an email address is a personal or a business email address.
validation array If the parameter 'validate' is to 'true' then the name is also validated. The key 'pass_lose' will be 'true' if the first name exist, surname could be possible and the name should not be listed in our database with famous, fictional and humorous names. The key 'pass_strict' will be 'true' if the first name and surname exist (validated = true) and the name should not be listed in our database with famous, fictional and humorous names. If the name is listed then it will appear in the 'listed_in' and 'listed_as' key's.
similarity integer The similarity will only be returned for suggestions if a first name was misspelled. The similarity is a percentage that tells you how similarity the existing name is to the given name.
levenshtein integer The levenshtein will only be returned for suggestions if a first name was misspelled. The Levenshtein distance is a string metric for measuring the difference between the existing name and the given name.
frequency integer The frequency will only be returned for suggestions if a first name was misspelled. The frequency is the number of how many times the name was detected in all supported country databases. This makes it easy to suggest what a possible good input name should be.