Namsor

Type API – Determine a proper noun type

Namsor's Name Type Recognition API accurately classifies proper nouns into categories such as personal names (anthroponyms), brand names, geographic names (toponyms), or pseudonyms. By analyzing naming patterns and considering regional information, our API provides precise classifications, enhancing data quality and supporting various applications.


Whether you're processing names for data cleaning, entity recognition, or market analysis, this API adapts seamlessly to your data format. Providing a country of origin can further improve the precision, especially for names from cultures where naming conventions vary. This functionality is precious for applications in data normalization, user profiling, and cross-cultural research.

Name Type

Name type from proper noun .

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "Bic",
    "commonType": "brand-name",
    "commonTypeAlt": "anthroponym",
    "score": 4.758963741392455
}

Name Type analyzes a proper noun to determine whether it is the name of a person (anthroponym), a geographic location (toponym), a personal alias (pseudonym), or a brand name. For best results, we recommend submitting the full name when applicable.

  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Description: Returns the type of up to 100 submitted proper nouns. Ex: John Smith = personal name, Namsor = brand name, Cherbourg en Cotentin = toponym, Batman = pseudonym.
  • More about: Name Type

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
information

To get an API key for free, please create an account.

Request body
NameTypeRequiredDescription
properNounsArray of objectsRequiredA list of proper names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredA proper noun (person, brand, etc.).
Response
NameTypeDescriptionEnumerators
properNounsArray of objectsA list of commonTypeized names..
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted proper noun.
[{...}].commonTypeStringMost likely type of the proper noun.Name types
[{...}].commonTypeAltStringSecond most likely type of the proper noun.Name types
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Name Type code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"properNouns":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","name":"Bic"}]}'

Body parameter:

{
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Bic"
    }
  ]
}

The above command returns JSON structured like this:

{
    "properNouns": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Bic",
            "commonType": "brand-name",
            "commonTypeAlt": "anthroponym",
            "score": 4.758963741392455
        }
    ]
}

Name Type code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"properNouns\":[{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"name\":\"Bic\"}]}")
.asString();

Body parameter:

{
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Bic"
    }
  ]
}

The above command returns JSON structured like this:

{
    "properNouns": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Bic",
            "commonType": "brand-name",
            "commonTypeAlt": "anthroponym",
            "score": 4.758963741392455
        }
    ]
}

Name Type code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeBatch"

payload = {
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Bic"
    }
  ]
}
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:

{
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Bic"
    }
  ]
}

The above command returns JSON structured like this:

{
    "properNouns": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Bic",
            "commonType": "brand-name",
            "commonTypeAlt": "anthroponym",
            "score": 4.758963741392455
        }
    ]
}

Name Type code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Bic"
    }
  ]
})
});

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:

{
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Bic"
    }
  ]
}

The above command returns JSON structured like this:

{
    "properNouns": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Bic",
            "commonType": "brand-name",
            "commonTypeAlt": "anthroponym",
            "score": 4.758963741392455
        }
    ]
}
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Description: Returns the type of a submitted proper noun. Ex: John Smith = personal name, Namsor = brand name, Cherbourg en Cotentin = toponym, Batman = pseudonym.
information

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

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/nameType/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
information

To get an API key for free, please create an account.

Request parameters
NameTypeRequiredDescription
nameStringRequiredA proper noun (person, brand, etc.).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
nameStringSubmitted proper noun.
commonTypeStringMost likely type of the proper noun.Name types
commonTypeAltStringSecond most likely type of the proper noun.Name types
scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Name Type code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/nameType/Bic \
--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": "Bic",
    "commonType": "brand-name",
    "commonTypeAlt": "anthroponym",
    "score": 4.758963741392455
}

Name Type code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/nameType/Bic")
.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": "Bic",
    "commonType": "brand-name",
    "commonTypeAlt": "anthroponym",
    "score": 4.758963741392455
}

Name Type code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/nameType/Bic"

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": "Bic",
    "commonType": "brand-name",
    "commonTypeAlt": "anthroponym",
    "score": 4.758963741392455
}

Name Type code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/nameType/Bic", {
  "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": "Bic",
    "commonType": "brand-name",
    "commonTypeAlt": "anthroponym",
    "score": 4.758963741392455
}

Name Type Geo

