Nav API version: 2.0.21
API documentation Introduction Gender from names Gender from first name , last name (optional) .
Gender from first name , last name (optional) , country code .
Gender from full name .
Gender from full name , country code .
Origin from names Diaspora from names Diaspora from first name (optional) , last name , country code (optional) .
Diaspora from full name , country code .
Country of residence from names Country of residence from first name (optional) , last name (optional) .
Country of residence from full name .
Interaction from first name , last name , country code , first name , last name , country code .
US race ethnicity from names US race from first name (optional) , last name (optional) , country code (optional) .
US race from full name , country code (optional) .
US race from first name (optional) , last name (optional) , country code (optional) , 5 digit zip code .
Indian names Caste group from first name (optional) , last name (optional) , state .
Caste group from full name , state .
Religion from first name (optional) , last name (optional) , state .
Religion from full name , state .
Indian State or Union territory from first name (optional) , last name (optional) .
Indian State or Union territory from full name .
Split full names Name type recognition Phone number format Phone prefix from first name (optional) , last name (optional) , phone number .
Phone prefix from first name (optional) , last name (optional) , phone number , country code .
Admin Split API – Split a name into first and last names Namsor's Split Name API accurately separates a full name into its first name and last name components. Whether you provide a combined full name or separate first and last names, our API adapts seamlessly to your data format, ensuring smooth integration into your systems.
Providing a country of residence can further improve the precision, especially for names from cultures where name order varies. This functionality is invaluable for applications in data normalization, user profiling, and cross-cultural research.
Split Name Split name from full name .
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": null,
"firstLastName": {
"script": null,
"id": null,
"firstName": "John",
"lastName": "Smith"
},
"score": 23.31368511252333
}
Split Name analyzes an unsplit full name to accurately identify and separate the first name and last name .
POST GET
Precision: Cost: 1 credit per name .Description: Returns the most likely first name and last name structure of up to 100 full names.More about: Split Name HTTP request POST https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameBatch
Request header Property Required Description X-API-KEY
Required Your Namsor's services API key
Request body Name Type Required Description personalNames
Array of objects Required A list of unsplit full names .[{...}]. id
String Optional Unique identifier .[{...}]. name
String Required Full name (first name and last name) .
Response Name Type Description Enumerators personalNames
Array of objects List of submitted names separated into first name and last name structure. [{...}]. script
String Name of the script used for the name, in ISO 15924 format. Script [{...}]. id
String Provided unique identifier. [{...}]. name
String Submitted full name. [{...}]. nameParserType
String Most likely structure of the name. Name structures [{...}]. nameParserTypeAlt
String Second most likely structure of the name. Name structures [{...}]. firstLastName
Object Split name. {...}. script
String Name of the script used for the name, in ISO 15924 format. Script {...}. id
String Provided unique identifier. {...}. firstName
String First name (or given name). {...}. lastName
String Last name (or family name). [{...}]. score
Number Higher implies a more reliable result, score is not normalized.
Code sample: Shell Java PythonJavaScript JS Split Name code sample for shell:
curl --request POST \
--url https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","name":"John Smith"}]}'
Body parameter:
{
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith"
}
]
}
The above command returns JSON structured like this:
{
"personalNames": [
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": null,
"firstLastName": {
"script": null,
"id": null,
"firstName": "John",
"lastName": "Smith"
},
"score": 23.31368511252333
}
]
}
Split Name code sample for java:
HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"name\":\"John Smith\"}]}")
.asString();
Body parameter:
{
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith"
}
]
}
The above command returns JSON structured like this:
{
"personalNames": [
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": null,
"firstLastName": {
"script": null,
"id": null,
"firstName": "John",
"lastName": "Smith"
},
"score": 23.31368511252333
}
]
}
Split Name code sample for python:
import requests
url = "https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameBatch"
payload = {
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith"
}
]
}
headers = {
"X-API-KEY": "your-api-key",
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
Body parameter:
{
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith"
}
]
}
The above command returns JSON structured like this:
{
"personalNames": [
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": null,
"firstLastName": {
"script": null,
"id": null,
"firstName": "John",
"lastName": "Smith"
},
"score": 23.31368511252333
}
]
}
Split Name code sample for javascript:
const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameBatch", {
"method": "POST",
"headers": {
"X-API-KEY": "your-api-key",
"Accept": "application/json",
"Content-Type": "application/json"
},
"body": JSON.stringify({
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith"
}
]
})
});
if (response.ok) {
const data = await response.json(); // Extract JSON data from response
console.log(data); // View data in the console
} else {
console.error("The request failed with status:", response.status, response);
}
Body parameter:
{
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith"
}
]
}
The above command returns JSON structured like this:
{
"personalNames": [
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": null,
"firstLastName": {
"script": null,
"id": null,
"firstName": "John",
"lastName": "Smith"
},
"score": 23.31368511252333
}
]
}
Precision: Cost: 1 credit per name .Description: Returns the most likely first name and last name structure of a full name.For requests with a GET method all parameters are required . For more ease in the use of our requests we recommend that you use the POST method.
HTTP request GET https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/{name}
Request header Property Required Description X-API-KEY
Required Your Namsor's services API key
Request parameters Name Type Required Description name
String Required Full name (first name and last name) .
Response Name Type Description Enumerators script
String Name of the script used for the name, in ISO 15924 format. Script id
String Provided unique identifier. name
String Submitted full name. nameParserType
String Most likely structure of the name. Name structures nameParserTypeAlt
String Second most likely structure of the name. Name structures firstLastName
Object Split name. script
String Name of the script used for the name, in ISO 15924 format. Script id
String Provided unique identifier. firstName
String First name (or given name). lastName
String Last name (or family name). score
Number Higher implies a more reliable result, score is not normalized.
Code sample: Shell Java PythonJavaScript JS Split Name code sample for shell:
curl --request GET \
--url https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/John%20Smith \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
The above command returns JSON structured like this:
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": null,
"firstLastName": {
"script": null,
"id": null,
"firstName": "John",
"lastName": "Smith"
},
"score": 23.31368511252333
}
Split Name code sample for java:
HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/John%20Smith")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();
The above command returns JSON structured like this:
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": null,
"firstLastName": {
"script": null,
"id": null,
"firstName": "John",
"lastName": "Smith"
},
"score": 23.31368511252333
}
Split Name code sample for python:
import requests
url = "https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/John%20Smith"
headers = {
"X-API-KEY": "your-api-key",
"Accept": "application/json"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
The above command returns JSON structured like this:
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": null,
"firstLastName": {
"script": null,
"id": null,
"firstName": "John",
"lastName": "Smith"
},
"score": 23.31368511252333
}
Split Name code sample for javascript:
const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/John%20Smith", {
"method": "GET",
"headers": {
"X-API-KEY": "your-api-key",
"Accept": "application/json"
}
});
if (response.ok) {
const data = await response.json(); // Extract JSON data from response
console.log(data); // View data in the console
} else {
console.error("The request failed with status:", response.status, response);
}
The above command returns JSON structured like this:
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "John Smith",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": null,
"firstLastName": {
"script": null,
"id": null,
"firstName": "John",
"lastName": "Smith"
},
"score": 23.31368511252333
}
Split Name Geo Split name from full name , country code .
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": "FN1LN2",
"firstLastName": {
"script": null,
"id": null,
"firstName": "Ricardo",
"lastName": "Darín"
},
"score": 3.447624982163207
}
Split Name Geo enhances the basic Split Name feature by incorporating a country of residence into the analysis. This contextual information improves the accuracy of identifying the first name and last name from an unsplit full name.
POST GET
Precision: Cost: 1 credit per name .Description: Returns the most likely first name and last name structure of up to 100 full names using their geographic context.More about: Split Name Geo HTTP request POST https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameGeoBatch
Request header Property Required Description X-API-KEY
Required Your Namsor's services API key
Request body Name Type Required Description personalNames
Array of objects Required A list of unsplit full names with their country of residence .[{...}]. id
String Optional Unique identifier .[{...}]. name
String Required Full name (first name and last name) .[{...}]. countryIso2
String Required Most likely country of origin, in ISO 3166-1 alpha-2 format .
Response Name Type Description Enumerators personalNames
Array of objects List of submitted names separated into first name and last name structure. [{...}]. script
String Name of the script used for the name, in ISO 15924 format. Script [{...}]. id
String Provided unique identifier. [{...}]. name
String Submitted full name. [{...}]. nameParserType
String Most likely structure of the name. Name structures [{...}]. nameParserTypeAlt
String Second most likely structure of the name. Name structures [{...}]. firstLastName
Object Split name. {...}. script
String Name of the script used for the name, in ISO 15924 format. Script {...}. id
String Provided unique identifier. {...}. firstName
String First name (or given name). {...}. lastName
String Last name (or family name). [{...}]. score
Number Higher implies a more reliable result, score is not normalized.
Code sample: Shell Java PythonJavaScript JS Split Name Geo code sample for shell:
curl --request POST \
--url https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameGeoBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","name":"Ricardo Darín","countryIso2":"AR"}]}'
Body parameter:
{
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"countryIso2": "AR"
}
]
}
The above command returns JSON structured like this:
{
"personalNames": [
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": "FN1LN2",
"firstLastName": {
"script": null,
"id": null,
"firstName": "Ricardo",
"lastName": "Darín"
},
"score": 3.447624982163207
}
]
}
Split Name Geo code sample for java:
HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameGeoBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"name\":\"Ricardo Darín\",\"countryIso2\":\"AR\"}]}")
.asString();
Body parameter:
{
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"countryIso2": "AR"
}
]
}
The above command returns JSON structured like this:
{
"personalNames": [
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": "FN1LN2",
"firstLastName": {
"script": null,
"id": null,
"firstName": "Ricardo",
"lastName": "Darín"
},
"score": 3.447624982163207
}
]
}
Split Name Geo code sample for python:
import requests
url = "https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameGeoBatch"
payload = {
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"countryIso2": "AR"
}
]
}
headers = {
"X-API-KEY": "your-api-key",
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
Body parameter:
{
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"countryIso2": "AR"
}
]
}
The above command returns JSON structured like this:
{
"personalNames": [
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": "FN1LN2",
"firstLastName": {
"script": null,
"id": null,
"firstName": "Ricardo",
"lastName": "Darín"
},
"score": 3.447624982163207
}
]
}
Split Name Geo code sample for javascript:
const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameGeoBatch", {
"method": "POST",
"headers": {
"X-API-KEY": "your-api-key",
"Accept": "application/json",
"Content-Type": "application/json"
},
"body": JSON.stringify({
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"countryIso2": "AR"
}
]
})
});
if (response.ok) {
const data = await response.json(); // Extract JSON data from response
console.log(data); // View data in the console
} else {
console.error("The request failed with status:", response.status, response);
}
Body parameter:
{
"personalNames": [
{
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"countryIso2": "AR"
}
]
}
The above command returns JSON structured like this:
{
"personalNames": [
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": "FN1LN2",
"firstLastName": {
"script": null,
"id": null,
"firstName": "Ricardo",
"lastName": "Darín"
},
"score": 3.447624982163207
}
]
}
Precision: Cost: 1 credit per name .Description: Returns the most likely first name and last name structure of a full name using its geographic context.For requests with a GET method all parameters are required . For more ease in the use of our requests we recommend that you use the POST method.
HTTP request GET https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/{name}/{countryIso2}
Request header Property Required Description X-API-KEY
Required Your Namsor's services API key
Request parameters Name Type Required Description name
String Required Full name (first name and last name) .countryIso2
String Required Most likely country of origin, in ISO 3166-1 alpha-2 format .
Response Name Type Description Enumerators script
String Name of the script used for the name, in ISO 15924 format. Script id
String Provided unique identifier. name
String Submitted full name. nameParserType
String Most likely structure of the name. Name structures nameParserTypeAlt
String Second most likely structure of the name. Name structures firstLastName
Object Split name. script
String Name of the script used for the name, in ISO 15924 format. Script id
String Provided unique identifier. firstName
String First name (or given name). lastName
String Last name (or family name). score
Number Higher implies a more reliable result, score is not normalized.
Code sample: Shell Java PythonJavaScript JS Split Name Geo code sample for shell:
curl --request GET \
--url https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/Ricardo%20Darín/AR \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
The above command returns JSON structured like this:
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": "FN1LN2",
"firstLastName": {
"script": null,
"id": null,
"firstName": "Ricardo",
"lastName": "Darín"
},
"score": 3.447624982163207
}
Split Name Geo code sample for java:
HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/Ricardo%20Darín/AR")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();
The above command returns JSON structured like this:
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": "FN1LN2",
"firstLastName": {
"script": null,
"id": null,
"firstName": "Ricardo",
"lastName": "Darín"
},
"score": 3.447624982163207
}
Split Name Geo code sample for python:
import requests
url = "https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/Ricardo%20Darín/AR"
headers = {
"X-API-KEY": "your-api-key",
"Accept": "application/json"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
The above command returns JSON structured like this:
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": "FN1LN2",
"firstLastName": {
"script": null,
"id": null,
"firstName": "Ricardo",
"lastName": "Darín"
},
"score": 3.447624982163207
}
Split Name Geo code sample for javascript:
const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/Ricardo%20Darín/AR", {
"method": "GET",
"headers": {
"X-API-KEY": "your-api-key",
"Accept": "application/json"
}
});
if (response.ok) {
const data = await response.json(); // Extract JSON data from response
console.log(data); // View data in the console
} else {
console.error("The request failed with status:", response.status, response);
}
The above command returns JSON structured like this:
{
"script": "LATIN",
"id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
"name": "Ricardo Darín",
"nameParserType": "FN1LN1",
"nameParserTypeAlt": "FN1LN2",
"firstLastName": {
"script": null,
"id": null,
"firstName": "Ricardo",
"lastName": "Darín"
},
"score": 3.447624982163207
}