Name type from proper noun , country code .

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "Edi Gathegi",
    "commonType": "anthroponym",
    "commonTypeAlt": "brand-name",
    "score": 18.579081911201673
}

Name Type Geo builds on the Name Type feature by incorporating local context to improve accuracy. It analyzes a proper noun to determine whether it refers to a person, a geographic location, a personal alias, or a brand.

  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Description: Returns the type of up to 100 submitted proper nouns using their geographic context. Ex: John Smith = personal name, Namsor = brand name, Cherbourg en Cotentin = toponym, Batman = pseudonym.
  • More about: Name Type Geo

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeoBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
information

To get an API key for free, please create an account.

Request body
NameTypeRequiredDescription
properNounsArray of objectsRequiredA list of proper names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredA proper noun (person, brand, etc.).
[{...}].countryIso2StringRequiredMost likely country of origin, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
properNounsArray of objectsA list of commonTypeized names..
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted proper noun.
[{...}].commonTypeStringMost likely type of the proper noun.Name types
[{...}].commonTypeAltStringSecond most likely type of the proper noun.Name types
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Name Type Geo code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeoBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"properNouns":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","name":"Edi Gathegi","countryIso2":"KE"}]}'

Body parameter:

{
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Edi Gathegi",
      "countryIso2": "KE"
    }
  ]
}

The above command returns JSON structured like this:

{
    "properNouns": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Edi Gathegi",
            "commonType": "anthroponym",
            "commonTypeAlt": "brand-name",
            "score": 18.579081911201673
        }
    ]
}

Name Type Geo code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeoBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"properNouns\":[{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"name\":\"Edi Gathegi\",\"countryIso2\":\"KE\"}]}")
.asString();

Body parameter:

{
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Edi Gathegi",
      "countryIso2": "KE"
    }
  ]
}

The above command returns JSON structured like this:

{
    "properNouns": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Edi Gathegi",
            "commonType": "anthroponym",
            "commonTypeAlt": "brand-name",
            "score": 18.579081911201673
        }
    ]
}

Name Type Geo code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeoBatch"

payload = {
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Edi Gathegi",
      "countryIso2": "KE"
    }
  ]
}
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:

{
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Edi Gathegi",
      "countryIso2": "KE"
    }
  ]
}

The above command returns JSON structured like this:

{
    "properNouns": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Edi Gathegi",
            "commonType": "anthroponym",
            "commonTypeAlt": "brand-name",
            "score": 18.579081911201673
        }
    ]
}

Name Type Geo code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeoBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Edi Gathegi",
      "countryIso2": "KE"
    }
  ]
})
});

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:

{
  "properNouns": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Edi Gathegi",
      "countryIso2": "KE"
    }
  ]
}

The above command returns JSON structured like this:

{
    "properNouns": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Edi Gathegi",
            "commonType": "anthroponym",
            "commonTypeAlt": "brand-name",
            "score": 18.579081911201673
        }
    ]
}
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Description: Returns the type of a proper noun using its geographic context. Ex: John Smith = personal name, Namsor = brand name, Cherbourg en Cotentin = toponym, Batman = pseudonym.
information

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

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeo/{name}/{countryIso2}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
information

To get an API key for free, please create an account.

Request parameters
NameTypeRequiredDescription
nameStringRequiredA proper noun (person, brand, etc.).
countryIso2StringRequiredMost likely country of origin, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
nameStringSubmitted proper noun.
commonTypeStringMost likely type of the proper noun.Name types
commonTypeAltStringSecond most likely type of the proper noun.Name types
scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Name Type Geo code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeo/Edi%20Gathegi/KE \
--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": "Edi Gathegi",
    "commonType": "anthroponym",
    "commonTypeAlt": "brand-name",
    "score": 18.579081911201673
}

Name Type Geo code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeo/Edi%20Gathegi/KE")
.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": "Edi Gathegi",
    "commonType": "anthroponym",
    "commonTypeAlt": "brand-name",
    "score": 18.579081911201673
}

Name Type Geo code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeo/Edi%20Gathegi/KE"

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": "Edi Gathegi",
    "commonType": "anthroponym",
    "commonTypeAlt": "brand-name",
    "score": 18.579081911201673
}

Name Type Geo code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeo/Edi%20Gathegi/KE", {
  "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": "Edi Gathegi",
    "commonType": "anthroponym",
    "commonTypeAlt": "brand-name",
    "score": 18.579081911201673
}