Namsor

API documentation

Namsor has developed a name checking technology, able to create comprehensive analysis through multiple processing. Our API can classify names by origin, by ethnicity, by residence country, by gender, and supports many alphabets*.

Introduction

About

API Requests and Responses

  • All endpoints return JSON containing either an object or a nested array of objects.
  • Currently certain NamSor API endpoints use nested object structures in their query body and / or responses, please refer yourself to the corresponding code example.
  • Be aware that data in the code examples have been URL encoded into the corresponding ASCII code characters when necessary, for example 谢晓亮 is replaced by %E8%B0%A2%E6%99%93%E4%BA%AE. URLs cannot contain spaces or non-ASCII characters. When making GET requests to the API use URL encoding to convert non-ASCII characters into a format that can be transmitted over the internet.

Data Privacy

By default Namsor's machine learning algorithm may improve data evaluation based on the data inputs and does store logs of submitted request. You may change these setting either in your user account or by calling the dedicated API endpoints. All data logs are secured using AES encryption before being stored.

If you wish to disable machine learning based on your submissions, please set learnable to false in the "Enhance privacy" section on the my account page. When set to false for an API key, the data processed using that key will not feed the machine learning algorithm.

If you wish to disable service usage history, please set anonymized to true in the "Enhance privacy" section on the my account page. When set to true for an API key, the data processed using that key will be irreversibly anonymised using SHA encryption. Note that the smart processing for redundant queries will still work even if your data is anonymised.

Authentication

API Key Creation

Customer accounts are common to all Namsor group websites. To create an API key visit Namsor or another site of the Namsor group and create an account. Navigate to the account information page to retrieve your API key. Your newly created account comes with 500 free credits that you may use immediately with any of Namsor's tools: API, CSV and Excel file processor or Developer tools.

API Key Installation

Your API key must be set in the header of your request using the X-API-KEY property. Please refer yourself to the provided code samples for correct key installation.

information

You must replace your-api-key with your Namsor API key.

Credits

What are Credits

We use a credit system to track usage. Each plan comes with a monthly quantity of credits and a price for request that exceed your monthly allowance. The free Basic subscription plan grants you 500 credits but other plans are available in case you have higher requirements. As an example, with 500 credits you can either:

  • Process 50 names to determine their origins.
  • Process 25 names to determine their ethnicities.
  • Process 50 names to determine their US race ethncities.
  • Process 50 names to determine their countries of residence.
  • Process 500 names to determine their genders.
information

Admin routes are free.

Repeated Operations Tolerance

Our API features smart processing and it will not charge for analyzing identical data for up to 20 times. For example if you submit the same full name 5 times in order to infer it's origin then you will only be charged 1 credit.

Soft Limit vs Hard Limit

In your user account you may set two types of credit usage limits:

  • A soft limit that will trigger an email notification when reached.
  • A hard limit that will trigger an email notification and block the API key when reached.

Track Usage

There are two ways to track your credit usage: check the provided graphics in your user account or query the appropriate Admin routes (API Usage, API Usage History and API Usage History Aggregate).

Errors

The NamSor API uses the following error codes:

  • 401UnauthorizedMissing or incorrect API Key.
  • 403ForbiddenAPI Limit Reached or API Key Disabled.
  • 404Not FoundThe specified route could not be found.
  • 500Internal Server ErrorServer error. Try again later.

Result Explainability

The Namsor API offers the ability to obtain a detailed explanation of how the artificial intelligence arrived at its results for a given request. By enabling this option, an additional field is included in the API response, providing a Python code explanation of the process followed by the AI.

Important

  • Additional Cost: Activating explainability incurs an extra cost of 50 credits per name processed.
  • Explanation Format: The returned explanation is in Python code. For optimal use, it is recommended to remove tabs and carriage returns so that the code is usable.

How to Activate Explainability:

  • Contact the Namsor Team: Before using this feature, please contact our team to activate the explainability option on your client account.
  • Configure the Request: Add the following header to your API request:
X-OPTION-EXPLANABILITY: true

By following these steps, each request will now include a detailed explanation of the result, allowing you to gain deep insights into the workings of our artificial intelligence specialized in onomastics.

AI Act Use Case

The Namsor API can be instrumental in complying with national or supra-national regulations aimed at preventing biased results and discriminatory effects in Artificial Intelligence. Namsor is capable of inferring special categories of personal data from names to estimate the risk of algorithmic biases related to gender, race, cultural/linguistic background, ethnicity, or country of origin.

The European AI Act introduces a new exception regarding “sensitive data” to protect citizens' rights from discrimination that might arise due to bias in AI systems. For the purpose of ensuring bias detection and correction in high-risk AI systems, it permits the processing of special categories of personal data, as a matter of substantial public interest.

Namsor's Explainability Option is designed to provide a closed mathematical formula that includes the entire explanation of name classification (with both training data features and complete model formulas). This can be stored for audit purposes in decision-making AI algorithms.

To protect Namsor's intellectual property, we require specific documentation and a signed NDA before activating this option.

Origin from names

Namsor helps you find thorough information about the origin of a name by establishing a name's country of origin, the ethnicity, the diaspora and the US race classification. We also provide a corridor evalutation API, to check background information about international interactions.

Name Origin

Name Origin feature analyzes a first name and/or a last name to identify its country of origin with slightly improved accuracy than the Full Name Origin feature. Adding a first and last name increases the accuracy of the determined origin.
The feature returns the region of origin, the country of origin, and a list of the top 10 countries of origin, ordered from most likely to least likely. Each country of origin returned is accompanied by a calibrated probability.

Note that the name diaspora feature may be better suited for multicultural countries, such as the United States, Canada, Australia, New-Zealand and other "melting-pots".

  • Description: Returns the most likely country of origin of up to 100 first names and/or last names.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Name Origin feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/originBatch
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalFirst name, given name, nickname.
[{...}].lastNameStringOptionalLast name, family name, surname.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names with their countries of origin.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name, given name or nickname.
[{...}].lastNameStringSubmitted last name, family name or surname.
[{...}].countryOriginStringMost likely country of origin, in ISO 3166-1 alpha-2 format.Country of origin
[{...}].countryOriginAltStringSecond most likely country of origin, in ISO 3166-1 alpha-2 format.Country of origin
[{...}].countriesOriginTopArrayTop 10 most likely countries of origin, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.Country of origin
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].regionOriginStringMost likely region of origin.Regions of origin or residence
[{...}].topRegionOriginStringMost likely region of origin (alternative classification).Regions of origin or residence
[{...}].subRegionOriginStringMost likely sub-region of origin.Sub regions of origin or residence
[{...}].probabilityCalibratedNumberThe calibrated probability that countryOrigin has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that countryOrigin OR countryOriginAlt have been guessed correctly. -1 = still calibrating.
Optional: X-OPTION-RELIGION-STATS = True
[{...}].religionStatsArray of objectsReligious statistics for the most likely country of origin. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in most likely country of origin (countryOrigin).Religions
[{...}].pctNumberPercentage of population practicing this religion in most likely country of origin (countryOrigin).
[{...}].religionStatsAltArray of objectsReligious statistics for the second most likely country of origin. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in second most likely country of origin (countryOriginAlt).Religions
[{...}].pctNumberPercentage of population practicing this religion in second most likely country of origin (countryOriginAlt).

Code sample:

Name Origin code sample for shell:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Keith",
            "lastName": "Haring",
            "countryOrigin": "GB",
            "countryOriginAlt": "IE",
            "countriesOriginTop": ["GB", "IE", "DE", "NL", "EE", "SE", "DK", "MY", "ID", "KH"],
            "score": 10.255274142073363,
            "regionOrigin": "Europe",
            "topRegionOrigin": "Europe",
            "subRegionOrigin": "Northern Europe",
            "probabilityCalibrated": 0.7724670883776785,
            "probabilityAltCalibrated": 0.8719112661893521
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 85.24262131 },
    { religion: 'Unaffiliated', pct: 14.20710355 },
    { religion: 'Other', pct: 0.300150075 },
    { religion: 'Buddhist', pct: 0.050025013 },
    { religion: 'Folk', pct: 0.050025013 },
    { religion: 'Hindu', pct: 0.050025013 },
    { religion: 'Jewish', pct: 0.050025013 },
    { religion: 'Muslim', pct: 0.050025013 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 88.97427291753932 },
    { religion: 'Unaffiliated', pct: 9.78531187532157 },
    { religion: 'Muslim', pct: 0.6298564872835054 },
    { religion: 'Other', pct: 0.16200879680269425 },
    { religion: 'Buddhist', pct: 0.13284624102403442 },
    { religion: 'Folk', pct: 0.13284624102403442 },
    { religion: 'Hindu', pct: 0.13284624102403442 },
    { religion: 'Jewish', pct: 0.050011199980789234 },
  ],
}

Name Origin code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Keith",
            "lastName": "Haring",
            "countryOrigin": "GB",
            "countryOriginAlt": "IE",
            "countriesOriginTop": ["GB", "IE", "DE", "NL", "EE", "SE", "DK", "MY", "ID", "KH"],
            "score": 10.255274142073363,
            "regionOrigin": "Europe",
            "topRegionOrigin": "Europe",
            "subRegionOrigin": "Northern Europe",
            "probabilityCalibrated": 0.7724670883776785,
            "probabilityAltCalibrated": 0.8719112661893521
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 85.24262131 },
    { religion: 'Unaffiliated', pct: 14.20710355 },
    { religion: 'Other', pct: 0.300150075 },
    { religion: 'Buddhist', pct: 0.050025013 },
    { religion: 'Folk', pct: 0.050025013 },
    { religion: 'Hindu', pct: 0.050025013 },
    { religion: 'Jewish', pct: 0.050025013 },
    { religion: 'Muslim', pct: 0.050025013 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 88.97427291753932 },
    { religion: 'Unaffiliated', pct: 9.78531187532157 },
    { religion: 'Muslim', pct: 0.6298564872835054 },
    { religion: 'Other', pct: 0.16200879680269425 },
    { religion: 'Buddhist', pct: 0.13284624102403442 },
    { religion: 'Folk', pct: 0.13284624102403442 },
    { religion: 'Hindu', pct: 0.13284624102403442 },
    { religion: 'Jewish', pct: 0.050011199980789234 },
  ],
}

Name Origin code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}
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",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Keith",
            "lastName": "Haring",
            "countryOrigin": "GB",
            "countryOriginAlt": "IE",
            "countriesOriginTop": ["GB", "IE", "DE", "NL", "EE", "SE", "DK", "MY", "ID", "KH"],
            "score": 10.255274142073363,
            "regionOrigin": "Europe",
            "topRegionOrigin": "Europe",
            "subRegionOrigin": "Northern Europe",
            "probabilityCalibrated": 0.7724670883776785,
            "probabilityAltCalibrated": 0.8719112661893521
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 85.24262131 },
    { religion: 'Unaffiliated', pct: 14.20710355 },
    { religion: 'Other', pct: 0.300150075 },
    { religion: 'Buddhist', pct: 0.050025013 },
    { religion: 'Folk', pct: 0.050025013 },
    { religion: 'Hindu', pct: 0.050025013 },
    { religion: 'Jewish', pct: 0.050025013 },
    { religion: 'Muslim', pct: 0.050025013 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 88.97427291753932 },
    { religion: 'Unaffiliated', pct: 9.78531187532157 },
    { religion: 'Muslim', pct: 0.6298564872835054 },
    { religion: 'Other', pct: 0.16200879680269425 },
    { religion: 'Buddhist', pct: 0.13284624102403442 },
    { religion: 'Folk', pct: 0.13284624102403442 },
    { religion: 'Hindu', pct: 0.13284624102403442 },
    { religion: 'Jewish', pct: 0.050011199980789234 },
  ],
}

Name Origin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/originBatch", {
  "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",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
})
});

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",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Keith",
            "lastName": "Haring",
            "countryOrigin": "GB",
            "countryOriginAlt": "IE",
            "countriesOriginTop": ["GB", "IE", "DE", "NL", "EE", "SE", "DK", "MY", "ID", "KH"],
            "score": 10.255274142073363,
            "regionOrigin": "Europe",
            "topRegionOrigin": "Europe",
            "subRegionOrigin": "Northern Europe",
            "probabilityCalibrated": 0.7724670883776785,
            "probabilityAltCalibrated": 0.8719112661893521
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 85.24262131 },
    { religion: 'Unaffiliated', pct: 14.20710355 },
    { religion: 'Other', pct: 0.300150075 },
    { religion: 'Buddhist', pct: 0.050025013 },
    { religion: 'Folk', pct: 0.050025013 },
    { religion: 'Hindu', pct: 0.050025013 },
    { religion: 'Jewish', pct: 0.050025013 },
    { religion: 'Muslim', pct: 0.050025013 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 88.97427291753932 },
    { religion: 'Unaffiliated', pct: 9.78531187532157 },
    { religion: 'Muslim', pct: 0.6298564872835054 },
    { religion: 'Other', pct: 0.16200879680269425 },
    { religion: 'Buddhist', pct: 0.13284624102403442 },
    { religion: 'Folk', pct: 0.13284624102403442 },
    { religion: 'Hindu', pct: 0.13284624102403442 },
    { religion: 'Jewish', pct: 0.050011199980789234 },
  ],
}
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.

  • Description: Returns the most likely country of origin of a first name and/or a last name.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Name Origin feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/origin/{firstName}/{lastName}
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request parameters
NameTypeRequiredDescription
firstNameStringRequiredFirst name (or given name).
lastNameStringRequiredLast name (or family name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
firstNameStringSubmitted first name.
lastNameStringSubmitted last name.
countryOriginStringMost likely country of origin, in ISO 3166-1 alpha-2 format.Country of origin
countryOriginAltStringSecond most likely country of origin, in ISO 3166-1 alpha-2 format.Country of origin
countriesOriginTopArrayTop 10 most likely countries of origin, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.Country of origin
scoreNumberHigher implies a more reliable result, score is not normalized.
regionOriginStringMost likely region of origin.Regions of origin or residence
topRegionOriginStringMost likely region of origin (alternative classification).Regions of origin or residence
subRegionOriginStringMost likely sub-region of origin.Sub regions of origin or residence
probabilityCalibratedNumberThe calibrated probability that countryOrigin has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that countryOrigin OR countryOriginAlt have been guessed correctly. -1 = still calibrating.
Optional: X-OPTION-RELIGION-STATS = True
religionStatsArray of objectsReligious statistics for the most likely country of origin. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in most likely country of origin (countryOrigin).Religions
[{...}].pctNumberPercentage of population practicing this religion in most likely country of origin (countryOrigin).
religionStatsAltArray of objectsReligious statistics for the second most likely country of origin. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in second most likely country of origin (countryOriginAlt).Religions
[{...}].pctNumberPercentage of population practicing this religion in second most likely country of origin (countryOriginAlt).

Code sample:

Name Origin code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/origin/Keith/Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "76d53c84-623b-4e8c-9414-3e68b9b1d171",
    "firstName": "Keith",
    "lastName": "Haring",
    "countryOrigin": "GB",
    "countryOriginAlt": "IE",
    "countriesOriginTop": ["GB", "IE", "DE", "NL", "EE", "SE", "DK", "MY", "ID", "KH"],
    "score": 10.255274142073363,
    "regionOrigin": "Europe",
    "topRegionOrigin": "Europe",
    "subRegionOrigin": "Northern Europe",
    "probabilityCalibrated": 0.7724670883776785,
    "probabilityAltCalibrated": 0.8719112661893521
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 85.24262131 },
    { religion: 'Unaffiliated', pct: 14.20710355 },
    { religion: 'Other', pct: 0.300150075 },
    { religion: 'Buddhist', pct: 0.050025013 },
    { religion: 'Folk', pct: 0.050025013 },
    { religion: 'Hindu', pct: 0.050025013 },
    { religion: 'Jewish', pct: 0.050025013 },
    { religion: 'Muslim', pct: 0.050025013 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 88.97427291753932 },
    { religion: 'Unaffiliated', pct: 9.78531187532157 },
    { religion: 'Muslim', pct: 0.6298564872835054 },
    { religion: 'Other', pct: 0.16200879680269425 },
    { religion: 'Buddhist', pct: 0.13284624102403442 },
    { religion: 'Folk', pct: 0.13284624102403442 },
    { religion: 'Hindu', pct: 0.13284624102403442 },
    { religion: 'Jewish', pct: 0.050011199980789234 },
  ],
}

Name Origin code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/origin/Keith/Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "76d53c84-623b-4e8c-9414-3e68b9b1d171",
    "firstName": "Keith",
    "lastName": "Haring",
    "countryOrigin": "GB",
    "countryOriginAlt": "IE",
    "countriesOriginTop": ["GB", "IE", "DE", "NL", "EE", "SE", "DK", "MY", "ID", "KH"],
    "score": 10.255274142073363,
    "regionOrigin": "Europe",
    "topRegionOrigin": "Europe",
    "subRegionOrigin": "Northern Europe",
    "probabilityCalibrated": 0.7724670883776785,
    "probabilityAltCalibrated": 0.8719112661893521
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 85.24262131 },
    { religion: 'Unaffiliated', pct: 14.20710355 },
    { religion: 'Other', pct: 0.300150075 },
    { religion: 'Buddhist', pct: 0.050025013 },
    { religion: 'Folk', pct: 0.050025013 },
    { religion: 'Hindu', pct: 0.050025013 },
    { religion: 'Jewish', pct: 0.050025013 },
    { religion: 'Muslim', pct: 0.050025013 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 88.97427291753932 },
    { religion: 'Unaffiliated', pct: 9.78531187532157 },
    { religion: 'Muslim', pct: 0.6298564872835054 },
    { religion: 'Other', pct: 0.16200879680269425 },
    { religion: 'Buddhist', pct: 0.13284624102403442 },
    { religion: 'Folk', pct: 0.13284624102403442 },
    { religion: 'Hindu', pct: 0.13284624102403442 },
    { religion: 'Jewish', pct: 0.050011199980789234 },
  ],
}

Name Origin code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/origin/Keith/Haring"

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": "76d53c84-623b-4e8c-9414-3e68b9b1d171",
    "firstName": "Keith",
    "lastName": "Haring",
    "countryOrigin": "GB",
    "countryOriginAlt": "IE",
    "countriesOriginTop": ["GB", "IE", "DE", "NL", "EE", "SE", "DK", "MY", "ID", "KH"],
    "score": 10.255274142073363,
    "regionOrigin": "Europe",
    "topRegionOrigin": "Europe",
    "subRegionOrigin": "Northern Europe",
    "probabilityCalibrated": 0.7724670883776785,
    "probabilityAltCalibrated": 0.8719112661893521
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 85.24262131 },
    { religion: 'Unaffiliated', pct: 14.20710355 },
    { religion: 'Other', pct: 0.300150075 },
    { religion: 'Buddhist', pct: 0.050025013 },
    { religion: 'Folk', pct: 0.050025013 },
    { religion: 'Hindu', pct: 0.050025013 },
    { religion: 'Jewish', pct: 0.050025013 },
    { religion: 'Muslim', pct: 0.050025013 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 88.97427291753932 },
    { religion: 'Unaffiliated', pct: 9.78531187532157 },
    { religion: 'Muslim', pct: 0.6298564872835054 },
    { religion: 'Other', pct: 0.16200879680269425 },
    { religion: 'Buddhist', pct: 0.13284624102403442 },
    { religion: 'Folk', pct: 0.13284624102403442 },
    { religion: 'Hindu', pct: 0.13284624102403442 },
    { religion: 'Jewish', pct: 0.050011199980789234 },
  ],
}

Name Origin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/origin/Keith/Haring", {
  "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": "76d53c84-623b-4e8c-9414-3e68b9b1d171",
    "firstName": "Keith",
    "lastName": "Haring",
    "countryOrigin": "GB",
    "countryOriginAlt": "IE",
    "countriesOriginTop": ["GB", "IE", "DE", "NL", "EE", "SE", "DK", "MY", "ID", "KH"],
    "score": 10.255274142073363,
    "regionOrigin": "Europe",
    "topRegionOrigin": "Europe",
    "subRegionOrigin": "Northern Europe",
    "probabilityCalibrated": 0.7724670883776785,
    "probabilityAltCalibrated": 0.8719112661893521
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 85.24262131 },
    { religion: 'Unaffiliated', pct: 14.20710355 },
    { religion: 'Other', pct: 0.300150075 },
    { religion: 'Buddhist', pct: 0.050025013 },
    { religion: 'Folk', pct: 0.050025013 },
    { religion: 'Hindu', pct: 0.050025013 },
    { religion: 'Jewish', pct: 0.050025013 },
    { religion: 'Muslim', pct: 0.050025013 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 88.97427291753932 },
    { religion: 'Unaffiliated', pct: 9.78531187532157 },
    { religion: 'Muslim', pct: 0.6298564872835054 },
    { religion: 'Other', pct: 0.16200879680269425 },
    { religion: 'Buddhist', pct: 0.13284624102403442 },
    { religion: 'Folk', pct: 0.13284624102403442 },
    { religion: 'Hindu', pct: 0.13284624102403442 },
    { religion: 'Jewish', pct: 0.050011199980789234 },
  ],
}

Full Name Origin

Full Name Origin feature analyzes an unsplit full name (first name and last name) to identify its country of origin.
The feature returns the region of origin, the country of origin, and a list of the top 10 countries of origin, ordered from most likely to least likely. Each country of origin returned is accompanied by a calibrated probability.

Note that the name diaspora feature may be better suited for multicultural countries, such as the United States, Canada, Australia, New-Zealand and other "melting-pots".

information

If the first and last name are clearly identifiable, the Name Origin feature will be slightly more accurate.

  • Description: Returns the most likely country of origin of up to 100 unsplit full names.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Full Name Origin feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/originFullBatch
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted full names with their countries of origin.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].countryOriginStringMost likely country of origin, in ISO 3166-1 alpha-2 format.Country of origin
[{...}].countryOriginAltStringSecond most likely country of origin, in ISO 3166-1 alpha-2 format.Country of origin
[{...}].countriesOriginTopArrayTop 10 most likely countries of origin, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.Country of origin
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].regionOriginStringMost likely region of origin.Regions of origin or residence
[{...}].topRegionOriginStringMost likely region of origin (alternative classification).Regions of origin or residence
[{...}].subRegionOriginStringMost likely sub-region of origin.Sub regions of origin or residence
[{...}].probabilityCalibratedNumberThe calibrated probability that countryOrigin has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that countryOrigin OR countryOriginAlt have been guessed correctly. -1 = still calibrating.
Optional: X-OPTION-RELIGION-STATS = True
[{...}].religionStatsArray of objectsReligious statistics for the most likely country of origin. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in most likely country of origin (countryOrigin).Religions
[{...}].pctNumberPercentage of population practicing this religion in most likely country of origin (countryOrigin).
[{...}].religionStatsAltArray of objectsReligious statistics for the second most likely country of origin. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in second most likely country of origin (countryOriginAlt).Religions
[{...}].pctNumberPercentage of population practicing this religion in second most likely country of origin (countryOriginAlt).

Code sample:

Full Name Origin code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/originFullBatch \
--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":"Keith Haring"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Keith Haring",
            "countryOrigin": "GB",
            "countryOriginAlt": "IE",
            "countriesOriginTop": ["GB", "IE", "DE", "NL", "DK", "SE", "CH", "EE", "MY", "HK"],
            "score": 11.240061482140302,
            "regionOrigin": "Europe",
            "topRegionOrigin": "Europe",
            "subRegionOrigin": "Northern Europe",
            "probabilityCalibrated": 0.8369777938445658,
            "probabilityAltCalibrated": 0.9297055536113793
        }
    ]
}

Full Name Origin code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/originFullBatch")
.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\":\"Keith Haring\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Keith Haring",
            "countryOrigin": "GB",
            "countryOriginAlt": "IE",
            "countriesOriginTop": ["GB", "IE", "DE", "NL", "DK", "SE", "CH", "EE", "MY", "HK"],
            "score": 11.240061482140302,
            "regionOrigin": "Europe",
            "topRegionOrigin": "Europe",
            "subRegionOrigin": "Northern Europe",
            "probabilityCalibrated": 0.8369777938445658,
            "probabilityAltCalibrated": 0.9297055536113793
        }
    ]
}

Full Name Origin code sample for python:

import requests

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

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

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Keith Haring",
            "countryOrigin": "GB",
            "countryOriginAlt": "IE",
            "countriesOriginTop": ["GB", "IE", "DE", "NL", "DK", "SE", "CH", "EE", "MY", "HK"],
            "score": 11.240061482140302,
            "regionOrigin": "Europe",
            "topRegionOrigin": "Europe",
            "subRegionOrigin": "Northern Europe",
            "probabilityCalibrated": 0.8369777938445658,
            "probabilityAltCalibrated": 0.9297055536113793
        }
    ]
}

Full Name Origin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/originFullBatch", {
  "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": "Keith Haring"
    }
  ]
})
});

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": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Keith Haring",
            "countryOrigin": "GB",
            "countryOriginAlt": "IE",
            "countriesOriginTop": ["GB", "IE", "DE", "NL", "DK", "SE", "CH", "EE", "MY", "HK"],
            "score": 11.240061482140302,
            "regionOrigin": "Europe",
            "topRegionOrigin": "Europe",
            "subRegionOrigin": "Northern Europe",
            "probabilityCalibrated": 0.8369777938445658,
            "probabilityAltCalibrated": 0.9297055536113793
        }
    ]
}
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.

  • Description: Returns the most likely country of origin of an unsplit full name.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Full Name Origin feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/originFull/{name}
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
nameStringSubmitted full name.
countryOriginStringMost likely country of origin, in ISO 3166-1 alpha-2 format.Country of origin
countryOriginAltStringSecond most likely country of origin, in ISO 3166-1 alpha-2 format.Country of origin
countriesOriginTopArrayTop 10 most likely countries of origin, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.Country of origin
scoreNumberHigher implies a more reliable result, score is not normalized.
regionOriginStringMost likely region of origin.Regions of origin or residence
topRegionOriginStringMost likely region of origin (alternative classification).Regions of origin or residence
subRegionOriginStringMost likely sub-region of origin.Sub regions of origin or residence
probabilityCalibratedNumberThe calibrated probability that countryOrigin has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that countryOrigin OR countryOriginAlt have been guessed correctly. -1 = still calibrating.
Optional: X-OPTION-RELIGION-STATS = True
religionStatsArray of objectsReligious statistics for the most likely country of origin. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in most likely country of origin (countryOrigin).Religions
[{...}].pctNumberPercentage of population practicing this religion in most likely country of origin (countryOrigin).
religionStatsAltArray of objectsReligious statistics for the second most likely country of origin. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in second most likely country of origin (countryOriginAlt).Religions
[{...}].pctNumberPercentage of population practicing this religion in second most likely country of origin (countryOriginAlt).

Code sample:

Full Name Origin code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/originFull/Keith%20Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "76d53c84-623b-4e8c-9414-3e68b9b1d171",
    "name": "Keith Haring",
    "countryOrigin": "GB",
    "countryOriginAlt": "IE",
    "countriesOriginTop": ["GB", "IE", "DE", "NL", "DK", "SE", "CH", "EE", "MY", "HK"],
    "score": 11.240061482140302,
    "regionOrigin": "Europe",
    "topRegionOrigin": "Europe",
    "subRegionOrigin": "Northern Europe",
    "probabilityCalibrated": 0.8369777938445658,
    "probabilityAltCalibrated": 0.9297055536113793
}

Full Name Origin code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/originFull/Keith%20Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "76d53c84-623b-4e8c-9414-3e68b9b1d171",
    "name": "Keith Haring",
    "countryOrigin": "GB",
    "countryOriginAlt": "IE",
    "countriesOriginTop": ["GB", "IE", "DE", "NL", "DK", "SE", "CH", "EE", "MY", "HK"],
    "score": 11.240061482140302,
    "regionOrigin": "Europe",
    "topRegionOrigin": "Europe",
    "subRegionOrigin": "Northern Europe",
    "probabilityCalibrated": 0.8369777938445658,
    "probabilityAltCalibrated": 0.9297055536113793
}

Full Name Origin code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/originFull/Keith%20Haring"

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": "76d53c84-623b-4e8c-9414-3e68b9b1d171",
    "name": "Keith Haring",
    "countryOrigin": "GB",
    "countryOriginAlt": "IE",
    "countriesOriginTop": ["GB", "IE", "DE", "NL", "DK", "SE", "CH", "EE", "MY", "HK"],
    "score": 11.240061482140302,
    "regionOrigin": "Europe",
    "topRegionOrigin": "Europe",
    "subRegionOrigin": "Northern Europe",
    "probabilityCalibrated": 0.8369777938445658,
    "probabilityAltCalibrated": 0.9297055536113793
}

Full Name Origin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/originFull/Keith%20Haring", {
  "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": "76d53c84-623b-4e8c-9414-3e68b9b1d171",
    "name": "Keith Haring",
    "countryOrigin": "GB",
    "countryOriginAlt": "IE",
    "countriesOriginTop": ["GB", "IE", "DE", "NL", "DK", "SE", "CH", "EE", "MY", "HK"],
    "score": 11.240061482140302,
    "regionOrigin": "Europe",
    "topRegionOrigin": "Europe",
    "subRegionOrigin": "Northern Europe",
    "probabilityCalibrated": 0.8369777938445658,
    "probabilityAltCalibrated": 0.9297055536113793
}

Name Diaspora

Name Diaspora feature analyzes a name to identify the most likely ethnicity or diaspora with slightly improved accuracy than the Full Name Diaspora feature. Adding a first and last name and a country of residence increases the accuracy of the determined diaspora.
The feature returns the most likely ethnicity or a diaspora and the top 10 most likely ethnicities, ordered from most likely to least likely. Each ethnicity returned is accompanied by a calibrated probability.

  • Description: Returns the most likely ethnicity or diaspora of up to 100 first names (optional) and last names, according to their country of residence.
  • Precision:Precision gauge
  • Cost: 20 credits per name.
  • Test: Name Diaspora feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaBatch
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names with their country of residence.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalFirst name, given name, nickname.
[{...}].lastNameStringRequiredLast name, family name, surname.
[{...}].countryIso2StringOptionalCountry of residence, in ISO 3166-1 alpha-2 format. "US" by default (if no value indicated).
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names with their ethnicities.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name.
[{...}].lastNameStringSubmitted last name.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].ethnicityAltStringSecond most likely ethnicity.Ethnicities or diasporas
[{...}].ethnicityStringMost likely ethnicity.Ethnicities or diasporas
[{...}].liftedBooleanIndicates if the output ethnicity is based on machine learning only, or further lifted as a known fact by a country-specific rule.
[{...}].countryIso2StringSubmitted country of residence, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].ethnicitiesTopArrayTop 10 most likely ethnicities, ordered from most likely to least likely.Ethnicities or diasporas
[{...}].probabilityCalibratedNumberThe calibrated probability that ethnicity has been guessed correctly. -1 = still calibrating .
[{...}].probabilityAltCalibratedNumberThe calibrated probability that ethnicity OR ethnicityAlt have been guessed correctly. -1 = still calibrating .
Optional: X-OPTION-RELIGION-STATS = True
[{...}].religionStatsArray of objectsReligious statistics in the country of origin of the most likely diaspora. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion within country of origin of most likely diaspora (ethnicity).Religions
[{...}].pctNumberPercentage of the population practicing this religion in the country of origin of the most likely diaspora (ethnicity).
[{...}].religionStatsAltArray of objectsReligious statistics in the country of origin of the second most likely diaspora. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion within country of origin of second most likely diaspora (ethnicityAlt).Religions
[{...}].pctNumberPercentage of the population practicing this religion in the country of origin of the second most likely diaspora (ethnicityAlt).

Code sample:

Name Diaspora code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"0d7d6417-0bbb-4205-951d-b3473f605b56","firstName":"Keith","lastName":"Haring","countryIso2":"US"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
            "firstName": "Keith",
            "lastName": "Haring",
            "score": 8.653234788906794,
            "ethnicityAlt": "British",
            "ethnicity": "German",
            "lifted": false,
            "countryIso2": "US",
            "ethnicitiesTop": ["German", "British", "Dutch", "Danish", "Irish", "Norwegian", "Swedish", "Jewish", "NativeHawaiian", "Austrian"],
            "probabilityCalibrated": 0.5197497794419499,
            "probabilityAltCalibrated": 0.5197497794419499
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
}

Name Diaspora code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"0d7d6417-0bbb-4205-951d-b3473f605b56\",\"firstName\":\"Keith\",\"lastName\":\"Haring\",\"countryIso2\":\"US\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
            "firstName": "Keith",
            "lastName": "Haring",
            "score": 8.653234788906794,
            "ethnicityAlt": "British",
            "ethnicity": "German",
            "lifted": false,
            "countryIso2": "US",
            "ethnicitiesTop": ["German", "British", "Dutch", "Danish", "Irish", "Norwegian", "Swedish", "Jewish", "NativeHawaiian", "Austrian"],
            "probabilityCalibrated": 0.5197497794419499,
            "probabilityAltCalibrated": 0.5197497794419499
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
}

Name Diaspora code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}
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": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
            "firstName": "Keith",
            "lastName": "Haring",
            "score": 8.653234788906794,
            "ethnicityAlt": "British",
            "ethnicity": "German",
            "lifted": false,
            "countryIso2": "US",
            "ethnicitiesTop": ["German", "British", "Dutch", "Danish", "Irish", "Norwegian", "Swedish", "Jewish", "NativeHawaiian", "Austrian"],
            "probabilityCalibrated": 0.5197497794419499,
            "probabilityAltCalibrated": 0.5197497794419499
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
}

Name Diaspora code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
})
});

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": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
            "firstName": "Keith",
            "lastName": "Haring",
            "score": 8.653234788906794,
            "ethnicityAlt": "British",
            "ethnicity": "German",
            "lifted": false,
            "countryIso2": "US",
            "ethnicitiesTop": ["German", "British", "Dutch", "Danish", "Irish", "Norwegian", "Swedish", "Jewish", "NativeHawaiian", "Austrian"],
            "probabilityCalibrated": 0.5197497794419499,
            "probabilityAltCalibrated": 0.5197497794419499
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
}
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.

  • Description: Returns the most likely ethnicity or diaspora of a first name (optional) and a last name, according to the country of residence.
  • Precision:Precision gauge
  • Cost: 20 credits per name.
  • Test: Name Diaspora feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/diaspora/{countryIso2}/{firstName}/{lastName}
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request parameters
NameTypeRequiredDescription
countryIso2StringRequiredCountry of residence, in ISO 3166-1 alpha-2 format. "US" by default (if no value indicated).
firstNameStringRequiredFirst name, given name, nickname.
lastNameStringRequiredLast name, family name, surname.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted first name.
lastNameStringSubmitted last name.
scoreNumberHigher implies a more reliable result, score is not normalized.
ethnicityAltStringSecond most likely ethnicity.Ethnicities or diasporas
ethnicityStringMost likely ethnicity.Ethnicities or diasporas
liftedBooleanIndicates if the result of the "ethnicity" field is based on machine learning only, or further lifted as a known fact by a country-specific rule.
countryIso2StringCountry of residence, in ISO 3166-1 alpha-2 format.Country of residence
ethnicitiesTopArrayTop 10 most likely ethnicities, ordered from most likely to least likely.Ethnicities or diasporas
probabilityCalibratedNumberThe calibrated probability that ethnicity has been guessed correctly. -1 = still calibrating .
probabilityAltCalibratedNumberThe calibrated probability that ethnicity OR ethnicityAlt have been guessed correctly. -1 = still calibrating .
Optional: X-OPTION-RELIGION-STATS = True
religionStatsArray of objectsReligious statistics in the country of origin of the most likely diaspora. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion within country of origin of most likely diaspora (ethnicity).Religions
[{...}].pctNumberPercentage of the population practicing this religion in the country of origin of the most likely diaspora (ethnicity).
religionStatsAltArray of objectsReligious statistics in the country of origin of the second most likely diaspora. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion within country of origin of second most likely diaspora (ethnicityAlt).Religions
[{...}].pctNumberPercentage of the population practicing this religion in the country of origin of the second most likely diaspora (ethnicityAlt).

Code sample:

Name Diaspora code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/diaspora/US/Keith/Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
    "firstName": "Keith",
    "lastName": "Haring",
    "score": 8.653234788906794,
    "ethnicityAlt": "British",
    "ethnicity": "German",
    "lifted": false,
    "countryIso2": "US",
    "ethnicitiesTop": ["German", "British", "Dutch", "Danish", "Irish", "Norwegian", "Swedish", "Jewish", "NativeHawaiian", "Austrian"],
    "probabilityCalibrated": 0.5197497794419499,
    "probabilityAltCalibrated": 0.5197497794419499
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
}

Name Diaspora code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/diaspora/US/Keith/Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
    "firstName": "Keith",
    "lastName": "Haring",
    "score": 8.653234788906794,
    "ethnicityAlt": "British",
    "ethnicity": "German",
    "lifted": false,
    "countryIso2": "US",
    "ethnicitiesTop": ["German", "British", "Dutch", "Danish", "Irish", "Norwegian", "Swedish", "Jewish", "NativeHawaiian", "Austrian"],
    "probabilityCalibrated": 0.5197497794419499,
    "probabilityAltCalibrated": 0.5197497794419499
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
}

Name Diaspora code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/diaspora/US/Keith/Haring"

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": "0d7d6417-0bbb-4205-951d-b3473f605b56",
    "firstName": "Keith",
    "lastName": "Haring",
    "score": 8.653234788906794,
    "ethnicityAlt": "British",
    "ethnicity": "German",
    "lifted": false,
    "countryIso2": "US",
    "ethnicitiesTop": ["German", "British", "Dutch", "Danish", "Irish", "Norwegian", "Swedish", "Jewish", "NativeHawaiian", "Austrian"],
    "probabilityCalibrated": 0.5197497794419499,
    "probabilityAltCalibrated": 0.5197497794419499
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
}

Name Diaspora code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/diaspora/US/Keith/Haring", {
  "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": "0d7d6417-0bbb-4205-951d-b3473f605b56",
    "firstName": "Keith",
    "lastName": "Haring",
    "score": 8.653234788906794,
    "ethnicityAlt": "British",
    "ethnicity": "German",
    "lifted": false,
    "countryIso2": "US",
    "ethnicitiesTop": ["German", "British", "Dutch", "Danish", "Irish", "Norwegian", "Swedish", "Jewish", "NativeHawaiian", "Austrian"],
    "probabilityCalibrated": 0.5197497794419499,
    "probabilityAltCalibrated": 0.5197497794419499
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 68.7 },
    { religion: 'Unaffiliated', pct: 24.7 },
    { religion: 'Muslim', pct: 5.8 },
    { religion: 'Buddhist', pct: 0.3 },
    { religion: 'Jewish', pct: 0.3 },
    { religion: 'Other', pct: 0.1 },
    { religion: 'Folk', pct: 0.05 },
    { religion: 'Hindu', pct: 0.05 },
  ],
}

Full Name Diaspora

Full Name Diaspora feature analyzes an unsplit full name (first name and last name) to identify the most likely ethnicity or diaspora.
The feature returns the most likely ethnicity or a diaspora and the top 10 most likely ethnicities, ordered from most likely to least likely. Each ethnicity returned is accompanied by a calibrated probability.

information

If the first and last name are clearly identifiable, the Name Diaspora feature will be slightly more accurate.

  • Description: Returns the most likely ethnicity or diaspora of up to 100 unsplit full names, according to their country of residence.
  • Precision:Precision gauge
  • Cost: 20 credits per name.
  • Test: Full Name Diaspora feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaFullBatch
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal full names with their country of residence.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredUnsplit full name (first name and last name).
[{...}].countryIso2StringRequiredCountry of residence, in ISO 3166-1 alpha-2 format. "US" by default (if no value indicated).
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted full names with their ethnicities.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].ethnicityAltStringSecond most likely ethnicity.Ethnicities or diasporas
[{...}].ethnicityStringMost likely ethnicity.Ethnicities or diasporas
[{...}].liftedBooleanIndicates if the output ethnicity is based on machine learning only, or further lifted as a known fact by a country-specific rule.
[{...}].countryIso2StringSubmitted country of residence, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].ethnicitiesTopArrayTop 10 most likely ethnicities, ordered from most likely to least likely.Ethnicities or diasporas
[{...}].probabilityCalibratedNumberThe calibrated probability that ethnicity has been guessed correctly. -1 = still calibrating .
[{...}].probabilityAltCalibratedNumberThe calibrated probability that ethnicity OR ethnicityAlt have been guessed correctly. -1 = still calibrating .
Optional: X-OPTION-RELIGION-STATS = True
[{...}].religionStatsArray of objectsReligious statistics in the country of origin of the most likely diaspora. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion within country of origin of most likely diaspora (ethnicity).Religions
[{...}].pctNumberPercentage of the population practicing this religion in the country of origin of the most likely diaspora (ethnicity).
[{...}].religionStatsAltArray of objectsReligious statistics in the country of origin of the second most likely diaspora. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion within country of origin of second most likely diaspora (ethnicityAlt).Religions
[{...}].pctNumberPercentage of the population practicing this religion in the country of origin of the second most likely diaspora (ethnicityAlt).

Code sample:

Full Name Diaspora code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaFullBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"0d7d6417-0bbb-4205-951d-b3473f605b56","name":"Keith Haring","countryIso2":"US"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
            "name": "Keith Haring",
            "score": 1.9177978014400305,
            "ethnicityAlt": "British",
            "ethnicity": "German",
            "lifted": false,
            "countryIso2": "US",
            "ethnicitiesTop": ["German", "British", "Dutch", "Irish", "Norwegian", "Danish", "Swedish", "Swiss", "Austrian", "NativeHawaiian"],
            "probabilityCalibrated": 0.29971840123154375,
            "probabilityAltCalibrated": 0.35544175296700403
        }
    ]
}

Full Name Diaspora code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaFullBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"0d7d6417-0bbb-4205-951d-b3473f605b56\",\"name\":\"Keith Haring\",\"countryIso2\":\"US\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
            "name": "Keith Haring",
            "score": 1.9177978014400305,
            "ethnicityAlt": "British",
            "ethnicity": "German",
            "lifted": false,
            "countryIso2": "US",
            "ethnicitiesTop": ["German", "British", "Dutch", "Irish", "Norwegian", "Danish", "Swedish", "Swiss", "Austrian", "NativeHawaiian"],
            "probabilityCalibrated": 0.29971840123154375,
            "probabilityAltCalibrated": 0.35544175296700403
        }
    ]
}

Full Name Diaspora code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}
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": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
            "name": "Keith Haring",
            "score": 1.9177978014400305,
            "ethnicityAlt": "British",
            "ethnicity": "German",
            "lifted": false,
            "countryIso2": "US",
            "ethnicitiesTop": ["German", "British", "Dutch", "Irish", "Norwegian", "Danish", "Swedish", "Swiss", "Austrian", "NativeHawaiian"],
            "probabilityCalibrated": 0.29971840123154375,
            "probabilityAltCalibrated": 0.35544175296700403
        }
    ]
}

Full Name Diaspora code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaFullBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
})
});

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": "0d7d6417-0bbb-4205-951d-b3473f605b56",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
            "name": "Keith Haring",
            "score": 1.9177978014400305,
            "ethnicityAlt": "British",
            "ethnicity": "German",
            "lifted": false,
            "countryIso2": "US",
            "ethnicitiesTop": ["German", "British", "Dutch", "Irish", "Norwegian", "Danish", "Swedish", "Swiss", "Austrian", "NativeHawaiian"],
            "probabilityCalibrated": 0.29971840123154375,
            "probabilityAltCalibrated": 0.35544175296700403
        }
    ]
}
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.

  • Description: Returns the most likely ethnicity or diaspora of an unsplit full name, according to the country of residence.
  • Precision:Precision gauge
  • Cost: 20 credits per name.
  • Test: Full Name Diaspora feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaFull/{countryIso2}/{name}
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request parameters
NameTypeRequiredDescription
countryIso2StringRequiredCountry of residence, in ISO 3166-1 alpha-2 format. "US" by default (if no value indicated).
nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
nameStringSubmitted full name.
scoreNumberHigher implies a more reliable result, score is not normalized.
ethnicityAltStringSecond most likely ethnicity.Ethnicities or diasporas
ethnicityStringMost likely ethnicity.Ethnicities or diasporas
liftedBooleanIndicates if the result of the "ethnicity" field is based on machine learning only, or further lifted as a known fact by a country-specific rule.
countryIso2StringCountry of residence, in ISO 3166-1 alpha-2 format.Country of residence
ethnicitiesTopArrayTop 10 most likely ethnicities, ordered from most likely to least likely.Ethnicities or diasporas
probabilityCalibratedNumberThe calibrated probability that ethnicity has been guessed correctly. -1 = still calibrating .
probabilityAltCalibratedNumberThe calibrated probability that ethnicity OR ethnicityAlt have been guessed correctly. -1 = still calibrating .
Optional: X-OPTION-RELIGION-STATS = True
religionStatsArray of objectsReligious statistics in the country of origin of the most likely diaspora. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion within country of origin of most likely diaspora (ethnicity).Religions
[{...}].pctNumberPercentage of the population practicing this religion in the country of origin of the most likely diaspora (ethnicity).
religionStatsAltArray of objectsReligious statistics in the country of origin of the second most likely diaspora. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion within country of origin of second most likely diaspora (ethnicityAlt).Religions
[{...}].pctNumberPercentage of the population practicing this religion in the country of origin of the second most likely diaspora (ethnicityAlt).

Code sample:

Full Name Diaspora code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaFull/US/Keith%20Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
    "name": "Keith Haring",
    "score": 1.9177978014400305,
    "ethnicityAlt": "British",
    "ethnicity": "German",
    "lifted": false,
    "countryIso2": "US",
    "ethnicitiesTop": ["German", "British", "Dutch", "Irish", "Norwegian", "Danish", "Swedish", "Swiss", "Austrian", "NativeHawaiian"],
    "probabilityCalibrated": 0.29971840123154375,
    "probabilityAltCalibrated": 0.35544175296700403
}

Full Name Diaspora code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaFull/US/Keith%20Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "0d7d6417-0bbb-4205-951d-b3473f605b56",
    "name": "Keith Haring",
    "score": 1.9177978014400305,
    "ethnicityAlt": "British",
    "ethnicity": "German",
    "lifted": false,
    "countryIso2": "US",
    "ethnicitiesTop": ["German", "British", "Dutch", "Irish", "Norwegian", "Danish", "Swedish", "Swiss", "Austrian", "NativeHawaiian"],
    "probabilityCalibrated": 0.29971840123154375,
    "probabilityAltCalibrated": 0.35544175296700403
}

Full Name Diaspora code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaFull/US/Keith%20Haring"

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": "0d7d6417-0bbb-4205-951d-b3473f605b56",
    "name": "Keith Haring",
    "score": 1.9177978014400305,
    "ethnicityAlt": "British",
    "ethnicity": "German",
    "lifted": false,
    "countryIso2": "US",
    "ethnicitiesTop": ["German", "British", "Dutch", "Irish", "Norwegian", "Danish", "Swedish", "Swiss", "Austrian", "NativeHawaiian"],
    "probabilityCalibrated": 0.29971840123154375,
    "probabilityAltCalibrated": 0.35544175296700403
}

Full Name Diaspora code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/diasporaFull/US/Keith%20Haring", {
  "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": "0d7d6417-0bbb-4205-951d-b3473f605b56",
    "name": "Keith Haring",
    "score": 1.9177978014400305,
    "ethnicityAlt": "British",
    "ethnicity": "German",
    "lifted": false,
    "countryIso2": "US",
    "ethnicitiesTop": ["German", "British", "Dutch", "Irish", "Norwegian", "Danish", "Swedish", "Swiss", "Austrian", "NativeHawaiian"],
    "probabilityCalibrated": 0.29971840123154375,
    "probabilityAltCalibrated": 0.35544175296700403
}

Name US Race

Name US Race feature analyzes a first name and/or a last name to identify the most likely US race with slightly improved accuracy than the Full Name US Race feature. Adding a first and last name and a country of residence increases the accuracy of the determined US race.
The feature returns the most likely US race ethnicity and a list of the most likely US race ethnicities, sorted from most likely to least likely. Each race returned is accompanied by a calibrated probability.

US race is a categorization from United States Census Taxonomy

  • Description: Returns the most likely US race of up to 100 first names and/or last names.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Name US Race feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityBatch
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-USRACEETHNICITY-TAXONOMYUSRACEETHNICITY-6CLASSESOptionalEnumerators for the returned 'race' ethnicity. Do not specify the property of the http request to obtain 4 classes (W_NL, HL, A, B_NL), USRACEETHNICITY-6CLASSES will return 6 classes (W_NL, HL, A, B_NL, AI_AN, PI). For international names (non US resident) please choose 4 classes.
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names with their country of residence.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalFirst name, given name, nickname.
[{...}].lastNameStringOptionalLast name, family name, surname.
[{...}].countryIso2StringOptionalCountry of residence, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names with their race.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name.
[{...}].lastNameStringSubmitted last name.
[{...}].raceEthnicityAltStringSecond most likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
[{...}].raceEthnicityStringMost likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].raceEthnicitiesTopArrayMost likely race, sorted from most likely to least likely (US race categorization from US Census Taxonomy).U.S. race ethnicities
[{...}].probabilityCalibratedNumberThe calibrated probability that raceEthnicity has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that raceEthnicity OR raceEthnicityAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Name US Race code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"85dd5f48-b9e1-4019-88ce-ccc7e56b763f","firstName":"Keith","lastName":"Haring","countryIso2":"US"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
            "firstName": "Keith",
            "lastName": "Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 3.9546190943560813,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.619185913005526,
            "probabilityAltCalibrated": 0.7534347105665851
        }
    ]
}

Name US Race code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"85dd5f48-b9e1-4019-88ce-ccc7e56b763f\",\"firstName\":\"Keith\",\"lastName\":\"Haring\",\"countryIso2\":\"US\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
            "firstName": "Keith",
            "lastName": "Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 3.9546190943560813,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.619185913005526,
            "probabilityAltCalibrated": 0.7534347105665851
        }
    ]
}

Name US Race code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}
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": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
            "firstName": "Keith",
            "lastName": "Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 3.9546190943560813,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.619185913005526,
            "probabilityAltCalibrated": 0.7534347105665851
        }
    ]
}

Name US Race code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
})
});

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": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
            "firstName": "Keith",
            "lastName": "Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 3.9546190943560813,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.619185913005526,
            "probabilityAltCalibrated": 0.7534347105665851
        }
    ]
}
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.

  • Description: Returns the most likely US race from a first name and/or a last name.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Name US Race feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicity/{firstName}/{lastName}
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-USRACEETHNICITY-TAXONOMYUSRACEETHNICITY-6CLASSESOptionalEnumerators for the returned 'race' ethnicity. Do not specify the property of the http request to obtain 4 classes (W_NL, HL, A, B_NL), USRACEETHNICITY-6CLASSES will return 6 classes (W_NL, HL, A, B_NL, AI_AN, PI). For international names (non US resident) please choose 4 classes.
Request parameters
NameTypeRequiredDescription
firstNameStringRequiredFirst name, given name, nickname.
lastNameStringRequiredLast name, family name, surname.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted first name.
lastNameStringSubmitted last name.
raceEthnicityAltStringSecond most likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
raceEthnicityStringMost likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
scoreNumberHigher implies a more reliable result, score is not normalized.
raceEthnicitiesTopArrayMost likely race ethnicities, sorted from most likely to least likely (US race categorization from US Census Taxonomy).U.S. race ethnicities
probabilityCalibratedNumberThe calibrated probability that raceEthnicity has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that raceEthnicity OR raceEthnicityAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Name US Race code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicity/Keith/Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
    "firstName": "Keith",
    "lastName": "Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 3.9546190943560813,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.619185913005526,
    "probabilityAltCalibrated": 0.7534347105665851
}

Name US Race code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicity/Keith/Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
    "firstName": "Keith",
    "lastName": "Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 3.9546190943560813,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.619185913005526,
    "probabilityAltCalibrated": 0.7534347105665851
}

Name US Race code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicity/Keith/Haring"

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": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
    "firstName": "Keith",
    "lastName": "Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 3.9546190943560813,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.619185913005526,
    "probabilityAltCalibrated": 0.7534347105665851
}

Name US Race code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicity/Keith/Haring", {
  "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": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
    "firstName": "Keith",
    "lastName": "Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 3.9546190943560813,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.619185913005526,
    "probabilityAltCalibrated": 0.7534347105665851
}

Name US Race ZIP

Name US Race ZIP feature analyzes a first name and/or a last name to identify the most likely US race with improved accuracy than the basic feature Name US Race. Adding a first and last name and a country of residence increases the accuracy of the determined US race.
The feature returns the most likely US race ethnicity and a list of the most likely US race ethnicities, sorted from most likely to least likely. Each race returned is accompanied by a calibrated probability.

US race is a categorization from United States Census Taxonomy

  • Description: Returns the most likely US race of up to 100 first names and/or last names using their ZIP code.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Name US Race ZIP feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/usZipRaceEthnicityBatch
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-USRACEETHNICITY-TAXONOMYUSRACEETHNICITY-6CLASSESOptionalEnumerators for the returned 'race' ethnicity. Do not specify the property of the http request to obtain 4 classes (W_NL, HL, A, B_NL), USRACEETHNICITY-6CLASSES will return 6 classes (W_NL, HL, A, B_NL, AI_AN, PI). For international names (non US resident) please choose 4 classes.
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names with their country of residence and postal code.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalFirst name, given name, nickname.
[{...}].lastNameStringOptionalLast name, family name, surname.
[{...}].countryIso2StringOptionalCountry of residence, in ISO 3166-1 alpha-2 format.
[{...}].zipCodeStringRequiredPostal code (5-digit) of residence used by the United States Postal Service (USPS).
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names with their race.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name.
[{...}].lastNameStringSubmitted last name.
[{...}].raceEthnicityAltStringSecond most likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
[{...}].raceEthnicityStringMost likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].raceEthnicitiesTopArrayMost likely race, sorted from most likely to least likely (US race categorization from US Census Taxonomy).U.S. race ethnicities
[{...}].probabilityCalibratedNumberThe calibrated probability that raceEthnicity has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that raceEthnicity OR raceEthnicityAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Name US Race ZIP code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/usZipRaceEthnicityBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"728767f9-c5b2-4ed3-a071-828077f16552","firstName":"Keith","lastName":"Haring","countryIso2":"US","zipCode":"10019"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "728767f9-c5b2-4ed3-a071-828077f16552",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US",
      "zipCode": "10019"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "728767f9-c5b2-4ed3-a071-828077f16552",
            "firstName": "Keith",
            "lastName": "Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 3.9546190943560813,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.619185913005526,
            "probabilityAltCalibrated": 0.7534347105665851
        }
    ]
}

Name US Race ZIP code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/usZipRaceEthnicityBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"728767f9-c5b2-4ed3-a071-828077f16552\",\"firstName\":\"Keith\",\"lastName\":\"Haring\",\"countryIso2\":\"US\",\"zipCode\":\"10019\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "728767f9-c5b2-4ed3-a071-828077f16552",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US",
      "zipCode": "10019"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "728767f9-c5b2-4ed3-a071-828077f16552",
            "firstName": "Keith",
            "lastName": "Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 3.9546190943560813,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.619185913005526,
            "probabilityAltCalibrated": 0.7534347105665851
        }
    ]
}

Name US Race ZIP code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "728767f9-c5b2-4ed3-a071-828077f16552",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US",
      "zipCode": "10019"
    }
  ]
}
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": "728767f9-c5b2-4ed3-a071-828077f16552",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US",
      "zipCode": "10019"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "728767f9-c5b2-4ed3-a071-828077f16552",
            "firstName": "Keith",
            "lastName": "Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 3.9546190943560813,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.619185913005526,
            "probabilityAltCalibrated": 0.7534347105665851
        }
    ]
}

Name US Race ZIP code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/usZipRaceEthnicityBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "728767f9-c5b2-4ed3-a071-828077f16552",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US",
      "zipCode": "10019"
    }
  ]
})
});

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": "728767f9-c5b2-4ed3-a071-828077f16552",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US",
      "zipCode": "10019"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "728767f9-c5b2-4ed3-a071-828077f16552",
            "firstName": "Keith",
            "lastName": "Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 3.9546190943560813,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.619185913005526,
            "probabilityAltCalibrated": 0.7534347105665851
        }
    ]
}
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.

  • Description: Returns the most likely US race from a first name and/or a last name using their ZIP code.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Name US Race ZIP feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityZIP5/{firstName}/{lastName}/{zipCode}
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-USRACEETHNICITY-TAXONOMYUSRACEETHNICITY-6CLASSESOptionalEnumerators for the returned 'race' ethnicity. Do not specify the property of the http request to obtain 4 classes (W_NL, HL, A, B_NL), USRACEETHNICITY-6CLASSES will return 6 classes (W_NL, HL, A, B_NL, AI_AN, PI). For international names (non US resident) please choose 4 classes.
Request parameters
NameTypeRequiredDescription
firstNameStringRequiredFirst name, given name, nickname.
lastNameStringRequiredLast name, family name, surname.
zipCodeStringRequiredPostal code (5-digit) of residence used by the United States Postal Service (USPS).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted first name.
lastNameStringSubmitted last name.
raceEthnicityAltStringSecond most likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
raceEthnicityStringMost likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
scoreNumberHigher implies a more reliable result, score is not normalized.
raceEthnicitiesTopArrayMost likely race, sorted from most likely to least likely (US race categorization from US Census Taxonomy).U.S. race ethnicities
probabilityCalibratedNumberThe calibrated probability that raceEthnicity has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that raceEthnicity OR raceEthnicityAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Name US Race ZIP code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityZIP5/Keith/Haring/10019 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "728767f9-c5b2-4ed3-a071-828077f16552",
    "firstName": "Keith",
    "lastName": "Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 3.9546190943560813,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.619185913005526,
    "probabilityAltCalibrated": 0.7534347105665851
}

Name US Race ZIP code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityZIP5/Keith/Haring/10019")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "728767f9-c5b2-4ed3-a071-828077f16552",
    "firstName": "Keith",
    "lastName": "Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 3.9546190943560813,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.619185913005526,
    "probabilityAltCalibrated": 0.7534347105665851
}

Name US Race ZIP code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityZIP5/Keith/Haring/10019"

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": "728767f9-c5b2-4ed3-a071-828077f16552",
    "firstName": "Keith",
    "lastName": "Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 3.9546190943560813,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.619185913005526,
    "probabilityAltCalibrated": 0.7534347105665851
}

Name US Race ZIP code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityZIP5/Keith/Haring/10019", {
  "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": "728767f9-c5b2-4ed3-a071-828077f16552",
    "firstName": "Keith",
    "lastName": "Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 3.9546190943560813,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.619185913005526,
    "probabilityAltCalibrated": 0.7534347105665851
}

Full Name US Race

Full Name US Race feature analyzes an unsplit full name (first name and last name) to identify the most likely US race.
The feature returns the most likely US race ethnicity and a list of the most likely US race ethnicities, sorted from most likely to least likely. Each race returned is accompanied by a calibrated probability.

US race is a categorization from United States Census Taxonomy

information

If the first and last name are clearly identifiable, the Name US Race feature will be slightly more accurate.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityFullBatch
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-USRACEETHNICITY-TAXONOMYUSRACEETHNICITY-6CLASSESOptionalEnumerators for the returned 'race' ethnicity. Do not specify the property of the http request to obtain 4 classes (W_NL, HL, A, B_NL), USRACEETHNICITY-6CLASSES will return 6 classes (W_NL, HL, A, B_NL, AI_AN, PI). For international names (non US resident) please choose 4 classes.
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal full names with their country of residence.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredUnsplit full name (first name and last name).
[{...}].countryIso2StringOptionalCountry of residence, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted full names with their race.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].raceEthnicityAltStringSecond most likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
[{...}].raceEthnicityStringMost likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].raceEthnicitiesTopArrayMost likely race, sorted from most likely to least likely (US race categorization from US Census Taxonomy).U.S. race ethnicities
[{...}].probabilityCalibratedNumberThe calibrated probability that raceEthnicity has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that raceEthnicity OR raceEthnicityAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Full Name US Race code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityFullBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"85dd5f48-b9e1-4019-88ce-ccc7e56b763f","name":"Keith Haring","countryIso2":"US"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
            "name": "Keith Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 6.493299531249249,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.7239234645232184,
            "probabilityAltCalibrated": 0.8814496032861949
        }
    ]
}

Full Name US Race code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityFullBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"85dd5f48-b9e1-4019-88ce-ccc7e56b763f\",\"name\":\"Keith Haring\",\"countryIso2\":\"US\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
            "name": "Keith Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 6.493299531249249,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.7239234645232184,
            "probabilityAltCalibrated": 0.8814496032861949
        }
    ]
}

Full Name US Race code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}
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": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
            "name": "Keith Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 6.493299531249249,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.7239234645232184,
            "probabilityAltCalibrated": 0.8814496032861949
        }
    ]
}

Full Name US Race code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityFullBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
})
});

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": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
            "name": "Keith Haring",
            "raceEthnicityAlt": "B_NL",
            "raceEthnicity": "W_NL",
            "score": 6.493299531249249,
            "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
            "probabilityCalibrated": 0.7239234645232184,
            "probabilityAltCalibrated": 0.8814496032861949
        }
    ]
}
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/usRaceEthnicityFull/{name}
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-USRACEETHNICITY-TAXONOMYUSRACEETHNICITY-6CLASSESOptionalEnumerators for the returned 'race' ethnicity. Do not specify the property of the http request to obtain 4 classes (W_NL, HL, A, B_NL), USRACEETHNICITY-6CLASSES will return 6 classes (W_NL, HL, A, B_NL, AI_AN, PI). For international names (non US resident) please choose 4 classes.
Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
nameStringSubmitted full name.
raceEthnicityAltStringSecond most likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
raceEthnicityStringMost likely race (US race categorization from US Census Taxonomy).U.S. race ethnicities
scoreNumberHigher implies a more reliable result, score is not normalized.
raceEthnicitiesTopArrayMost likely race ethnicities, sorted from most likely to least likely (US race categorization from US Census Taxonomy).U.S. race ethnicities
probabilityCalibratedNumberThe calibrated probability that raceEthnicity has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that raceEthnicity OR raceEthnicityAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Full Name US Race code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityFull/Keith%20Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
    "name": "Keith Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 6.493299531249249,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.7239234645232184,
    "probabilityAltCalibrated": 0.8814496032861949
}

Full Name US Race code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityFull/Keith%20Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
    "name": "Keith Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 6.493299531249249,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.7239234645232184,
    "probabilityAltCalibrated": 0.8814496032861949
}

Full Name US Race code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityFull/Keith%20Haring"

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": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
    "name": "Keith Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 6.493299531249249,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.7239234645232184,
    "probabilityAltCalibrated": 0.8814496032861949
}

Full Name US Race code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/usRaceEthnicityFull/Keith%20Haring", {
  "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": "85dd5f48-b9e1-4019-88ce-ccc7e56b763f",
    "name": "Keith Haring",
    "raceEthnicityAlt": "B_NL",
    "raceEthnicity": "W_NL",
    "score": 6.493299531249249,
    "raceEthnicitiesTop": ["W_NL", "B_NL", "A", "HL"],
    "probabilityCalibrated": 0.7239234645232184,
    "probabilityAltCalibrated": 0.8814496032861949
}

Name Country

Name Country feature analyzes a first name and/or a last name to identify its country of residence with slightly improved accuracy than the Full Name Country feature.
The feature returns the region of residence, the country of residence, and a list of the top 10 countries of residence, ordered from most likely to least likely. Each country of residence returned is accompanied by a calibrated probability.

  • Description: Returns the most likely country of residence of up to 100 first names and/or last names.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Name Country feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLnBatch
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalFirst name, given name, nickname.
[{...}].lastNameStringOptionalLast name, family name, surname.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names with their countries of residence.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name.
[{...}].lastNameStringSubmitted last name.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].countryStringMost likely country of residence, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].countryAltStringSecond most likely country of residence, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].regionStringMost likely region of residence.Regions of origin or residence
[{...}].topRegionStringMost likely region of residence (alternative classification).Regions of origin or residence
[{...}].subRegionStringMost likely sub-region of residence.Sub regions of origin or residence
[{...}].countriesTopArrayTop 10 most likely countries of residence, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.
[{...}].probabilityCalibratedNumberThe calibrated probability that country has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that country OR countryAlt have been guessed correctly. -1 = still calibrating.
Optional: X-OPTION-RELIGION-STATS = True
[{...}].religionStatsArray of objectsReligious statistics for the most likely country of residence. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in most likely country of residence (country).Religions
[{...}].pctNumberPercentage of population practicing that religion in the country of most likely residence (country).
[{...}].religionStatsAltArray of objectsReligious statistics for the second most likely country of residence. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in second most likely country of residence (countryAlt).Religions
[{...}].pctNumberPercentage of population practicing this religion in second most likely country of residence (countryAlt).

Code sample:

Name Country code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLnBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4","firstName":"Keith","lastName":"Haring"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
            "firstName": "Keith",
            "lastName": "Haring",
            "score": 1.0276301745383112,
            "country": "AU",
            "countryAlt": "GB",
            "region": "Oceania",
            "topRegion": "Oceania",
            "subRegion": "Australia and New Zealand",
            "countriesTop": ["AU", "GB", "US", "CA", "NZ", "TT", "SG", "JM", "IE", "DE"],
            "probabilityCalibrated": 0.2748899815464943,
            "probabilityAltCalibrated": 0.3641355716648853
        }
    ]
}

Name Country code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLnBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4\",\"firstName\":\"Keith\",\"lastName\":\"Haring\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
            "firstName": "Keith",
            "lastName": "Haring",
            "score": 1.0276301745383112,
            "country": "AU",
            "countryAlt": "GB",
            "region": "Oceania",
            "topRegion": "Oceania",
            "subRegion": "Australia and New Zealand",
            "countriesTop": ["AU", "GB", "US", "CA", "NZ", "TT", "SG", "JM", "IE", "DE"],
            "probabilityCalibrated": 0.2748899815464943,
            "probabilityAltCalibrated": 0.3641355716648853
        }
    ]
}

Name Country code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}
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": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
            "firstName": "Keith",
            "lastName": "Haring",
            "score": 1.0276301745383112,
            "country": "AU",
            "countryAlt": "GB",
            "region": "Oceania",
            "topRegion": "Oceania",
            "subRegion": "Australia and New Zealand",
            "countriesTop": ["AU", "GB", "US", "CA", "NZ", "TT", "SG", "JM", "IE", "DE"],
            "probabilityCalibrated": 0.2748899815464943,
            "probabilityAltCalibrated": 0.3641355716648853
        }
    ]
}

Name Country code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLnBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
})
});

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": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
            "firstName": "Keith",
            "lastName": "Haring",
            "score": 1.0276301745383112,
            "country": "AU",
            "countryAlt": "GB",
            "region": "Oceania",
            "topRegion": "Oceania",
            "subRegion": "Australia and New Zealand",
            "countriesTop": ["AU", "GB", "US", "CA", "NZ", "TT", "SG", "JM", "IE", "DE"],
            "probabilityCalibrated": 0.2748899815464943,
            "probabilityAltCalibrated": 0.3641355716648853
        }
    ]
}
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.

  • Description: Returns the most likely country of residence from a first name and/or a last name.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Name Country feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLn/{firstName}/{lastName}
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request parameters
NameTypeRequiredDescription
firstNameStringRequiredFirst name, given name, nickname.
lastNameStringRequiredLast name, family name, surname.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted first name, given name or nickname.
lastNameStringSubmitted last name, family name or surname.
scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
countryStringMost likely country of origin, in ISO 3166-1 alpha-2 format.Country of residence
countryAltStringSecond most likely country of origin, in ISO 3166-1 alpha-2 format.Country of residence
regionStringMost likely region of origin.Regions of origin or residence
topRegionStringMost likely region of origin (alternative classification).Regions of origin or residence
subRegionStringMost likely sub-region of origin.Sub regions of origin or residence
countriesTopArrayTop 10 most likely countries of origin, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.
probabilityCalibratedNumberThe calibrated probability that country has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that country OR countryAlt have been guessed correctly. -1 = still calibrating.
Optional: X-OPTION-RELIGION-STATS = True
religionStatsArray of objectsReligious statistics for the most likely country of residence. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in most likely country of residence (country).Religions
[{...}].pctNumberPercentage of population practicing that religion in the country of most likely residence (country).
religionStatsAltArray of objectsReligious statistics for the second most likely country of residence. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in second most likely country of residence (countryAlt).Religions
[{...}].pctNumberPercentage of population practicing this religion in second most likely country of residence (countryAlt).

Code sample:

Name Country code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLn/Keith/Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
    "firstName": "Keith",
    "lastName": "Haring",
    "score": 1.0276301745383112,
    "country": "AU",
    "countryAlt": "GB",
    "region": "Oceania",
    "topRegion": "Oceania",
    "subRegion": "Australia and New Zealand",
    "countriesTop": ["AU", "GB", "US", "CA", "NZ", "TT", "SG", "JM", "IE", "DE"],
    "probabilityCalibrated": 0.2748899815464943,
    "probabilityAltCalibrated": 0.3641355716648853
}

Name Country code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLn/Keith/Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
    "firstName": "Keith",
    "lastName": "Haring",
    "score": 1.0276301745383112,
    "country": "AU",
    "countryAlt": "GB",
    "region": "Oceania",
    "topRegion": "Oceania",
    "subRegion": "Australia and New Zealand",
    "countriesTop": ["AU", "GB", "US", "CA", "NZ", "TT", "SG", "JM", "IE", "DE"],
    "probabilityCalibrated": 0.2748899815464943,
    "probabilityAltCalibrated": 0.3641355716648853
}

Name Country code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLn/Keith/Haring"

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": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
    "firstName": "Keith",
    "lastName": "Haring",
    "score": 1.0276301745383112,
    "country": "AU",
    "countryAlt": "GB",
    "region": "Oceania",
    "topRegion": "Oceania",
    "subRegion": "Australia and New Zealand",
    "countriesTop": ["AU", "GB", "US", "CA", "NZ", "TT", "SG", "JM", "IE", "DE"],
    "probabilityCalibrated": 0.2748899815464943,
    "probabilityAltCalibrated": 0.3641355716648853
}

Name Country code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLn/Keith/Haring", {
  "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": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
    "firstName": "Keith",
    "lastName": "Haring",
    "score": 1.0276301745383112,
    "country": "AU",
    "countryAlt": "GB",
    "region": "Oceania",
    "topRegion": "Oceania",
    "subRegion": "Australia and New Zealand",
    "countriesTop": ["AU", "GB", "US", "CA", "NZ", "TT", "SG", "JM", "IE", "DE"],
    "probabilityCalibrated": 0.2748899815464943,
    "probabilityAltCalibrated": 0.3641355716648853
}

Full Name Country

Full Name Country feature analyzes an unsplit full name (first name and last name) to identify its country of residence.
The feature returns the region of residence, the country of residence, and a list of the top 10 countries of residence, ordered from most likely to least likely. Each country of residence returned is accompanied by a calibrated probability.

information

If the first and last name are clearly identifiable, the Name Country feature will be slightly more accurate.

  • Description: Returns the most likely country of residence of up to 100 unsplit full names.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Full Name Country feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/countryBatch
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted full names with their countries of residence.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].countryStringMost likely country of residence, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].countryAltStringSecond most likely country of residence, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].regionStringMost likely region of residence.Regions of origin or residence
[{...}].topRegionStringMost likely region of residence (alternative classification).Regions of origin or residence
[{...}].subRegionStringMost likely sub-region of residence.Sub regions of origin or residence
[{...}].countriesTopArrayTop 10 most likely countries of residence, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.
[{...}].probabilityCalibratedNumberThe calibrated probability that country has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that country OR countryAlt have been guessed correctly. -1 = still calibrating.
Optional: X-OPTION-RELIGION-STATS = True
[{...}].religionStatsArray of objectsReligious statistics for the most likely country of residence. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in most likely country of residence (country).Religions
[{...}].pctNumberPercentage of population practicing that religion in the country of most likely residence (country).
[{...}].religionStatsAltArray of objectsReligious statistics for the second most likely country of residence. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in second most likely country of residence (countryAlt).Religions
[{...}].pctNumberPercentage of population practicing this religion in second most likely country of residence (countryAlt).

Code sample:

Full Name Country code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/countryBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4","name":"Keith Haring"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
            "name": "Keith Haring",
            "score": 2.051795198803658,
            "country": "GB",
            "countryAlt": "NZ",
            "region": "Europe",
            "topRegion": "Europe",
            "subRegion": "Northern Europe",
            "countriesTop": ["GB", "NZ", "US", "AU", "IE", "CA", "JM", "TT", "SG", "DE"],
            "probabilityCalibrated": 0.22823337808846267,
            "probabilityAltCalibrated": 0.24281407862260063
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 78.3 },
    { religion: 'Unaffiliated', pct: 16.4 },
    { religion: 'Jewish', pct: 1.8 },
    { religion: 'Buddhist', pct: 1.2 },
    { religion: 'Muslim', pct: 0.9 },
    { religion: 'Hindu', pct: 0.6 },
    { religion: 'Other', pct: 0.6 },
    { religion: 'Folk', pct: 0.2 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 78.3007843079025 },
    { religion: 'Unaffiliated', pct: 16.39975226849653 },
    { religion: 'Jewish', pct: 1.799802305332493 },
    { religion: 'Buddhist', pct: 1.1998700873301702 },
    { religion: 'Muslim', pct: 0.8999039783290091 },
    { religion: 'Other', pct: 0.5999661259551334 },
    { religion: 'Hindu', pct: 0.5999378693278477 },
    { religion: 'Folk', pct: 0.1999830573262992 },
  ],
}

Full Name Country code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/countryBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4\",\"name\":\"Keith Haring\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
            "name": "Keith Haring",
            "score": 2.051795198803658,
            "country": "GB",
            "countryAlt": "NZ",
            "region": "Europe",
            "topRegion": "Europe",
            "subRegion": "Northern Europe",
            "countriesTop": ["GB", "NZ", "US", "AU", "IE", "CA", "JM", "TT", "SG", "DE"],
            "probabilityCalibrated": 0.22823337808846267,
            "probabilityAltCalibrated": 0.24281407862260063
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 78.3 },
    { religion: 'Unaffiliated', pct: 16.4 },
    { religion: 'Jewish', pct: 1.8 },
    { religion: 'Buddhist', pct: 1.2 },
    { religion: 'Muslim', pct: 0.9 },
    { religion: 'Hindu', pct: 0.6 },
    { religion: 'Other', pct: 0.6 },
    { religion: 'Folk', pct: 0.2 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 78.3007843079025 },
    { religion: 'Unaffiliated', pct: 16.39975226849653 },
    { religion: 'Jewish', pct: 1.799802305332493 },
    { religion: 'Buddhist', pct: 1.1998700873301702 },
    { religion: 'Muslim', pct: 0.8999039783290091 },
    { religion: 'Other', pct: 0.5999661259551334 },
    { religion: 'Hindu', pct: 0.5999378693278477 },
    { religion: 'Folk', pct: 0.1999830573262992 },
  ],
}

Full Name Country code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "name": "Keith Haring"
    }
  ]
}
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": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
            "name": "Keith Haring",
            "score": 2.051795198803658,
            "country": "GB",
            "countryAlt": "NZ",
            "region": "Europe",
            "topRegion": "Europe",
            "subRegion": "Northern Europe",
            "countriesTop": ["GB", "NZ", "US", "AU", "IE", "CA", "JM", "TT", "SG", "DE"],
            "probabilityCalibrated": 0.22823337808846267,
            "probabilityAltCalibrated": 0.24281407862260063
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 78.3 },
    { religion: 'Unaffiliated', pct: 16.4 },
    { religion: 'Jewish', pct: 1.8 },
    { religion: 'Buddhist', pct: 1.2 },
    { religion: 'Muslim', pct: 0.9 },
    { religion: 'Hindu', pct: 0.6 },
    { religion: 'Other', pct: 0.6 },
    { religion: 'Folk', pct: 0.2 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 78.3007843079025 },
    { religion: 'Unaffiliated', pct: 16.39975226849653 },
    { religion: 'Jewish', pct: 1.799802305332493 },
    { religion: 'Buddhist', pct: 1.1998700873301702 },
    { religion: 'Muslim', pct: 0.8999039783290091 },
    { religion: 'Other', pct: 0.5999661259551334 },
    { religion: 'Hindu', pct: 0.5999378693278477 },
    { religion: 'Folk', pct: 0.1999830573262992 },
  ],
}

Full Name Country code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/countryBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "name": "Keith Haring"
    }
  ]
})
});

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": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
            "name": "Keith Haring",
            "score": 2.051795198803658,
            "country": "GB",
            "countryAlt": "NZ",
            "region": "Europe",
            "topRegion": "Europe",
            "subRegion": "Northern Europe",
            "countriesTop": ["GB", "NZ", "US", "AU", "IE", "CA", "JM", "TT", "SG", "DE"],
            "probabilityCalibrated": 0.22823337808846267,
            "probabilityAltCalibrated": 0.24281407862260063
        }
    ]
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 78.3 },
    { religion: 'Unaffiliated', pct: 16.4 },
    { religion: 'Jewish', pct: 1.8 },
    { religion: 'Buddhist', pct: 1.2 },
    { religion: 'Muslim', pct: 0.9 },
    { religion: 'Hindu', pct: 0.6 },
    { religion: 'Other', pct: 0.6 },
    { religion: 'Folk', pct: 0.2 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 78.3007843079025 },
    { religion: 'Unaffiliated', pct: 16.39975226849653 },
    { religion: 'Jewish', pct: 1.799802305332493 },
    { religion: 'Buddhist', pct: 1.1998700873301702 },
    { religion: 'Muslim', pct: 0.8999039783290091 },
    { religion: 'Other', pct: 0.5999661259551334 },
    { religion: 'Hindu', pct: 0.5999378693278477 },
    { religion: 'Folk', pct: 0.1999830573262992 },
  ],
}
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.

  • Description: Returns the most likely country of residence from an unsplit full name.
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Test: Full Name Country feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/country/{name}
Request header
PropertyValuesRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
X-OPTION-RELIGION-STATSTrueOptionalReturns religious statistics for countries of origin, countries of residence, and estimated diasporas. By default the feature is disabled. Add to the Header of the request the parameter X-OPTION-RELIGION-STATS on True to activate it.
Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
nameStringSubmitted full name.
scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
countryStringMost likely country of origin, in ISO 3166-1 alpha-2 format.Country of residence
countryAltStringSecond most likely country of origin, in ISO 3166-1 alpha-2 format.Country of residence
regionStringMost likely region of origin.Regions of origin or residence
topRegionStringMost likely region of origin (alternative classification).Regions of origin or residence
subRegionStringMost likely sub-region of origin.Sub regions of origin or residence
countriesTopArrayTop 10 most likely countries of origin, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.
probabilityCalibratedNumberThe calibrated probability that country has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that country OR countryAlt have been guessed correctly. -1 = still calibrating.
Optional: X-OPTION-RELIGION-STATS = True
religionStatsArray of objectsReligious statistics for the most likely country of residence. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in most likely country of residence (country).Religions
[{...}].pctNumberPercentage of population practicing that religion in the country of most likely residence (country).
religionStatsAltArray of objectsReligious statistics for the second most likely country of residence. Returned only if the religious statistics option is enabled (X-OPTION-RELIGION-STATS: True).
[{...}].religionStringReligion in second most likely country of residence (countryAlt).Religions
[{...}].pctNumberPercentage of population practicing this religion in second most likely country of residence (countryAlt).

Code sample:

Full Name Country code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/country/Keith%20Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
    "name": "Keith Haring",
    "score": 2.051795198803658,
    "country": "GB",
    "countryAlt": "NZ",
    "region": "Europe",
    "topRegion": "Europe",
    "subRegion": "Northern Europe",
    "countriesTop": ["GB", "NZ", "US", "AU", "IE", "CA", "JM", "TT", "SG", "DE"],
    "probabilityCalibrated": 0.22823337808846267,
    "probabilityAltCalibrated": 0.24281407862260063
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 78.3 },
    { religion: 'Unaffiliated', pct: 16.4 },
    { religion: 'Jewish', pct: 1.8 },
    { religion: 'Buddhist', pct: 1.2 },
    { religion: 'Muslim', pct: 0.9 },
    { religion: 'Hindu', pct: 0.6 },
    { religion: 'Other', pct: 0.6 },
    { religion: 'Folk', pct: 0.2 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 78.3007843079025 },
    { religion: 'Unaffiliated', pct: 16.39975226849653 },
    { religion: 'Jewish', pct: 1.799802305332493 },
    { religion: 'Buddhist', pct: 1.1998700873301702 },
    { religion: 'Muslim', pct: 0.8999039783290091 },
    { religion: 'Other', pct: 0.5999661259551334 },
    { religion: 'Hindu', pct: 0.5999378693278477 },
    { religion: 'Folk', pct: 0.1999830573262992 },
  ],
}

Full Name Country code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/country/Keith%20Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
    "name": "Keith Haring",
    "score": 2.051795198803658,
    "country": "GB",
    "countryAlt": "NZ",
    "region": "Europe",
    "topRegion": "Europe",
    "subRegion": "Northern Europe",
    "countriesTop": ["GB", "NZ", "US", "AU", "IE", "CA", "JM", "TT", "SG", "DE"],
    "probabilityCalibrated": 0.22823337808846267,
    "probabilityAltCalibrated": 0.24281407862260063
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 78.3 },
    { religion: 'Unaffiliated', pct: 16.4 },
    { religion: 'Jewish', pct: 1.8 },
    { religion: 'Buddhist', pct: 1.2 },
    { religion: 'Muslim', pct: 0.9 },
    { religion: 'Hindu', pct: 0.6 },
    { religion: 'Other', pct: 0.6 },
    { religion: 'Folk', pct: 0.2 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 78.3007843079025 },
    { religion: 'Unaffiliated', pct: 16.39975226849653 },
    { religion: 'Jewish', pct: 1.799802305332493 },
    { religion: 'Buddhist', pct: 1.1998700873301702 },
    { religion: 'Muslim', pct: 0.8999039783290091 },
    { religion: 'Other', pct: 0.5999661259551334 },
    { religion: 'Hindu', pct: 0.5999378693278477 },
    { religion: 'Folk', pct: 0.1999830573262992 },
  ],
}

Full Name Country code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/country/Keith%20Haring"

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": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
    "name": "Keith Haring",
    "score": 2.051795198803658,
    "country": "GB",
    "countryAlt": "NZ",
    "region": "Europe",
    "topRegion": "Europe",
    "subRegion": "Northern Europe",
    "countriesTop": ["GB", "NZ", "US", "AU", "IE", "CA", "JM", "TT", "SG", "DE"],
    "probabilityCalibrated": 0.22823337808846267,
    "probabilityAltCalibrated": 0.24281407862260063
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 78.3 },
    { religion: 'Unaffiliated', pct: 16.4 },
    { religion: 'Jewish', pct: 1.8 },
    { religion: 'Buddhist', pct: 1.2 },
    { religion: 'Muslim', pct: 0.9 },
    { religion: 'Hindu', pct: 0.6 },
    { religion: 'Other', pct: 0.6 },
    { religion: 'Folk', pct: 0.2 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 78.3007843079025 },
    { religion: 'Unaffiliated', pct: 16.39975226849653 },
    { religion: 'Jewish', pct: 1.799802305332493 },
    { religion: 'Buddhist', pct: 1.1998700873301702 },
    { religion: 'Muslim', pct: 0.8999039783290091 },
    { religion: 'Other', pct: 0.5999661259551334 },
    { religion: 'Hindu', pct: 0.5999378693278477 },
    { religion: 'Folk', pct: 0.1999830573262992 },
  ],
}

Full Name Country code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/country/Keith%20Haring", {
  "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": "9a3283bd-4efb-4b7b-906c-e3f3c03ea6a4",
    "name": "Keith Haring",
    "score": 2.051795198803658,
    "country": "GB",
    "countryAlt": "NZ",
    "region": "Europe",
    "topRegion": "Europe",
    "subRegion": "Northern Europe",
    "countriesTop": ["GB", "NZ", "US", "AU", "IE", "CA", "JM", "TT", "SG", "DE"],
    "probabilityCalibrated": 0.22823337808846267,
    "probabilityAltCalibrated": 0.24281407862260063
}

Values ​​returned only if the religious statistics option is enabled X-OPTION-RELIGION-STATS: True.

{
  religionStats: [
    { religion: 'Christian', pct: 78.3 },
    { religion: 'Unaffiliated', pct: 16.4 },
    { religion: 'Jewish', pct: 1.8 },
    { religion: 'Buddhist', pct: 1.2 },
    { religion: 'Muslim', pct: 0.9 },
    { religion: 'Hindu', pct: 0.6 },
    { religion: 'Other', pct: 0.6 },
    { religion: 'Folk', pct: 0.2 },
  ],
  religionStatsAlt: [
    { religion: 'Christian', pct: 78.3007843079025 },
    { religion: 'Unaffiliated', pct: 16.39975226849653 },
    { religion: 'Jewish', pct: 1.799802305332493 },
    { religion: 'Buddhist', pct: 1.1998700873301702 },
    { religion: 'Muslim', pct: 0.8999039783290091 },
    { religion: 'Other', pct: 0.5999661259551334 },
    { religion: 'Hindu', pct: 0.5999378693278477 },
    { religion: 'Folk', pct: 0.1999830573262992 },
  ],
}

Names Corridor

Name Corridor feature analyzes two person's first name, last name, and country of residence to return a comprehensive report of the interaction.

  • Description: Returns complete analysis of up to 100 cross border interactions between two names using their geographic context. The sender is the one who initiated the interaction (from), while the receiver is the one intended to receive the interaction (to).
  • Cost: 50 credits per name.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/corridorBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
corridorFromToArray of objectsRequiredA list of name pairs, with country code (nameFrom -> nameTo)..
[{...}].idStringOptionalUnique identifier.
[{...}].firstLastNameGeoFromObjectRequired.
{...}.idStringOptionalUnique identifier.
{...}.firstNameStringRequiredFirst name (or given name) of the sender.
{...}.lastNameStringRequiredLast name (or family name) of the sender.
{...}.countryIso2StringRequiredCountry of origin of the sender, in ISO 3166-1 alpha-2 format.
[{...}].firstLastNameGeoToObjectRequired.
{...}.idStringOptionalUnique identifier.
{...}.firstNameStringRequiredFirst name (or given name) of the receiver.
{...}.lastNameStringRequiredLast name (or family name) of the receiver.
{...}.countryIso2StringRequiredCountry of origin of the receiver, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
corridorFromToArray of objectsA list of classified name pairs..
[{...}].idStringUnique identifier.
[{...}].firstLastNameGeoFromGenderObjectGender data for the sender name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the sender.
{...}.lastNameStringSubmitted last name (or family name) of the sender.
{...}.likelyGenderStringMost likely gender.Genders
{...}.genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].firstLastNameGeoToGenderObjectGender data for the receiver name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the receiver.
{...}.lastNameStringSubmitted last name (or family name) of the receiver.
{...}.likelyGenderStringMost likely gender.Genders
{...}.genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].firstLastNameGeoFromOriginObjectOrigin data for the sender name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the sender.
{...}.lastNameStringSubmitted last name (or family name) of the sender.
{...}.countryOriginStringMost likely country of origin of the sender, in ISO 3166-1 alpha-2 format.Country of origin
{...}.countryOriginAltStringSecond most likely country of origin of the sender, in ISO 3166-1 alpha-2 format.Country of origin
{...}.countriesOriginTopArrayTop 10 most likely countries of origin of the sender, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.Country of origin
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.regionOriginStringMost likely region of origin of the sender.Regions of origin or residence
{...}.topRegionOriginStringMost likely region of origin of the sender (alternative classification).Regions of origin or residence
{...}.subRegionOriginStringMost likely sub-region of origin of the sender.Sub regions of origin or residence
{...}.probabilityCalibratedNumberThe calibrated probability for countryOrigin to have been guessed correctly. -1 = still calibrating.
{...}.probabilityAltCalibratedNumberThe calibrated probability for countryOrigin OR countryOriginAlt to have been guessed correctly. -1 = still calibrating.
[{...}].firstLastNameGeoToOriginObjectOrigin data for the receiver name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the receiver.
{...}.lastNameStringSubmitted last name (or family name) of the receiver.
{...}.countryOriginStringMost likely country of origin of the receiver, in ISO 3166-1 alpha-2 format.Country of origin
{...}.countryOriginAltStringSecond most likely country of origin of the receiver, in ISO 3166-1 alpha-2 format.Country of origin
{...}.countriesOriginTopArrayTop 10 most likely countries of origin of the receiver, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.Country of origin
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.regionOriginStringMost likely region of origin.Regions of origin or residence
{...}.topRegionOriginStringMost likely region of origin of the receiver (alternative classification).Regions of origin or residence
{...}.subRegionOriginStringMost likely sub-region of origin of the receiver.Sub regions of origin or residence
{...}.probabilityCalibratedNumberThe calibrated probability for countryOrigin to have been guessed correctly. -1 = still calibrating.
{...}.probabilityAltCalibratedNumberThe calibrated probability for countryOrigin OR countryOriginAlt to have been guessed correctly. -1 = still calibrating.
[{...}].firstLastNameGeoFromDiasporaObjectDiaspora data for the sender name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the sender.
{...}.lastNameStringSubmitted last name (or family name) of the sender.
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.ethnicityAltStringSecond most likely ethnicity of the sender.Ethnicities or diasporas
{...}.ethnicityStringMost likely ethnicity of the sender.Ethnicities or diasporas
{...}.liftedBooleanIndicates if the output ethnicity is based on machine learning only, or further lifted as a known fact by a country-specific rule.
{...}.countryIso2StringSubmitted country of origin of the sender, in ISO 3166-1 alpha-2 format.Country of residence
{...}.ethnicitiesTopArrayTop 10 most likely ethnicities of the sender, ordered from most likely to least likely.Ethnicities or diasporas
[{...}].firstLastNameGeoToDiasporaObjectDiaspora data for the receiver name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the receiver.
{...}.lastNameStringSubmitted last name (or family name) of the receiver.
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.ethnicityAltStringSecond most likely ethnicity of the receiver.Ethnicities or diasporas
{...}.ethnicityStringMost likely ethnicity of the receiver.Ethnicities or diasporas
{...}.liftedBooleanIndicates if the output ethnicity is based on machine learning only, or further lifted as a known fact by a country-specific rule.
{...}.countryIso2StringSubmitted country of origin of the receiver, in ISO 3166-1 alpha-2 format.Country of residence
{...}.ethnicitiesTopArrayTop 10 most likely ethnicities of the receiver, ordered from most likely to least likely.Ethnicities or diasporas

Code sample:

Names Corridor code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/corridorBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"corridorFromTo":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstLastNameGeoFrom":{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Ada","lastName":"Lovelace","countryIso2":"GB"},"firstLastNameGeoTo":{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Nicolas","lastName":"Tesla","countryIso2":"US"}}]}'

Body parameter:

{
  "corridorFromTo": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstLastNameGeoFrom": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryIso2": "GB"
      },
      "firstLastNameGeoTo": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryIso2": "US"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "corridorFromTo": [
        {
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstLastNameGeoFromGender": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "likelyGender": "female",
                "genderScale": 0.9667738179638148,
                "score": 20.98847600479561,
                "probabilityCalibrated": 0.9833869089819074
            },
            "firstLastNameGeoToGender": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "likelyGender": "male",
                "genderScale": -0.9915797101926913,
                "score": 30.224379416275056,
                "probabilityCalibrated": 0.9957898550963457
            },
            "firstLastNameGeoFromOrigin": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "countryOrigin": "IE",
                "countryOriginAlt": "GB",
                "countriesOriginTop": ["IE", "GB"],
                "score": 2.568304424015469,
                "regionOrigin": "Europe",
                "topRegionOrigin": "Europe",
                "subRegionOrigin": "Northern Europe",
                "probabilityCalibrated": 0.45562779224760414,
                "probabilityAltCalibrated": 0.6327518248452595
            },
            "firstLastNameGeoToOrigin": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "countryOrigin": "FR",
                "countryOriginAlt": "GR",
                "countriesOriginTop": ["FR", "GR"],
                "score": 1.454789764445522,
                "regionOrigin": "Europe",
                "topRegionOrigin": "Europe",
                "subRegionOrigin": "Western Europe",
                "probabilityCalibrated": 0.44774495967210787,
                "probabilityAltCalibrated": 0.4771001024099368
            },
            "firstLastNameGeoFromDiaspora": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "score": 32.41686703300403,
                "ethnicityAlt": "TrinidadTobago",
                "ethnicity": "British",
                "lifted": false,
                "countryIso2": "GB",
                "ethnicitiesTop": ["British", "TrinidadTobago"]
            },
            "firstLastNameGeoToDiaspora": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "score": 1.1421954239282939,
                "ethnicityAlt": "Jewish",
                "ethnicity": "Italian",
                "lifted": false,
                "countryIso2": "US",
                "ethnicitiesTop": ["Italian", "Jewish"]
            }
        }
    ]
}

Names Corridor code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/corridorBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"corridorFromTo\":[{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"firstLastNameGeoFrom\":{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"firstName\":\"Ada\",\"lastName\":\"Lovelace\",\"countryIso2\":\"GB\"},\"firstLastNameGeoTo\":{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"firstName\":\"Nicolas\",\"lastName\":\"Tesla\",\"countryIso2\":\"US\"}}]}")
.asString();

Body parameter:

{
  "corridorFromTo": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstLastNameGeoFrom": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryIso2": "GB"
      },
      "firstLastNameGeoTo": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryIso2": "US"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "corridorFromTo": [
        {
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstLastNameGeoFromGender": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "likelyGender": "female",
                "genderScale": 0.9667738179638148,
                "score": 20.98847600479561,
                "probabilityCalibrated": 0.9833869089819074
            },
            "firstLastNameGeoToGender": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "likelyGender": "male",
                "genderScale": -0.9915797101926913,
                "score": 30.224379416275056,
                "probabilityCalibrated": 0.9957898550963457
            },
            "firstLastNameGeoFromOrigin": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "countryOrigin": "IE",
                "countryOriginAlt": "GB",
                "countriesOriginTop": ["IE", "GB"],
                "score": 2.568304424015469,
                "regionOrigin": "Europe",
                "topRegionOrigin": "Europe",
                "subRegionOrigin": "Northern Europe",
                "probabilityCalibrated": 0.45562779224760414,
                "probabilityAltCalibrated": 0.6327518248452595
            },
            "firstLastNameGeoToOrigin": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "countryOrigin": "FR",
                "countryOriginAlt": "GR",
                "countriesOriginTop": ["FR", "GR"],
                "score": 1.454789764445522,
                "regionOrigin": "Europe",
                "topRegionOrigin": "Europe",
                "subRegionOrigin": "Western Europe",
                "probabilityCalibrated": 0.44774495967210787,
                "probabilityAltCalibrated": 0.4771001024099368
            },
            "firstLastNameGeoFromDiaspora": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "score": 32.41686703300403,
                "ethnicityAlt": "TrinidadTobago",
                "ethnicity": "British",
                "lifted": false,
                "countryIso2": "GB",
                "ethnicitiesTop": ["British", "TrinidadTobago"]
            },
            "firstLastNameGeoToDiaspora": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "score": 1.1421954239282939,
                "ethnicityAlt": "Jewish",
                "ethnicity": "Italian",
                "lifted": false,
                "countryIso2": "US",
                "ethnicitiesTop": ["Italian", "Jewish"]
            }
        }
    ]
}

Names Corridor code sample for python:

import requests

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

payload = {
  "corridorFromTo": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstLastNameGeoFrom": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryIso2": "GB"
      },
      "firstLastNameGeoTo": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryIso2": "US"
      }
    }
  ]
}
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:

{
  "corridorFromTo": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstLastNameGeoFrom": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryIso2": "GB"
      },
      "firstLastNameGeoTo": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryIso2": "US"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "corridorFromTo": [
        {
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstLastNameGeoFromGender": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "likelyGender": "female",
                "genderScale": 0.9667738179638148,
                "score": 20.98847600479561,
                "probabilityCalibrated": 0.9833869089819074
            },
            "firstLastNameGeoToGender": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "likelyGender": "male",
                "genderScale": -0.9915797101926913,
                "score": 30.224379416275056,
                "probabilityCalibrated": 0.9957898550963457
            },
            "firstLastNameGeoFromOrigin": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "countryOrigin": "IE",
                "countryOriginAlt": "GB",
                "countriesOriginTop": ["IE", "GB"],
                "score": 2.568304424015469,
                "regionOrigin": "Europe",
                "topRegionOrigin": "Europe",
                "subRegionOrigin": "Northern Europe",
                "probabilityCalibrated": 0.45562779224760414,
                "probabilityAltCalibrated": 0.6327518248452595
            },
            "firstLastNameGeoToOrigin": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "countryOrigin": "FR",
                "countryOriginAlt": "GR",
                "countriesOriginTop": ["FR", "GR"],
                "score": 1.454789764445522,
                "regionOrigin": "Europe",
                "topRegionOrigin": "Europe",
                "subRegionOrigin": "Western Europe",
                "probabilityCalibrated": 0.44774495967210787,
                "probabilityAltCalibrated": 0.4771001024099368
            },
            "firstLastNameGeoFromDiaspora": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "score": 32.41686703300403,
                "ethnicityAlt": "TrinidadTobago",
                "ethnicity": "British",
                "lifted": false,
                "countryIso2": "GB",
                "ethnicitiesTop": ["British", "TrinidadTobago"]
            },
            "firstLastNameGeoToDiaspora": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "score": 1.1421954239282939,
                "ethnicityAlt": "Jewish",
                "ethnicity": "Italian",
                "lifted": false,
                "countryIso2": "US",
                "ethnicitiesTop": ["Italian", "Jewish"]
            }
        }
    ]
}

Names Corridor code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/corridorBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "corridorFromTo": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstLastNameGeoFrom": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryIso2": "GB"
      },
      "firstLastNameGeoTo": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryIso2": "US"
      }
    }
  ]
})
});

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:

{
  "corridorFromTo": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstLastNameGeoFrom": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryIso2": "GB"
      },
      "firstLastNameGeoTo": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryIso2": "US"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "corridorFromTo": [
        {
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstLastNameGeoFromGender": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "likelyGender": "female",
                "genderScale": 0.9667738179638148,
                "score": 20.98847600479561,
                "probabilityCalibrated": 0.9833869089819074
            },
            "firstLastNameGeoToGender": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "likelyGender": "male",
                "genderScale": -0.9915797101926913,
                "score": 30.224379416275056,
                "probabilityCalibrated": 0.9957898550963457
            },
            "firstLastNameGeoFromOrigin": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "countryOrigin": "IE",
                "countryOriginAlt": "GB",
                "countriesOriginTop": ["IE", "GB"],
                "score": 2.568304424015469,
                "regionOrigin": "Europe",
                "topRegionOrigin": "Europe",
                "subRegionOrigin": "Northern Europe",
                "probabilityCalibrated": 0.45562779224760414,
                "probabilityAltCalibrated": 0.6327518248452595
            },
            "firstLastNameGeoToOrigin": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "countryOrigin": "FR",
                "countryOriginAlt": "GR",
                "countriesOriginTop": ["FR", "GR"],
                "score": 1.454789764445522,
                "regionOrigin": "Europe",
                "topRegionOrigin": "Europe",
                "subRegionOrigin": "Western Europe",
                "probabilityCalibrated": 0.44774495967210787,
                "probabilityAltCalibrated": 0.4771001024099368
            },
            "firstLastNameGeoFromDiaspora": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "score": 32.41686703300403,
                "ethnicityAlt": "TrinidadTobago",
                "ethnicity": "British",
                "lifted": false,
                "countryIso2": "GB",
                "ethnicitiesTop": ["British", "TrinidadTobago"]
            },
            "firstLastNameGeoToDiaspora": {
                "script": "LATIN",
                "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
                "firstName": "Nicolas",
                "lastName": "Tesla",
                "score": 1.1421954239282939,
                "ethnicityAlt": "Jewish",
                "ethnicity": "Italian",
                "lifted": false,
                "countryIso2": "US",
                "ethnicitiesTop": ["Italian", "Jewish"]
            }
        }
    ]
}
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.

  • Description: Returns complete analysis of a cross border interactions between two names using their geographic context. The sender is the one who initiated the interaction (from) while the receiver is the one intended to receive the interaction (to).
  • Cost: 50 credits per name.
  • Test: Names Corridor feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/corridor/{countryIso2}/{firstName}/{lastName}/{countryIso2}/{firstName}/{lastName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
countryIso2StringRequiredCountry of origin of the sender, in ISO 3166-1 alpha-2 format.
firstNameStringRequiredFirst name (or given name) of the sender.
lastNameStringRequiredLast name (or family name) of the sender.
countryIso2StringRequiredCountry of origin of the receiver, in ISO 3166-1 alpha-2 format.
firstNameStringRequiredFirst name (or given name) of the receiver.
lastNameStringRequiredLast name (or family name) of the receiver.
Response
NameTypeDescriptionEnumerators
idStringUnique identifier.
firstLastNameGeoFromGenderObjectGender data for the sender name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the sender.
{...}.lastNameStringSubmitted last name (or family name) of the sender.
{...}.likelyGenderStringMost likely gender.Genders
{...}.genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.
firstLastNameGeoToGenderObjectGender data for the receiver name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the receiver.
{...}.lastNameStringSubmitted last name (or family name) of the receiver.
{...}.likelyGenderStringMost likely gender.Genders
{...}.genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.
firstLastNameGeoFromOriginObjectOrigin data for the sender name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the sender.
{...}.lastNameStringSubmitted last name (or family name) of the sender.
{...}.countryOriginStringMost likely country of origin of the sender, in ISO 3166-1 alpha-2 format.Country of origin
{...}.countryOriginAltStringSecond most likely country of origin of the sender, in ISO 3166-1 alpha-2 format.Country of origin
{...}.countriesOriginTopArrayTop 10 most likely countries of origin of the sender, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.Country of origin
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.regionOriginStringMost likely region of origin of the sender.Regions of origin or residence
{...}.topRegionOriginStringMost likely region of origin of the sender (alternative classification).Regions of origin or residence
{...}.subRegionOriginStringMost likely sub-region of origin of the sender.Sub regions of origin or residence
{...}.probabilityCalibratedNumberThe calibrated probability for countryOrigin to have been guessed correctly. -1 = still calibrating.
{...}.probabilityAltCalibratedNumberThe calibrated probability for countryOrigin OR countryOriginAlt to have been guessed correctly. -1 = still calibrating.
firstLastNameGeoToOriginObjectOrigin data for the receiver name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the receiver.
{...}.lastNameStringSubmitted last name (or family name) of the receiver.
{...}.countryOriginStringMost likely country of origin of the receiver, in ISO 3166-1 alpha-2 format.Country of origin
{...}.countryOriginAltStringSecond most likely country of origin of the receiver, in ISO 3166-1 alpha-2 format.Country of origin
{...}.countriesOriginTopArrayTop 10 most likely countries of origin of the receiver, in ISO 3166-1 alpha-2 format, sorted from most likely to least likely.Country of origin
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.regionOriginStringMost likely region of origin.Regions of origin or residence
{...}.topRegionOriginStringMost likely region of origin of the receiver (alternative classification).Regions of origin or residence
{...}.subRegionOriginStringMost likely sub-region of origin of the receiver.Sub regions of origin or residence
{...}.probabilityCalibratedNumberThe calibrated probability for countryOrigin to have been guessed correctly. -1 = still calibrating.
{...}.probabilityAltCalibratedNumberThe calibrated probability for countryOrigin OR countryOriginAlt to have been guessed correctly. -1 = still calibrating.
firstLastNameGeoFromDiasporaObjectDiaspora data for the sender name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the sender.
{...}.lastNameStringSubmitted last name (or family name) of the sender.
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.ethnicityAltStringSecond most likely ethnicity of the sender.Ethnicities or diasporas
{...}.ethnicityStringMost likely ethnicity of the sender.Ethnicities or diasporas
{...}.liftedBooleanIndicates if the output ethnicity is based on machine learning only, or further lifted as a known fact by a country-specific rule.
{...}.countryIso2StringSubmitted country of origin of the sender, in ISO 3166-1 alpha-2 format.Country of residence
{...}.ethnicitiesTopArrayTop 10 most likely ethnicities of the sender, ordered from most likely to least likely.Ethnicities or diasporas
firstLastNameGeoToDiasporaObjectDiaspora data for the receiver name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringUnique identifier.
{...}.firstNameStringSubmitted first name (or given name) of the receiver.
{...}.lastNameStringSubmitted last name (or family name) of the receiver.
{...}.scoreNumberHigher implies a more reliable result, but score is not normalized. Use probabilityCalibrated if available.
{...}.ethnicityAltStringSecond most likely ethnicity of the receiver.Ethnicities or diasporas
{...}.ethnicityStringMost likely ethnicity of the receiver.Ethnicities or diasporas
{...}.liftedBooleanIndicates if the output ethnicity is based on machine learning only, or further lifted as a known fact by a country-specific rule.
{...}.countryIso2StringSubmitted country of origin of the receiver, in ISO 3166-1 alpha-2 format.Country of residence
{...}.ethnicitiesTopArrayTop 10 most likely ethnicities of the receiver, ordered from most likely to least likely.Ethnicities or diasporas

Code sample:

Names Corridor code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/corridor/GB/Ada/Lovelace/US/Nicolas/Tesla \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "id": null,
    "firstLastNameGeoFromGender": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "likelyGender": "female",
        "genderScale": 0.9667738179638148,
        "score": 20.98847600479561,
        "probabilityCalibrated": 0.9833869089819074
    },
    "firstLastNameGeoToGender": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "likelyGender": "male",
        "genderScale": -0.9915797101926913,
        "score": 30.224379416275056,
        "probabilityCalibrated": 0.9957898550963457
    },
    "firstLastNameGeoFromOrigin": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryOrigin": "IE",
        "countryOriginAlt": "GB",
        "countriesOriginTop": ["IE", "GB"],
        "score": 2.568304424015469,
        "regionOrigin": "Europe",
        "topRegionOrigin": "Europe",
        "subRegionOrigin": "Northern Europe",
        "probabilityCalibrated": 0.45562779224760414,
        "probabilityAltCalibrated": 0.6327518248452595
    },
    "firstLastNameGeoToOrigin": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryOrigin": "FR",
        "countryOriginAlt": "GR",
        "countriesOriginTop": ["FR", "GR"],
        "score": 1.454789764445522,
        "regionOrigin": "Europe",
        "topRegionOrigin": "Europe",
        "subRegionOrigin": "Western Europe",
        "probabilityCalibrated": 0.44774495967210787,
        "probabilityAltCalibrated": 0.4771001024099368
    },
    "firstLastNameGeoFromDiaspora": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "score": 32.41666571408284,
        "ethnicityAlt": "TrinidadTobago",
        "ethnicity": "British",
        "lifted": false,
        "countryIso2": "GB",
        "ethnicitiesTop": ["British", "TrinidadTobago"]
    },
    "firstLastNameGeoToDiaspora": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "score": 1.1421870006029051,
        "ethnicityAlt": "Jewish",
        "ethnicity": "Italian",
        "lifted": false,
        "countryIso2": "US",
        "ethnicitiesTop": ["Italian", "Jewish"]
    }
}

Names Corridor code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/corridor/GB/Ada/Lovelace/US/Nicolas/Tesla")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "id": null,
    "firstLastNameGeoFromGender": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "likelyGender": "female",
        "genderScale": 0.9667738179638148,
        "score": 20.98847600479561,
        "probabilityCalibrated": 0.9833869089819074
    },
    "firstLastNameGeoToGender": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "likelyGender": "male",
        "genderScale": -0.9915797101926913,
        "score": 30.224379416275056,
        "probabilityCalibrated": 0.9957898550963457
    },
    "firstLastNameGeoFromOrigin": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryOrigin": "IE",
        "countryOriginAlt": "GB",
        "countriesOriginTop": ["IE", "GB"],
        "score": 2.568304424015469,
        "regionOrigin": "Europe",
        "topRegionOrigin": "Europe",
        "subRegionOrigin": "Northern Europe",
        "probabilityCalibrated": 0.45562779224760414,
        "probabilityAltCalibrated": 0.6327518248452595
    },
    "firstLastNameGeoToOrigin": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryOrigin": "FR",
        "countryOriginAlt": "GR",
        "countriesOriginTop": ["FR", "GR"],
        "score": 1.454789764445522,
        "regionOrigin": "Europe",
        "topRegionOrigin": "Europe",
        "subRegionOrigin": "Western Europe",
        "probabilityCalibrated": 0.44774495967210787,
        "probabilityAltCalibrated": 0.4771001024099368
    },
    "firstLastNameGeoFromDiaspora": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "score": 32.41666571408284,
        "ethnicityAlt": "TrinidadTobago",
        "ethnicity": "British",
        "lifted": false,
        "countryIso2": "GB",
        "ethnicitiesTop": ["British", "TrinidadTobago"]
    },
    "firstLastNameGeoToDiaspora": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "score": 1.1421870006029051,
        "ethnicityAlt": "Jewish",
        "ethnicity": "Italian",
        "lifted": false,
        "countryIso2": "US",
        "ethnicitiesTop": ["Italian", "Jewish"]
    }
}

Names Corridor code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/corridor/GB/Ada/Lovelace/US/Nicolas/Tesla"

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:

{
    "id": null,
    "firstLastNameGeoFromGender": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "likelyGender": "female",
        "genderScale": 0.9667738179638148,
        "score": 20.98847600479561,
        "probabilityCalibrated": 0.9833869089819074
    },
    "firstLastNameGeoToGender": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "likelyGender": "male",
        "genderScale": -0.9915797101926913,
        "score": 30.224379416275056,
        "probabilityCalibrated": 0.9957898550963457
    },
    "firstLastNameGeoFromOrigin": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryOrigin": "IE",
        "countryOriginAlt": "GB",
        "countriesOriginTop": ["IE", "GB"],
        "score": 2.568304424015469,
        "regionOrigin": "Europe",
        "topRegionOrigin": "Europe",
        "subRegionOrigin": "Northern Europe",
        "probabilityCalibrated": 0.45562779224760414,
        "probabilityAltCalibrated": 0.6327518248452595
    },
    "firstLastNameGeoToOrigin": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryOrigin": "FR",
        "countryOriginAlt": "GR",
        "countriesOriginTop": ["FR", "GR"],
        "score": 1.454789764445522,
        "regionOrigin": "Europe",
        "topRegionOrigin": "Europe",
        "subRegionOrigin": "Western Europe",
        "probabilityCalibrated": 0.44774495967210787,
        "probabilityAltCalibrated": 0.4771001024099368
    },
    "firstLastNameGeoFromDiaspora": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "score": 32.41666571408284,
        "ethnicityAlt": "TrinidadTobago",
        "ethnicity": "British",
        "lifted": false,
        "countryIso2": "GB",
        "ethnicitiesTop": ["British", "TrinidadTobago"]
    },
    "firstLastNameGeoToDiaspora": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "score": 1.1421870006029051,
        "ethnicityAlt": "Jewish",
        "ethnicity": "Italian",
        "lifted": false,
        "countryIso2": "US",
        "ethnicitiesTop": ["Italian", "Jewish"]
    }
}

Names Corridor code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/corridor/GB/Ada/Lovelace/US/Nicolas/Tesla", {
  "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:

{
    "id": null,
    "firstLastNameGeoFromGender": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "likelyGender": "female",
        "genderScale": 0.9667738179638148,
        "score": 20.98847600479561,
        "probabilityCalibrated": 0.9833869089819074
    },
    "firstLastNameGeoToGender": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "likelyGender": "male",
        "genderScale": -0.9915797101926913,
        "score": 30.224379416275056,
        "probabilityCalibrated": 0.9957898550963457
    },
    "firstLastNameGeoFromOrigin": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "countryOrigin": "IE",
        "countryOriginAlt": "GB",
        "countriesOriginTop": ["IE", "GB"],
        "score": 2.568304424015469,
        "regionOrigin": "Europe",
        "topRegionOrigin": "Europe",
        "subRegionOrigin": "Northern Europe",
        "probabilityCalibrated": 0.45562779224760414,
        "probabilityAltCalibrated": 0.6327518248452595
    },
    "firstLastNameGeoToOrigin": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "countryOrigin": "FR",
        "countryOriginAlt": "GR",
        "countriesOriginTop": ["FR", "GR"],
        "score": 1.454789764445522,
        "regionOrigin": "Europe",
        "topRegionOrigin": "Europe",
        "subRegionOrigin": "Western Europe",
        "probabilityCalibrated": 0.44774495967210787,
        "probabilityAltCalibrated": 0.4771001024099368
    },
    "firstLastNameGeoFromDiaspora": {
        "script": "LATIN",
        "id": "781cc5e4-aa61-4a04-bd14-4b512120817a",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "score": 32.41666571408284,
        "ethnicityAlt": "TrinidadTobago",
        "ethnicity": "British",
        "lifted": false,
        "countryIso2": "GB",
        "ethnicitiesTop": ["British", "TrinidadTobago"]
    },
    "firstLastNameGeoToDiaspora": {
        "script": "LATIN",
        "id": "d5d87a0f-8d21-4cf6-98a2-2636a669ddd6",
        "firstName": "Nicolas",
        "lastName": "Tesla",
        "score": 1.1421870006029051,
        "ethnicityAlt": "Jewish",
        "ethnicity": "Italian",
        "lifted": false,
        "countryIso2": "US",
        "ethnicitiesTop": ["Italian", "Jewish"]
    }
}

Gender from names

Namsor's name checking API can help you determine the probability of a person being male or female based on their name. We offer many processing options for gender determination, the name can either be provided: as a full name, as a first name and a last name. In addition to the name you may specify the country of origin to improve accuracy. Our API also supports Chinese names, Japanese names and a large number of additional alphabets*.

Genderize Name

Genderize Name feature analyzes a first name and a last name (optional) to identify its most likely gender with slightly improved accuracy than the Genderize Full Name feature. Adding a first and last name increases the accuracy of the determined gender.
The feature returns the most likely gender accompanied by a calibrated probability. If the probability of the returned gender is between 45% and 55%, the name can be interpreted as a unisex name.

  • Description: Returns the most likely gender of up to 100 first names and last names (optional).
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/genderBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringRequiredFirst name, given name, nickname.
[{...}].lastNameStringOptionalLast name, family name, surname.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names genderized.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name.
[{...}].lastNameStringSubmitted last name.
[{...}].likelyGenderStringMost likely gender.Genders
[{...}].genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"b590b04c-da23-4f2f-a334-aee384ee420a","firstName":"Keith","lastName":"Haring"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
            "firstName": "Keith",
            "lastName": "Haring",
            "likelyGender": "male",
            "genderScale": -0.8126510374561324,
            "score": 12.516892456249645,
            "probabilityCalibrated": 0.9063255187280662
        }
    ]
}

Genderize Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/genderBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"b590b04c-da23-4f2f-a334-aee384ee420a\",\"firstName\":\"Keith\",\"lastName\":\"Haring\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
            "firstName": "Keith",
            "lastName": "Haring",
            "likelyGender": "male",
            "genderScale": -0.8126510374561324,
            "score": 12.516892456249645,
            "probabilityCalibrated": 0.9063255187280662
        }
    ]
}

Genderize Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}
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": "b590b04c-da23-4f2f-a334-aee384ee420a",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
            "firstName": "Keith",
            "lastName": "Haring",
            "likelyGender": "male",
            "genderScale": -0.8126510374561324,
            "score": 12.516892456249645,
            "probabilityCalibrated": 0.9063255187280662
        }
    ]
}

Genderize Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
})
});

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": "b590b04c-da23-4f2f-a334-aee384ee420a",
      "firstName": "Keith",
      "lastName": "Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
            "firstName": "Keith",
            "lastName": "Haring",
            "likelyGender": "male",
            "genderScale": -0.8126510374561324,
            "score": 12.516892456249645,
            "probabilityCalibrated": 0.9063255187280662
        }
    ]
}
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.

  • Description: Returns the most likely gender of a first name and a last name.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/gender/{firstName}/{lastName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
firstNameStringRequiredFirst name, given name, nickname.
lastNameStringRequiredLast name, family name, surname.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted first name.
lastNameStringSubmitted last name.
likelyGenderStringMost likely gender.Genders
genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/gender/Keith/Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
    "firstName": "Keith",
    "lastName": "Haring",
    "likelyGender": "male",
    "genderScale": -0.8126510374561324,
    "score": 12.516892456249645,
    "probabilityCalibrated": 0.9063255187280662
}

Genderize Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/gender/Keith/Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "b590b04c-da23-4f2f-a334-aee384ee420a",
    "firstName": "Keith",
    "lastName": "Haring",
    "likelyGender": "male",
    "genderScale": -0.8126510374561324,
    "score": 12.516892456249645,
    "probabilityCalibrated": 0.9063255187280662
}

Genderize Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/gender/Keith/Haring"

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": "b590b04c-da23-4f2f-a334-aee384ee420a",
    "firstName": "Keith",
    "lastName": "Haring",
    "likelyGender": "male",
    "genderScale": -0.8126510374561324,
    "score": 12.516892456249645,
    "probabilityCalibrated": 0.9063255187280662
}

Genderize Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/gender/Keith/Haring", {
  "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": "b590b04c-da23-4f2f-a334-aee384ee420a",
    "firstName": "Keith",
    "lastName": "Haring",
    "likelyGender": "male",
    "genderScale": -0.8126510374561324,
    "score": 12.516892456249645,
    "probabilityCalibrated": 0.9063255187280662
}

Genderize Name Geo

Genderize Name Geo feature analyzes a first name and a last name (optional) based on a country of residence to identify its most likely gender with improved accuracy than the basic feature Genderize Name. Adding a first and last name increases the accuracy of the determined gender.
The feature returns the most likely gender accompanied by a calibrated probability. If the probability of the returned gender is between 45% and 55%, the name can be interpreted as a unisex name.

  • Description: Returns the most likely gender of up to 100 first names and last names (optional) using their geographic context.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Name Geo feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/genderGeoBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names with their country of residence.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringRequiredFirst name, given name, nickname.
[{...}].lastNameStringOptionalLast name, family name, surname.
[{...}].countryIso2StringRequiredMost likely country of residence, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names genderized.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name.
[{...}].lastNameStringSubmitted last name.
[{...}].likelyGenderStringMost likely gender.Genders
[{...}].genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Name Geo code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderGeoBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"27fb45db-eddf-40d0-95c1-de9978a166b0","firstName":"Keith","lastName":"Haring","countryIso2":"US"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
            "firstName": "Keith",
            "lastName": "Haring",
            "likelyGender": "male",
            "genderScale": -0.8889514731555574,
            "score": 16.03594419932244,
            "probabilityCalibrated": 0.9444757365777787
        }
    ]
}

Genderize Name Geo code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/genderGeoBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"27fb45db-eddf-40d0-95c1-de9978a166b0\",\"firstName\":\"Keith\",\"lastName\":\"Haring\",\"countryIso2\":\"US\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
            "firstName": "Keith",
            "lastName": "Haring",
            "likelyGender": "male",
            "genderScale": -0.8889514731555574,
            "score": 16.03594419932244,
            "probabilityCalibrated": 0.9444757365777787
        }
    ]
}

Genderize Name Geo code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}
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": "27fb45db-eddf-40d0-95c1-de9978a166b0",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
            "firstName": "Keith",
            "lastName": "Haring",
            "likelyGender": "male",
            "genderScale": -0.8889514731555574,
            "score": 16.03594419932244,
            "probabilityCalibrated": 0.9444757365777787
        }
    ]
}

Genderize Name Geo code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderGeoBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
})
});

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": "27fb45db-eddf-40d0-95c1-de9978a166b0",
      "firstName": "Keith",
      "lastName": "Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
            "firstName": "Keith",
            "lastName": "Haring",
            "likelyGender": "male",
            "genderScale": -0.8889514731555574,
            "score": 16.03594419932244,
            "probabilityCalibrated": 0.9444757365777787
        }
    ]
}
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.

  • Description: Returns the most likely gender of a first name and a last name using its geographic context.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Name Geo feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/genderGeo/{firstName}/{lastName}/{countryIso2}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
firstNameStringRequiredFirst name, given name, nickname.
lastNameStringRequiredLast name, family name, surname.
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
idStringUnique identifier.
firstNameStringSubmitted first name.
lastNameStringSubmitted last name.
likelyGenderStringMost likely gender.Genders
genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Name Geo code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderGeo/Keith/Haring/US \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
    "firstName": "Keith",
    "lastName": "Haring",
    "likelyGender": "male",
    "genderScale": -0.8889514731555574,
    "score": 16.03594419932244,
    "probabilityCalibrated": 0.9444757365777787
}

Genderize Name Geo code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/genderGeo/Keith/Haring/US")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "27fb45db-eddf-40d0-95c1-de9978a166b0",
    "firstName": "Keith",
    "lastName": "Haring",
    "likelyGender": "male",
    "genderScale": -0.8889514731555574,
    "score": 16.03594419932244,
    "probabilityCalibrated": 0.9444757365777787
}

Genderize Name Geo code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/genderGeo/Keith/Haring/US"

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": "27fb45db-eddf-40d0-95c1-de9978a166b0",
    "firstName": "Keith",
    "lastName": "Haring",
    "likelyGender": "male",
    "genderScale": -0.8889514731555574,
    "score": 16.03594419932244,
    "probabilityCalibrated": 0.9444757365777787
}

Genderize Name Geo code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderGeo/Keith/Haring/US", {
  "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": "27fb45db-eddf-40d0-95c1-de9978a166b0",
    "firstName": "Keith",
    "lastName": "Haring",
    "likelyGender": "male",
    "genderScale": -0.8889514731555574,
    "score": 16.03594419932244,
    "probabilityCalibrated": 0.9444757365777787
}

Genderize Full Name

Genderize Full Name feature analyzes an unsplit full name (first name and last name) to identify its most likely gender.
The feature returns the most likely gender accompanied by a calibrated probability. If the probability of the returned gender is between 45% and 55%, the name can be interpreted as a unisex name.

information

If the first and last name are clearly identifiable, the Genderize Name feature will be slightly more accurate.

  • Description: Returns the most likely gender of up to 100 unsplit full names.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Full Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal full names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted full names genderized.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].likelyGenderStringMost likely gender.Genders
[{...}].genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Full Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"0f472330-11a9-49ad-a0f5-bcac90a3f6bf","name":"Keith Haring"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
            "name": "Keith Haring",
            "likelyGender": "male",
            "genderScale": -0.8744219712791637,
            "score": 11.2727995452283,
            "probabilityCalibrated": 0.9372109856395818
        }
    ]
}

Genderize Full Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"0f472330-11a9-49ad-a0f5-bcac90a3f6bf\",\"name\":\"Keith Haring\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
            "name": "Keith Haring",
            "likelyGender": "male",
            "genderScale": -0.8744219712791637,
            "score": 11.2727995452283,
            "probabilityCalibrated": 0.9372109856395818
        }
    ]
}

Genderize Full Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
      "name": "Keith Haring"
    }
  ]
}
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": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
            "name": "Keith Haring",
            "likelyGender": "male",
            "genderScale": -0.8744219712791637,
            "score": 11.2727995452283,
            "probabilityCalibrated": 0.9372109856395818
        }
    ]
}

Genderize Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
      "name": "Keith Haring"
    }
  ]
})
});

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": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
      "name": "Keith Haring"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
            "name": "Keith Haring",
            "likelyGender": "male",
            "genderScale": -0.8744219712791637,
            "score": 11.2727995452283,
            "probabilityCalibrated": 0.9372109856395818
        }
    ]
}
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.

  • Description: Returns the most likely gender of an unsplit full name.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Full Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/genderFull/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
nameStringSubmitted full name.
likelyGenderStringMost likely gender.Genders
genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Full Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderFull/Keith%20Haring \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
    "name": "Keith Haring",
    "likelyGender": "male",
    "genderScale": -0.8744219712791637,
    "score": 11.2727995452283,
    "probabilityCalibrated": 0.9372109856395818
}

Genderize Full Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/genderFull/Keith%20Haring")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
    "name": "Keith Haring",
    "likelyGender": "male",
    "genderScale": -0.8744219712791637,
    "score": 11.2727995452283,
    "probabilityCalibrated": 0.9372109856395818
}

Genderize Full Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/genderFull/Keith%20Haring"

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": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
    "name": "Keith Haring",
    "likelyGender": "male",
    "genderScale": -0.8744219712791637,
    "score": 11.2727995452283,
    "probabilityCalibrated": 0.9372109856395818
}

Genderize Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderFull/Keith%20Haring", {
  "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": "0f472330-11a9-49ad-a0f5-bcac90a3f6bf",
    "name": "Keith Haring",
    "likelyGender": "male",
    "genderScale": -0.8744219712791637,
    "score": 11.2727995452283,
    "probabilityCalibrated": 0.9372109856395818
}

Genderize Full Name Geo

Genderize Full Name Geo feature analyzes an unsplit full name (first name and last name) based on a country of residence, to identify its most likely gender with improved accuracy than the basic feature Genderize Full Name. The feature returns most likely gender accompanied by a calibrated probability. If the probability of the returned gender is between 45% and 55%, the name can be interpreted as a unisex name.

information

If the first and last name are clearly identifiable, the Genderize Name Geo feature will be slightly more accurate.

  • Description: Returns the most likely gender of up to 100 unsplit full names, according to their geographic context.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Full Name Geo feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullGeoBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal full names with their country of residence.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredUnsplit full name (first name and last name).
[{...}].countryIso2StringRequiredCountry of residence, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted full names genderized.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].likelyGenderStringMost likely gender.Genders
[{...}].genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Full Name Geo code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullGeoBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f","name":"Keith Haring","countryIso2":"US"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
            "name": "Keith Haring",
            "likelyGender": "male",
            "genderScale": -0.8716298606148474,
            "score": 11.225679376737641,
            "probabilityCalibrated": 0.9358149303074237
        }
    ]
}

Genderize Full Name Geo code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullGeoBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f\",\"name\":\"Keith Haring\",\"countryIso2\":\"US\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
            "name": "Keith Haring",
            "likelyGender": "male",
            "genderScale": -0.8716298606148474,
            "score": 11.225679376737641,
            "probabilityCalibrated": 0.9358149303074237
        }
    ]
}

Genderize Full Name Geo code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}
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": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
            "name": "Keith Haring",
            "likelyGender": "male",
            "genderScale": -0.8716298606148474,
            "score": 11.225679376737641,
            "probabilityCalibrated": 0.9358149303074237
        }
    ]
}

Genderize Full Name Geo code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullGeoBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNames": [
    {
      "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
})
});

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": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
      "name": "Keith Haring",
      "countryIso2": "US"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
            "name": "Keith Haring",
            "likelyGender": "male",
            "genderScale": -0.8716298606148474,
            "score": 11.225679376737641,
            "probabilityCalibrated": 0.9358149303074237
        }
    ]
}
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.

  • Description: Returns the most likely gender of an unsplit full name, according to its geographic context.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Full Name Geo feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullGeo/{name}/{countryIso2}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit full name (first name and last name).
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
idStringUnique identifier.
nameStringSubmitted full name.
likelyGenderStringMost likely gender.Genders
genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Full Name Geo code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullGeo/Keith%20Haring/US \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
    "name": "Keith Haring",
    "likelyGender": "male",
    "genderScale": -0.8716298606148474,
    "score": 11.225679376737641,
    "probabilityCalibrated": 0.9358149303074237
}

Genderize Full Name Geo code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullGeo/Keith%20Haring/US")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
    "name": "Keith Haring",
    "likelyGender": "male",
    "genderScale": -0.8716298606148474,
    "score": 11.225679376737641,
    "probabilityCalibrated": 0.9358149303074237
}

Genderize Full Name Geo code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullGeo/Keith%20Haring/US"

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": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
    "name": "Keith Haring",
    "likelyGender": "male",
    "genderScale": -0.8716298606148474,
    "score": 11.225679376737641,
    "probabilityCalibrated": 0.9358149303074237
}

Genderize Full Name Geo code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderFullGeo/Keith%20Haring/US", {
  "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": "3a2d203a-a6a4-42f9-acd1-1b5c56c7d39f",
    "name": "Keith Haring",
    "likelyGender": "male",
    "genderScale": -0.8716298606148474,
    "score": 11.225679376737641,
    "probabilityCalibrated": 0.9358149303074237
}

Name Type Recognition

Namsor provides a specialized proper name type determination API, it is trained to analyse proper names and infer if they are personal names (anthroponym), a geographic name (toponym) or brand names. Differentiate individuals from companies base on their name in order to automate processes, evaluate references to names or leverage deeper insight into an audience. To yield improved results you may indicate the name's country of origin.

Name Type

Name Type feature analyzes a proper noun to determine if it's the name of a person (anthroponym), a geographic name (toponym), an alias of a person (pseudonym) or the name of a brand. We recommend that you submit the entire name (full name) if applicable.

  • 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.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Name Type feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
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":"Zippo"}]}'

Body parameter:

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

The above command returns JSON structured like this:

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

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\":\"Zippo\"}]}")
.asString();

Body parameter:

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

The above command returns JSON structured like this:

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

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": "Zippo"
    }
  ]
}
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": "Zippo"
    }
  ]
}

The above command returns JSON structured like this:

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

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": "Zippo"
    }
  ]
})
});

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": "Zippo"
    }
  ]
}

The above command returns JSON structured like this:

{
    "properNouns": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Zippo",
            "commonType": "brand-name",
            "commonTypeAlt": "toponym",
            "score": 7.717552576402805
        }
    ]
}
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.

  • Description: Returns the type of a submitted proper noun. Ex: John Smith = personal name, Namsor = brand name, Cherbourg en Cotentin = toponym, Batman = pseudonym.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Name Type feature.

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
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/Zippo \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "a88b1bf1-56f1-40d3-84db-4daf57121b1d",
    "name": "Zippo",
    "commonType": "brand-name",
    "commonTypeAlt": "toponym",
    "score": 7.717552234146745
}

Name Type code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/nameType/Zippo")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "a88b1bf1-56f1-40d3-84db-4daf57121b1d",
    "name": "Zippo",
    "commonType": "brand-name",
    "commonTypeAlt": "toponym",
    "score": 7.717552234146745
}

Name Type code sample for python:

import requests

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

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": "a88b1bf1-56f1-40d3-84db-4daf57121b1d",
    "name": "Zippo",
    "commonType": "brand-name",
    "commonTypeAlt": "toponym",
    "score": 7.717552234146745
}

Name Type code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/nameType/Zippo", {
  "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": "a88b1bf1-56f1-40d3-84db-4daf57121b1d",
    "name": "Zippo",
    "commonType": "brand-name",
    "commonTypeAlt": "toponym",
    "score": 7.717552234146745
}

Name Type Geo

Name Type Geo feature analyzes a proper noun based on a local context to determine if it's the name of a person (anthroponym), a geographic name (toponym), an alias of a person (pseudonym) or the name of a brand, with improved accuracy than the basic feature Name Type.

  • 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.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Name Type Geo feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/nameTypeGeoBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
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
        }
    ]
}
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.

  • 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.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Name Type Geo feature.

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
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": "a941ea3f-3b3c-4ff1-af28-c01b086b7d79",
    "name": "Edi Gathegi",
    "commonType": "anthroponym",
    "commonTypeAlt": "brand-name",
    "score": 18.5790039224226
}

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": "a941ea3f-3b3c-4ff1-af28-c01b086b7d79",
    "name": "Edi Gathegi",
    "commonType": "anthroponym",
    "commonTypeAlt": "brand-name",
    "score": 18.5790039224226
}

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": "a941ea3f-3b3c-4ff1-af28-c01b086b7d79",
    "name": "Edi Gathegi",
    "commonType": "anthroponym",
    "commonTypeAlt": "brand-name",
    "score": 18.5790039224226
}

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": "a941ea3f-3b3c-4ff1-af28-c01b086b7d79",
    "name": "Edi Gathegi",
    "commonType": "anthroponym",
    "commonTypeAlt": "brand-name",
    "score": 18.5790039224226
}

Split names

Namsor's software offers a name separation API. We are able to take in a full name, and split it into a first name and last name structure. Our API also supports Chinese names, in Pinyin or Mandarin Chinese, and Japanese names written in Kanji characters.

Split Name

Split Name feature identifies the first name and the last name from an unsplit full name. The Split Name Geo feature helps improve accuracy when splitting the full name by adding a country of residence.

  • Description: Returns the most likely first name and last name structure of up to 100 full names.
  • Cost: 1 credit per name.
  • Test: Split Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of unsplit full names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredFull name (first name and last name).
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names separated into first name and last name structure.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].nameParserTypeStringMost likely structure of the name.Name structures
[{...}].nameParserTypeAltStringSecond most likely structure of the name.Name structures
[{...}].firstLastNameObjectSplit name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringFirst name (or given name).
{...}.lastNameStringLast name (or family name).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

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
        }
    ]
}
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.

  • Description: Returns the most likely first name and last name structure of a full name.
  • Cost: 1 credit per name.
  • Test: Split Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredFull name (first name and last name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
nameStringSubmitted full name.
nameParserTypeStringMost likely structure of the name.Name structures
nameParserTypeAltStringSecond most likely structure of the name.Name structures
firstLastNameObjectSplit name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringFirst name (or given name).
{...}.lastNameStringLast name (or family name).
scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

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": "3fb36d3d-f9cd-4ccc-a348-38d9e5b5232d",
    "name": "John Smith",
    "nameParserType": "FN1LN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "John",
        "lastName": "Smith"
    },
    "score": 23.313692197779005
}

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": "3fb36d3d-f9cd-4ccc-a348-38d9e5b5232d",
    "name": "John Smith",
    "nameParserType": "FN1LN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "John",
        "lastName": "Smith"
    },
    "score": 23.313692197779005
}

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": "3fb36d3d-f9cd-4ccc-a348-38d9e5b5232d",
    "name": "John Smith",
    "nameParserType": "FN1LN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "John",
        "lastName": "Smith"
    },
    "score": 23.313692197779005
}

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": "3fb36d3d-f9cd-4ccc-a348-38d9e5b5232d",
    "name": "John Smith",
    "nameParserType": "FN1LN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "John",
        "lastName": "Smith"
    },
    "score": 23.313692197779005
}

Split Name Geo

Split Name Geo feature processes an unsplit full name with a country of residence to identify the first name and the last name, with improved accuracy than the basic feature Split Name.

  • Description: Returns the most likely first name and last name structure of up to 100 full names using their geographic context.
  • Cost: 1 credit per name.
  • Test: Split Name Geo feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/parseNameGeoBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of unsplit full names with their country of residence.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredFull name (first name and last name).
[{...}].countryIso2StringRequiredMost likely country of origin, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names separated into first name and last name structure.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].nameParserTypeStringMost likely structure of the name.Name structures
[{...}].nameParserTypeAltStringSecond most likely structure of the name.Name structures
[{...}].firstLastNameObjectSplit name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringFirst name (or given name).
{...}.lastNameStringLast name (or family name).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

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
        }
    ]
}
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.

  • Description: Returns the most likely first name and last name structure of a full name using its geographic context.
  • Cost: 1 credit per name.
  • Test: Split Name Geo feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/parseName/{name}/{countryIso2}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredFull name (first name and last name).
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 full name.
nameParserTypeStringMost likely structure of the name.Name structures
nameParserTypeAltStringSecond most likely structure of the name.Name structures
firstLastNameObjectSplit name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringFirst name (or given name).
{...}.lastNameStringLast name (or family name).
scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

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": "dbe186ee-cfd6-48e0-a449-00c70df61ec3",
    "name": "Ricardo Darín",
    "nameParserType": "FN1LN1",
    "nameParserTypeAlt": "FN1LN2",
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "Ricardo",
        "lastName": "Darín"
    },
    "score": 3.4476222927492017
}

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": "dbe186ee-cfd6-48e0-a449-00c70df61ec3",
    "name": "Ricardo Darín",
    "nameParserType": "FN1LN1",
    "nameParserTypeAlt": "FN1LN2",
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "Ricardo",
        "lastName": "Darín"
    },
    "score": 3.4476222927492017
}

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": "dbe186ee-cfd6-48e0-a449-00c70df61ec3",
    "name": "Ricardo Darín",
    "nameParserType": "FN1LN1",
    "nameParserTypeAlt": "FN1LN2",
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "Ricardo",
        "lastName": "Darín"
    },
    "score": 3.4476222927492017
}

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": "dbe186ee-cfd6-48e0-a449-00c70df61ec3",
    "name": "Ricardo Darín",
    "nameParserType": "FN1LN1",
    "nameParserTypeAlt": "FN1LN2",
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "Ricardo",
        "lastName": "Darín"
    },
    "score": 3.4476222927492017
}

Japanese names

Namsor provides a specialized name processing API dedicated to analysing names in the Japanese language. We have developed a name converter, focused on Japanese names, to help you find the best transcriptions possible. With our API, you can convert Japanese names both ways between Kanji and English. You can evaluate the quality of a transcriptions between a name in Kanji and a name in Latin characters. It is also possible to split Japansese full names, in either Kanji or Latin characters, into a first name and a last name as well as establish the gender of a name.

Translate Japanese Name To Latin

Translate Japanese Name To Latin feature converts a Japanese given name or a Japanese surname (or both for more precision) written in Kanji characters, into Latin alphabet. The conversion of a Japanese name written in Kanji into Latin alphabet is called romanization. Several conversions for the same name are possible. This is why the feature returns a list of converted names, accompanied by a calibrated probability and sorted from most likely to least likely.

  • Description: Returns the most likely latin transcriptions for up to 100 Japanese given names and/or surnames in Kanji characters.
  • Cost: 1 credit per name.
  • Test: Translate Japanese Name To Latin feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameLatinCandidatesBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal Japanese names in Kanji characters.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalJapanese given name (or first name) in Kanji.
[{...}].lastNameStringOptionalJapanese surname (or family name) in Kanji.
Response
NameTypeDescriptionEnumerators
namesAndMatchCandidatesArray of objectsList of submitted names converted to Latin alphabet.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted given name.
[{...}].lastNameStringSubmitted surname.
[{...}].orderOptionStringSorting order for matchCandidates.
[{...}].matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Latin alphabet.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for family name or last name).

Code sample:

Translate Japanese Name To Latin code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameLatinCandidatesBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"塩田","lastName":"千春"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "塩田",
      "lastName": "千春"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "塩田",
            "lastName": "千春",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "chiharu shiota",
                    "probability": 0.5000000149011616,
                    "predScoreGivenName": -0.3543974459171295,
                    "predScoreFamilyName": -0.004423846025019884
                },
                {
                    "candidateName": "chiharu shioda",
                    "probability": 0.2500000074505808,
                    "predScoreGivenName": -1.2378724813461304,
                    "predScoreFamilyName": -0.004423846025019884
                }
            ]
        }
    ]
}

Translate Japanese Name To Latin code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "塩田",
      "lastName": "千春"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "塩田",
            "lastName": "千春",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "chiharu shiota",
                    "probability": 0.5000000149011616,
                    "predScoreGivenName": -0.3543974459171295,
                    "predScoreFamilyName": -0.004423846025019884
                },
                {
                    "candidateName": "chiharu shioda",
                    "probability": 0.2500000074505808,
                    "predScoreGivenName": -1.2378724813461304,
                    "predScoreFamilyName": -0.004423846025019884
                }
            ]
        }
    ]
}

Translate Japanese Name To Latin code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "塩田",
      "lastName": "千春"
    }
  ]
}
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",
      "firstName": "塩田",
      "lastName": "千春"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "塩田",
            "lastName": "千春",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "chiharu shiota",
                    "probability": 0.5000000149011616,
                    "predScoreGivenName": -0.3543974459171295,
                    "predScoreFamilyName": -0.004423846025019884
                },
                {
                    "candidateName": "chiharu shioda",
                    "probability": 0.2500000074505808,
                    "predScoreGivenName": -1.2378724813461304,
                    "predScoreFamilyName": -0.004423846025019884
                }
            ]
        }
    ]
}

Translate Japanese Name To Latin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameLatinCandidatesBatch", {
  "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",
      "firstName": "塩田",
      "lastName": "千春"
    }
  ]
})
});

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",
      "firstName": "塩田",
      "lastName": "千春"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "塩田",
            "lastName": "千春",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "chiharu shiota",
                    "probability": 0.5000000149011616,
                    "predScoreGivenName": -0.3543974459171295,
                    "predScoreFamilyName": -0.004423846025019884
                },
                {
                    "candidateName": "chiharu shioda",
                    "probability": 0.2500000074505808,
                    "predScoreGivenName": -1.2378724813461304,
                    "predScoreFamilyName": -0.004423846025019884
                }
            ]
        }
    ]
}
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.

  • Description: Returns the most likely latin transcriptions (romanization) for a Japanese given name and/or family name in Kanji characters.
  • Cost: 1 credit per name.
  • Test: Translate Japanese Name To Latin feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameLatinCandidates/{lastName}/{firstName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
lastNameStringRequiredJapanese surname (or family name) in Kanji.
firstNameStringRequiredJapanese given name (or first name) in Kanji.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted given name.
lastNameStringSubmitted surname.
orderOptionStringSorting order for matchCandidates.
matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Latin alphabet.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for family name or last name).

Code sample:

Translate Japanese Name To Latin code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameLatinCandidates/千春/塩田 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": null,
    "firstName": "塩田",
    "lastName": "千春",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "chiharu shiota",
            "probability": 0.5000000149011616,
            "predScoreGivenName": -0.3543974459171295,
            "predScoreFamilyName": -0.004423846025019884
        },
        {
            "candidateName": "chiharu shioda",
            "probability": 0.2500000074505808,
            "predScoreGivenName": -1.2378724813461304,
            "predScoreFamilyName": -0.004423846025019884
        }
    ]
}

Translate Japanese Name To Latin code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameLatinCandidates/千春/塩田")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": null,
    "firstName": "塩田",
    "lastName": "千春",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "chiharu shiota",
            "probability": 0.5000000149011616,
            "predScoreGivenName": -0.3543974459171295,
            "predScoreFamilyName": -0.004423846025019884
        },
        {
            "candidateName": "chiharu shioda",
            "probability": 0.2500000074505808,
            "predScoreGivenName": -1.2378724813461304,
            "predScoreFamilyName": -0.004423846025019884
        }
    ]
}

Translate Japanese Name To Latin code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameLatinCandidates/千春/塩田"

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": "HAN",
    "id": null,
    "firstName": "塩田",
    "lastName": "千春",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "chiharu shiota",
            "probability": 0.5000000149011616,
            "predScoreGivenName": -0.3543974459171295,
            "predScoreFamilyName": -0.004423846025019884
        },
        {
            "candidateName": "chiharu shioda",
            "probability": 0.2500000074505808,
            "predScoreGivenName": -1.2378724813461304,
            "predScoreFamilyName": -0.004423846025019884
        }
    ]
}

Translate Japanese Name To Latin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameLatinCandidates/千春/塩田", {
  "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": "HAN",
    "id": null,
    "firstName": "塩田",
    "lastName": "千春",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "chiharu shiota",
            "probability": 0.5000000149011616,
            "predScoreGivenName": -0.3543974459171295,
            "predScoreFamilyName": -0.004423846025019884
        },
        {
            "candidateName": "chiharu shioda",
            "probability": 0.2500000074505808,
            "predScoreGivenName": -1.2378724813461304,
            "predScoreFamilyName": -0.004423846025019884
        }
    ]
}

Translate Japanese Name To Kanji

Translate Japanese Name To Kanji feature transcribes a Japanese given name or a Japanese surname (or both for more precision) written in Latin alphabet, into Kanji characters. The conversion of a Japanese name written in Kanji into Latin alphabet is called romanization. Several transcriptions for the same name are possible. This is why the feature returns a list of transcribed names, accompanied by a calibrated probability and sorted from most likely to least likely.

information

The name transcription will work with greater accuracy for names identified as Japanese.

  • Description: Returns the most likely Kanji transcriptions for up to 100 Japanese given names and/or surnames in Latin alphabet (romanized).
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Translate Japanese Name To Kanji feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidatesBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal Japanese names in Latin alphabet.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalJapanese given name (or first name) in Latin.
[{...}].lastNameStringOptionalJapanese surname (or family name) in Latin.
Response
NameTypeDescriptionEnumerators
namesAndMatchCandidatesArray of objectsList of submitted names converted to Kanji characters.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted given name.
[{...}].lastNameStringSubmitted surname.
[{...}].orderOptionStringSorting order for matchCandidates.
[{...}].matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Kanji.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for family name or last name).

Code sample:

Translate Japanese Name To Kanji code sample for shell:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Sanae",
      "lastName": "Yamamoto"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Sanae",
            "lastName": "Yamamoto",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "山本 早苗",
                    "probability": 0.5000000000000001,
                    "predScoreGivenName": -0.03954087197780609,
                    "predScoreFamilyName": -0.014371121302247047
                },
                {
                    "candidateName": "山本 沙苗",
                    "probability": 0.25000000000000006,
                    "predScoreGivenName": -5.180787086486816,
                    "predScoreFamilyName": -0.014371121302247047
                }
            ]
        }
    ]
}

Translate Japanese Name To Kanji code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Sanae",
      "lastName": "Yamamoto"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Sanae",
            "lastName": "Yamamoto",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "山本 早苗",
                    "probability": 0.5000000000000001,
                    "predScoreGivenName": -0.03954087197780609,
                    "predScoreFamilyName": -0.014371121302247047
                },
                {
                    "candidateName": "山本 沙苗",
                    "probability": 0.25000000000000006,
                    "predScoreGivenName": -5.180787086486816,
                    "predScoreFamilyName": -0.014371121302247047
                }
            ]
        }
    ]
}

Translate Japanese Name To Kanji code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Sanae",
      "lastName": "Yamamoto"
    }
  ]
}
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",
      "firstName": "Sanae",
      "lastName": "Yamamoto"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Sanae",
            "lastName": "Yamamoto",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "山本 早苗",
                    "probability": 0.5000000000000001,
                    "predScoreGivenName": -0.03954087197780609,
                    "predScoreFamilyName": -0.014371121302247047
                },
                {
                    "candidateName": "山本 沙苗",
                    "probability": 0.25000000000000006,
                    "predScoreGivenName": -5.180787086486816,
                    "predScoreFamilyName": -0.014371121302247047
                }
            ]
        }
    ]
}

Translate Japanese Name To Kanji code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidatesBatch", {
  "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",
      "firstName": "Sanae",
      "lastName": "Yamamoto"
    }
  ]
})
});

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",
      "firstName": "Sanae",
      "lastName": "Yamamoto"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Sanae",
            "lastName": "Yamamoto",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "山本 早苗",
                    "probability": 0.5000000000000001,
                    "predScoreGivenName": -0.03954087197780609,
                    "predScoreFamilyName": -0.014371121302247047
                },
                {
                    "candidateName": "山本 沙苗",
                    "probability": 0.25000000000000006,
                    "predScoreGivenName": -5.180787086486816,
                    "predScoreFamilyName": -0.014371121302247047
                }
            ]
        }
    ]
}
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.

  • Description: Returns the most likely Kanji transcriptions for a Japanese given name and/or surname in Latin alphabet (romanized).
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Translate Japanese Name To Kanji feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/{lastName}/{firstName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
lastNameStringRequiredJapanese surname (family name) in Latin.
firstNameStringRequiredJapanese given name (first name) in Latin.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted given name.
lastNameStringSubmitted surname.
orderOptionStringSorting order for matchCandidates.
matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Kanji.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for family name or last name).

Code sample:

Translate Japanese Name To Kanji code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/Yamamoto/Sanae \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": null,
    "firstName": "Sanae",
    "lastName": "Yamamoto",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "山本 早苗",
            "probability": 0.5000000000000001,
            "predScoreGivenName": -0.03954087197780609,
            "predScoreFamilyName": -0.014371121302247047
        },
        {
            "candidateName": "山本 沙苗",
            "probability": 0.25000000000000006,
            "predScoreGivenName": -5.180787086486816,
            "predScoreFamilyName": -0.014371121302247047
        }
    ]
}

Translate Japanese Name To Kanji code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/Yamamoto/Sanae")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": null,
    "firstName": "Sanae",
    "lastName": "Yamamoto",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "山本 早苗",
            "probability": 0.5000000000000001,
            "predScoreGivenName": -0.03954087197780609,
            "predScoreFamilyName": -0.014371121302247047
        },
        {
            "candidateName": "山本 沙苗",
            "probability": 0.25000000000000006,
            "predScoreGivenName": -5.180787086486816,
            "predScoreFamilyName": -0.014371121302247047
        }
    ]
}

Translate Japanese Name To Kanji code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/Yamamoto/Sanae"

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": null,
    "firstName": "Sanae",
    "lastName": "Yamamoto",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "山本 早苗",
            "probability": 0.5000000000000001,
            "predScoreGivenName": -0.03954087197780609,
            "predScoreFamilyName": -0.014371121302247047
        },
        {
            "candidateName": "山本 沙苗",
            "probability": 0.25000000000000006,
            "predScoreGivenName": -5.180787086486816,
            "predScoreFamilyName": -0.014371121302247047
        }
    ]
}

Translate Japanese Name To Kanji code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/Yamamoto/Sanae", {
  "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": null,
    "firstName": "Sanae",
    "lastName": "Yamamoto",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "山本 早苗",
            "probability": 0.5000000000000001,
            "predScoreGivenName": -0.03954087197780609,
            "predScoreFamilyName": -0.014371121302247047
        },
        {
            "candidateName": "山本 沙苗",
            "probability": 0.25000000000000006,
            "predScoreGivenName": -5.180787086486816,
            "predScoreFamilyName": -0.014371121302247047
        }
    ]
}

Translate Japanese Name To Kanji Gender

Translate Japanese Name To Kanji Gender feature transcribes a Japanese given name or a Japanese surname (or both) written in Latin alphabet, into Kanji characters. This feature is based on gender to improved accuracy of the transcription than the basic feature Translate Japanese Name To Kanji. The feature returns a list of the most likely transcribed names accompanied by a calibrated probability and sorted from most likely to least likely.

information

The name transcription will work with greater accuracy for names identified as Japanese.

  • Description: Returns the most likely Kanji transcriptions for up to 100 Japanese given names and/or surnames in Latin alphabet, according to their gender.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Translate Japanese Name To Kanji Gender feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameGenderKanjiCandidatesBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal Japanese names in Latin alphabet and their known gender.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalJapanese given name (or first name) in Latin.
[{...}].lastNameStringOptionalJapanese surname (or family name) in Latin.
[{...}].genderStringRequiredMost likely gender (female, or male).
Response
NameTypeDescriptionEnumerators
namesAndMatchCandidatesArray of objectsList of submitted names converted to Kanji characters.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name.
[{...}].lastNameStringSubmitted last name.
[{...}].orderOptionStringSorting order for matchCandidates.
[{...}].matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Kanji.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for family name or last name).

Code sample:

Translate Japanese Name To Kanji Gender code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameGenderKanjiCandidatesBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Takashi","lastName":"Murakami","gender":"male"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Takashi",
      "lastName": "Murakami",
      "gender": "male"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Takashi",
            "lastName": "Murakami",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "村上 隆",
                    "probability": 0.5000000000000001,
                    "predScoreGivenName": -2.249242067337036,
                    "predScoreFamilyName": -0.0006758159724995494
                },
                {
                    "candidateName": "村上 崇",
                    "probability": 0.25000000000000006,
                    "predScoreGivenName": -2.572237014770508,
                    "predScoreFamilyName": -0.0006758159724995494
                }
            ]
        }
    ]
}

Translate Japanese Name To Kanji Gender code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Takashi",
      "lastName": "Murakami",
      "gender": "male"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Takashi",
            "lastName": "Murakami",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "村上 隆",
                    "probability": 0.5000000000000001,
                    "predScoreGivenName": -2.249242067337036,
                    "predScoreFamilyName": -0.0006758159724995494
                },
                {
                    "candidateName": "村上 崇",
                    "probability": 0.25000000000000006,
                    "predScoreGivenName": -2.572237014770508,
                    "predScoreFamilyName": -0.0006758159724995494
                }
            ]
        }
    ]
}

Translate Japanese Name To Kanji Gender code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Takashi",
      "lastName": "Murakami",
      "gender": "male"
    }
  ]
}
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",
      "firstName": "Takashi",
      "lastName": "Murakami",
      "gender": "male"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Takashi",
            "lastName": "Murakami",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "村上 隆",
                    "probability": 0.5000000000000001,
                    "predScoreGivenName": -2.249242067337036,
                    "predScoreFamilyName": -0.0006758159724995494
                },
                {
                    "candidateName": "村上 崇",
                    "probability": 0.25000000000000006,
                    "predScoreGivenName": -2.572237014770508,
                    "predScoreFamilyName": -0.0006758159724995494
                }
            ]
        }
    ]
}

Translate Japanese Name To Kanji Gender code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameGenderKanjiCandidatesBatch", {
  "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",
      "firstName": "Takashi",
      "lastName": "Murakami",
      "gender": "male"
    }
  ]
})
});

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",
      "firstName": "Takashi",
      "lastName": "Murakami",
      "gender": "male"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Takashi",
            "lastName": "Murakami",
            "orderOption": "OrderScoreSquareFNLN",
            "matchCandidates": [
                {
                    "candidateName": "村上 隆",
                    "probability": 0.5000000000000001,
                    "predScoreGivenName": -2.249242067337036,
                    "predScoreFamilyName": -0.0006758159724995494
                },
                {
                    "candidateName": "村上 崇",
                    "probability": 0.25000000000000006,
                    "predScoreGivenName": -2.572237014770508,
                    "predScoreFamilyName": -0.0006758159724995494
                }
            ]
        }
    ]
}
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.

  • Description: Returns the most likely Kanji transcriptions for a Japanese given name and/or surname in Latin alphabet (romanized), according to their gender.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Translate Japanese Name To Kanji Gender feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/{lastName}/{firstName}/{gender}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
lastNameStringRequiredJapanese surname (or family name) in Latin.
firstNameStringRequiredJapanese given name (or first name) in Latin.
genderStringRequiredMost likely gender (female, or male).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted given name.
lastNameStringSubmitted surname.
orderOptionStringSorting order for matchCandidates.
matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Kanji.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for family name or last name).

Code sample:

Translate Japanese Name To Kanji Gender code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/Yamamoto/Sanae/male \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": null,
    "firstName": "Sanae",
    "lastName": "Yamamoto",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "山本 早苗",
            "probability": 0.5000000000000001,
            "predScoreGivenName": -0.031474947929382324,
            "predScoreFamilyName": -0.014371121302247047
        },
        {
            "candidateName": "山本 佐苗",
            "probability": 0.25000000000000006,
            "predScoreGivenName": -4.911670207977295,
            "predScoreFamilyName": -0.014371121302247047
        }
    ]
}

Translate Japanese Name To Kanji Gender code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/Yamamoto/Sanae/male")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": null,
    "firstName": "Sanae",
    "lastName": "Yamamoto",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "山本 早苗",
            "probability": 0.5000000000000001,
            "predScoreGivenName": -0.031474947929382324,
            "predScoreFamilyName": -0.014371121302247047
        },
        {
            "candidateName": "山本 佐苗",
            "probability": 0.25000000000000006,
            "predScoreGivenName": -4.911670207977295,
            "predScoreFamilyName": -0.014371121302247047
        }
    ]
}

Translate Japanese Name To Kanji Gender code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/Yamamoto/Sanae/male"

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": null,
    "firstName": "Sanae",
    "lastName": "Yamamoto",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "山本 早苗",
            "probability": 0.5000000000000001,
            "predScoreGivenName": -0.031474947929382324,
            "predScoreFamilyName": -0.014371121302247047
        },
        {
            "candidateName": "山本 佐苗",
            "probability": 0.25000000000000006,
            "predScoreGivenName": -4.911670207977295,
            "predScoreFamilyName": -0.014371121302247047
        }
    ]
}

Translate Japanese Name To Kanji Gender code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameKanjiCandidates/Yamamoto/Sanae/male", {
  "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": null,
    "firstName": "Sanae",
    "lastName": "Yamamoto",
    "orderOption": "OrderScoreSquareFNLN",
    "matchCandidates": [
        {
            "candidateName": "山本 早苗",
            "probability": 0.5000000000000001,
            "predScoreGivenName": -0.031474947929382324,
            "predScoreFamilyName": -0.014371121302247047
        },
        {
            "candidateName": "山本 佐苗",
            "probability": 0.25000000000000006,
            "predScoreGivenName": -4.911670207977295,
            "predScoreFamilyName": -0.014371121302247047
        }
    ]
}

Match Japanese Name

Match Japanese Name feature assesses and grades the quality of a transcription between a Japanese name in Latin characters and a Japanese name in Kanji. The feature returns the status of the match, and scores the names transcription.

  • Description: Matches up to 100 full names in Kanji against corresponding family names and given names in Latin alphabet.
  • Cost: 1 credit per name.
  • Test: Match Japanese Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameMatchBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal Japanese names in Kanji characters and in Latin aplhabet.
[{...}].idStringOptionalUnique identifier.
[{...}].name1ObjectRequired.
{...}.idStringOptionalUnique identifier.
{...}.firstNameStringRequiredJapanese given name (or first name) in Latin alphabet.
{...}.lastNameStringRequiredJapanese surname (or family name) in Latin alphabet.
[{...}].name2ObjectRequired.
{...}.idStringOptionalUnique identifier.
{...}.nameStringRequiredJapanese full name (family name and given name) in Kanji.
Response
NameTypeDescriptionEnumerators
matchedNamesArray of objectsList of submitted Japanese names with the status of their transcription.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].matchStatusStringSuccess status of the match.Match status
[{...}].scoreNumberHigher implies a better match, score is not normalized.

Code sample:

Match Japanese Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameMatchBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c41","name1":{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Tessai","lastName":"Tomioka"},"name2":{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c43","name":"富岡 鉄斎"}}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Tessai",
        "lastName": "Tomioka"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "富岡 鉄斎"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "matchedNames": [
        {
            "script": null,
            "id": null,
            "matchStatus": "Match",
            "score": 1.002224089213585
        }
    ]
}

Match Japanese Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameMatchBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c41\",\"name1\":{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"firstName\":\"Tessai\",\"lastName\":\"Tomioka\"},\"name2\":{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c43\",\"name\":\"富岡 鉄斎\"}}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Tessai",
        "lastName": "Tomioka"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "富岡 鉄斎"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "matchedNames": [
        {
            "script": null,
            "id": null,
            "matchStatus": "Match",
            "score": 1.002224089213585
        }
    ]
}

Match Japanese Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Tessai",
        "lastName": "Tomioka"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "富岡 鉄斎"
      }
    }
  ]
}
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-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Tessai",
        "lastName": "Tomioka"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "富岡 鉄斎"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "matchedNames": [
        {
            "script": null,
            "id": null,
            "matchStatus": "Match",
            "score": 1.002224089213585
        }
    ]
}

Match Japanese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameMatchBatch", {
  "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-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Tessai",
        "lastName": "Tomioka"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "富岡 鉄斎"
      }
    }
  ]
})
});

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-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Tessai",
        "lastName": "Tomioka"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "富岡 鉄斎"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "matchedNames": [
        {
            "script": null,
            "id": null,
            "matchStatus": "Match",
            "score": 1.002224089213585
        }
    ]
}
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.

  • Description: Matches a full name in Kanji against a family name and a given name in Latin alphabet.
  • Cost: 1 credit per name.
  • Test: Match Japanese Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameMatch/{lastName}/{firstName}/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
lastNameStringRequiredJapanese surname (or family name) in Latin alphabet.
firstNameStringRequiredJapanese given name (or first name) in Latin alphabet.
nameStringRequiredJapanese full name (family name and given name) in Kanji.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
matchStatusStringSuccess status of the match.Match status
scoreNumberHigher implies a better match, score is not normalized.

Code sample:

Match Japanese Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameMatch/Tomioka/Tessai/富岡%20鉄斎 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": null,
    "id": null,
    "matchStatus": "Match",
    "score": 1.002224089213585
}

Match Japanese Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameMatch/Tomioka/Tessai/富岡%20鉄斎")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": null,
    "id": null,
    "matchStatus": "Match",
    "score": 1.002224089213585
}

Match Japanese Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameMatch/Tomioka/Tessai/富岡%20鉄斎"

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": null,
    "id": null,
    "matchStatus": "Match",
    "score": 1.002224089213585
}

Match Japanese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/japaneseNameMatch/Tomioka/Tessai/富岡%20鉄斎", {
  "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": null,
    "id": null,
    "matchStatus": "Match",
    "score": 1.002224089213585
}

Genderize Japanese Name

Genderize Japanese Name feature accurately identifies the gender of a Japanese given name and a Japanese surname (optional), written in Kanji or in Latin alphabet, with slightly improved accuracy than the Genderize Japanese Full Name feature. The feature returns the most likely gender accompanied by a calibrated probability. If the probability of the returned gender is between 45% and 55%, the name can be interpreted as a gender neutral name.

  • Description: Returns the most likely gender of up to 100 Japanese given names and surnames (optional) in Latin alphabet or in Kanji characters.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Japanese Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of Japanese names.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringRequiredJapanese given name (first name) in Latin or Kanji characters.
[{...}].lastNameStringOptionalJapanese surname (family name) in Latin or Kanji characters.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted Japanese names genderized.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted given name.
[{...}].lastNameStringSubmitted surname.
[{...}].likelyGenderStringMost likely gender.Genders
[{...}].genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Japanese Name code sample for shell:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Satoshi",
      "lastName": "Nakamoto"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Satoshi",
            "lastName": "Nakamoto",
            "likelyGender": "male",
            "genderScale": -0.9828731991489774,
            "score": 24.94061932678776,
            "probabilityCalibrated": 0.9914365995744887
        }
    ]
}

Genderize Japanese Name code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Satoshi",
      "lastName": "Nakamoto"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Satoshi",
            "lastName": "Nakamoto",
            "likelyGender": "male",
            "genderScale": -0.9828731991489774,
            "score": 24.94061932678776,
            "probabilityCalibrated": 0.9914365995744887
        }
    ]
}

Genderize Japanese Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Satoshi",
      "lastName": "Nakamoto"
    }
  ]
}
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",
      "firstName": "Satoshi",
      "lastName": "Nakamoto"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Satoshi",
            "lastName": "Nakamoto",
            "likelyGender": "male",
            "genderScale": -0.9828731991489774,
            "score": 24.94061932678776,
            "probabilityCalibrated": 0.9914365995744887
        }
    ]
}

Genderize Japanese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameBatch", {
  "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",
      "firstName": "Satoshi",
      "lastName": "Nakamoto"
    }
  ]
})
});

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",
      "firstName": "Satoshi",
      "lastName": "Nakamoto"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Satoshi",
            "lastName": "Nakamoto",
            "likelyGender": "male",
            "genderScale": -0.9828731991489774,
            "score": 24.94061932678776,
            "probabilityCalibrated": 0.9914365995744887
        }
    ]
}
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.

  • Description: Returns the most likely gender of a Japanese given name and a surname in Latin alphabet or in Kanji characters.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Japanese Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseName/{lastName}/{firstName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
lastNameStringRequiredJapanese surname (family name) in Latin or Kanji characters.
firstNameStringRequiredJapanese given name (first name) in Latin or Kanji characters.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted given name.
lastNameStringSubmitted surname.
likelyGenderStringMost likely gender.Genders
genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Japanese Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseName/Nakamoto/Satoshi \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "9cfd8321-0924-4570-a4b7-29a611ce5089",
    "firstName": "Satoshi",
    "lastName": "Nakamoto",
    "likelyGender": "male",
    "genderScale": -0.9828731991489774,
    "score": 24.94061932678776,
    "probabilityCalibrated": 0.9914365995744887
}

Genderize Japanese Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseName/Nakamoto/Satoshi")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "9cfd8321-0924-4570-a4b7-29a611ce5089",
    "firstName": "Satoshi",
    "lastName": "Nakamoto",
    "likelyGender": "male",
    "genderScale": -0.9828731991489774,
    "score": 24.94061932678776,
    "probabilityCalibrated": 0.9914365995744887
}

Genderize Japanese Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseName/Nakamoto/Satoshi"

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": "9cfd8321-0924-4570-a4b7-29a611ce5089",
    "firstName": "Satoshi",
    "lastName": "Nakamoto",
    "likelyGender": "male",
    "genderScale": -0.9828731991489774,
    "score": 24.94061932678776,
    "probabilityCalibrated": 0.9914365995744887
}

Genderize Japanese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseName/Nakamoto/Satoshi", {
  "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": "9cfd8321-0924-4570-a4b7-29a611ce5089",
    "firstName": "Satoshi",
    "lastName": "Nakamoto",
    "likelyGender": "male",
    "genderScale": -0.9828731991489774,
    "score": 24.94061932678776,
    "probabilityCalibrated": 0.9914365995744887
}

Genderize Japanese Full Name

Genderize Japanese Full Name feature accurately identifies the gender of an unsplit Japanese full name (surname andgiven name) written in Kanji characters. The feature returns most likely gender accompanied by a calibrated probability. If the probability of the returned gender is between 45% and 55%, the name can be interpreted as a unisex name.

information

If the given and surname are clearly identifiable, the Genderize Japanese Name feature will be slightly more accurate.

  • Description: Returns the most likely gender of up to 100 unsplit Japanese full names (surnames and given names), written in Kanji characters or in Latin alphabet.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Japanese Full Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameFullBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of Japanese full names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredUnsplit Japanese full name (given name and surname) in Kanji or Latin alphabet.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted Japanese full names genderized.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].likelyGenderStringMost likely gender.Genders
[{...}].genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Japanese Full Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameFullBatch \
--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":"中松 義郎"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "中松 義郎"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "中松 義郎",
            "likelyGender": "male",
            "genderScale": -0.22231473979961303,
            "score": 3.72410721464353,
            "probabilityCalibrated": 0.6111573698998065
        }
    ]
}

Genderize Japanese Full Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameFullBatch")
.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\":\"中松 義郎\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "中松 義郎"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "中松 義郎",
            "likelyGender": "male",
            "genderScale": -0.22231473979961303,
            "score": 3.72410721464353,
            "probabilityCalibrated": 0.6111573698998065
        }
    ]
}

Genderize Japanese Full Name code sample for python:

import requests

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

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

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "中松 義郎",
            "likelyGender": "male",
            "genderScale": -0.22231473979961303,
            "score": 3.72410721464353,
            "probabilityCalibrated": 0.6111573698998065
        }
    ]
}

Genderize Japanese Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameFullBatch", {
  "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": "中松 義郎"
    }
  ]
})
});

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": "中松 義郎"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "中松 義郎",
            "likelyGender": "male",
            "genderScale": -0.22231473979961303,
            "score": 3.72410721464353,
            "probabilityCalibrated": 0.6111573698998065
        }
    ]
}
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.

  • Description: Returns the most likely gender of an unsplit Japanese full name (given name and surname), written in Kanji characters or in Latin alphabet.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Japanese Full Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameFull/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit Japanese full name (given name and surname) in Kanji or Latin alphabet.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
nameStringSubmitted full name.
likelyGenderStringMost likely gender.Genders
genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Japanese Full Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameFull/中松%20義郎 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "36990426-d289-43b3-99dc-50ccfe2e5ade",
    "name": "中松 義郎",
    "likelyGender": "male",
    "genderScale": -0.22231473979961303,
    "score": 3.72410721464353,
    "probabilityCalibrated": 0.6111573698998065
}

Genderize Japanese Full Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameFull/中松%20義郎")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "36990426-d289-43b3-99dc-50ccfe2e5ade",
    "name": "中松 義郎",
    "likelyGender": "male",
    "genderScale": -0.22231473979961303,
    "score": 3.72410721464353,
    "probabilityCalibrated": 0.6111573698998065
}

Genderize Japanese Full Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameFull/中松%20義郎"

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": "HAN",
    "id": "36990426-d289-43b3-99dc-50ccfe2e5ade",
    "name": "中松 義郎",
    "likelyGender": "male",
    "genderScale": -0.22231473979961303,
    "score": 3.72410721464353,
    "probabilityCalibrated": 0.6111573698998065
}

Genderize Japanese Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderJapaneseNameFull/中松%20義郎", {
  "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": "HAN",
    "id": "36990426-d289-43b3-99dc-50ccfe2e5ade",
    "name": "中松 義郎",
    "likelyGender": "male",
    "genderScale": -0.22231473979961303,
    "score": 3.72410721464353,
    "probabilityCalibrated": 0.6111573698998065
}

Split Japanese Name

Split Japanese Name feature accurately identifies the given name and the surname from an unsplit Japanese full name written in Latin alphabet or in Kanji characters.

  • Description: Returns the most likely given name and surname structure of up to 100 full names (family names and given names) in Kanji or Latin alphabet.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Split Japanese Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/parseJapaneseNameBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of Japanese unsplit full names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredJapanese full name (given name and surname) in Kanji or Latin alphabet.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted Japanese names separated into given name and surname structure.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].nameParserTypeStringMost likely structure of the name.Name structures
[{...}].nameParserTypeAltStringSecond most likely structure of the name.Name structures
[{...}].firstLastNameObjectSplit name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringGiven name (or first name).
{...}.lastNameStringSurname (or family name).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Split Japanese Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/parseJapaneseNameBatch \
--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":"小島 秀夫"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "小島 秀夫"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "小島 秀夫",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "秀夫",
                "lastName": "小島"
            },
            "score": 100
        }
    ]
}

Split Japanese Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/parseJapaneseNameBatch")
.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\":\"小島 秀夫\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "小島 秀夫"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "小島 秀夫",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "秀夫",
                "lastName": "小島"
            },
            "score": 100
        }
    ]
}

Split Japanese Name code sample for python:

import requests

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

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

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "小島 秀夫",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "秀夫",
                "lastName": "小島"
            },
            "score": 100
        }
    ]
}

Split Japanese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/parseJapaneseNameBatch", {
  "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": "小島 秀夫"
    }
  ]
})
});

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": "小島 秀夫"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "小島 秀夫",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "秀夫",
                "lastName": "小島"
            },
            "score": 100
        }
    ]
}
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.

  • Description: Returns the most likely first name and last name structure of a full name (family name and given name) in Kanji or Latin alphabet.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Split Japanese Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/parseJapaneseName/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredJapanese full name (given name and surname) in Kanji or Latin alphabet.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
nameStringSubmitted full name.
nameParserTypeStringMost likely structure of the name.Name structures
nameParserTypeAltStringSecond most likely structure of the name.Name structures
firstLastNameObjectSplit name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringGiven name (or first name).
{...}.lastNameStringSurname (or family name).
scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Split Japanese Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/parseJapaneseName/小島%20秀夫 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "4646501e-33e3-44bc-be6f-66cab4bb5e94",
    "name": "小島 秀夫",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "秀夫",
        "lastName": "小島"
    },
    "score": 100
}

Split Japanese Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/parseJapaneseName/小島%20秀夫")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "4646501e-33e3-44bc-be6f-66cab4bb5e94",
    "name": "小島 秀夫",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "秀夫",
        "lastName": "小島"
    },
    "score": 100
}

Split Japanese Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/parseJapaneseName/小島%20秀夫"

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": "HAN",
    "id": "4646501e-33e3-44bc-be6f-66cab4bb5e94",
    "name": "小島 秀夫",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "秀夫",
        "lastName": "小島"
    },
    "score": 100
}

Split Japanese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/parseJapaneseName/小島%20秀夫", {
  "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": "HAN",
    "id": "4646501e-33e3-44bc-be6f-66cab4bb5e94",
    "name": "小島 秀夫",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "秀夫",
        "lastName": "小島"
    },
    "score": 100
}

Chinese names

Namsor provides dedicated name analysis API for the processing of Chinese names. Our name recognition AI can translate Chinese names to English (Pinyin). Among other features you can: infer the gender of a Chinese name or split a Chinese full name into a first name and a last name. We are also able to rate the quality of a transcriptions between a name in Pinyin and a name in Standard Mandarin Chinese.

Translate Chinese Name To Pinyin

Translate Chinese Name To Pinyin feature transcribes a Chinese full name written in standard Mandarin Chinese, into Pinyin (Latin alphabet). Pinyin is used to depict Mandarin logograms with the Latin alphabet, used by languages such as English.

information

The name transcription in Pinyin will only work with a Chinese full name (given name and surname).

  • Description: Returns the most likely Pinyin transcription of up to 100 Chinese full names (given name and surname) in Standard Mandarin Chinese.
  • Cost: 1 credit per name.
  • Test: Translate Chinese Name To Pinyin feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseNameBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal Chinese full names (given name and surname) in standard Mandarin Chinese.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredChinese full name (given name and surname) in Standard Mandarin Chinese.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names converted to Pinyin (Latin alphabet).
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].nameParserTypeStringMost likely structure of the name.Name structures
[{...}].nameParserTypeAltStringSecond most likely structure of the name.Name structures
[{...}].firstLastNameObjectTranscribed name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringMost likely given name (or first name) transcription in Pinyin.
{...}.lastNameStringMost likely surname (or family name or last name) transcription in Pinyin.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Translate Chinese Name To Pinyin code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseNameBatch \
--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":"赵丽颖"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "赵丽颖"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "赵丽颖",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "LiYing",
                "lastName": "Zhao"
            },
            "score": 4.641021485371256
        }
    ]
}

Translate Chinese Name To Pinyin code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseNameBatch")
.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\":\"赵丽颖\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "赵丽颖"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "赵丽颖",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "LiYing",
                "lastName": "Zhao"
            },
            "score": 4.641021485371256
        }
    ]
}

Translate Chinese Name To Pinyin code sample for python:

import requests

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

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

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "赵丽颖",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "LiYing",
                "lastName": "Zhao"
            },
            "score": 4.641021485371256
        }
    ]
}

Translate Chinese Name To Pinyin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseNameBatch", {
  "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": "赵丽颖"
    }
  ]
})
});

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": "赵丽颖"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "赵丽颖",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "LiYing",
                "lastName": "Zhao"
            },
            "score": 4.641021485371256
        }
    ]
}
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.

  • Description: Returns the most likely Pinyin transcription of a Chinese full name (given name and surname) in Standard Mandarin Chinese.
  • Cost: 1 credit per name.
  • Test: Translate Chinese Name To Pinyin feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseName/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredChinese full name (given name and surname) in Standard Mandarin Chinese.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
nameStringSubmitted full name.
nameParserTypeStringMost likely structure of the name.Name structures
nameParserTypeAltStringSecond most likely structure of the name.Name structures
firstLastNameObjectTranscribed name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringMost likely given name (or first name) transcription in Pinyin.
{...}.lastNameStringMost likely surname (or family name or last name) transcription in Pinyin.
scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Translate Chinese Name To Pinyin code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseName/赵丽颖 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "赵丽颖",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "LiYing",
        "lastName": "Zhao"
    },
    "score": 4.641021485371256
}

Translate Chinese Name To Pinyin code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseName/赵丽颖")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "赵丽颖",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "LiYing",
        "lastName": "Zhao"
    },
    "score": 4.641021485371256
}

Translate Chinese Name To Pinyin code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseName/赵丽颖"

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": "HAN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "赵丽颖",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "LiYing",
        "lastName": "Zhao"
    },
    "score": 4.641021485371256
}

Translate Chinese Name To Pinyin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseName/赵丽颖", {
  "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": "HAN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "赵丽颖",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "LiYing",
        "lastName": "Zhao"
    },
    "score": 4.641021485371256
}

Translate Chinese Name To Mandarin

Translate Chinese Name To Mandarin feature transcribes a Chinese given name or a Chinese surname or both (for more precision) written in Pinyin (Latin alphabet), into standard Mandarin Chinese. Pinyin is used to depict Mandarin logograms with the Latin alphabet, used by languages such as English. Several transcriptions for the same name are possible. This is why the feature returns a list of transcribed names, accompanied by a calibrated probability and sorted from most likely to least likely.

information

Mandarin name transcription will only work with given names and surnames identified as Chinese.

  • Description: Returns the most likely Standard Mandarin Chinese transcriptions using up to 100 given names and/or surnames in Pinyin.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Translate Chinese Name To Mandarin feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameCandidatesBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal Chinese names in Pinyin (Latin alphabet).
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalChinese given name (or first name) in Pinyin.
[{...}].lastNameStringOptionalChinese surname (or family name or last name) in Pinyin.
Response
NameTypeDescriptionEnumerators
namesAndMatchCandidatesArray of objectsList of submitted names converted to standard mandarin Chinese.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted given name.
[{...}].lastNameStringSubmitted surname.
[{...}].orderOptionStringSorting order for matchCandidates.
[{...}].matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Standard Mandarin Chinese.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for surname or last name).

Code sample:

Translate Chinese Name To Mandarin code sample for shell:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "LiYing",
      "lastName": "Zhao"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": null,
            "id": null,
            "firstName": "LiYing",
            "lastName": "Zhao",
            "orderOption": null,
            "matchCandidates": [
                {
                    "candidateName": "赵丽英",
                    "probability": 0.26153460755147884,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                },
                {
                    "candidateName": "赵丽颖",
                    "probability": 0.11856235542333707,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                }
            ]
        }
    ]
}

Translate Chinese Name To Mandarin code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "LiYing",
      "lastName": "Zhao"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": null,
            "id": null,
            "firstName": "LiYing",
            "lastName": "Zhao",
            "orderOption": null,
            "matchCandidates": [
                {
                    "candidateName": "赵丽英",
                    "probability": 0.26153460755147884,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                },
                {
                    "candidateName": "赵丽颖",
                    "probability": 0.11856235542333707,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                }
            ]
        }
    ]
}

Translate Chinese Name To Mandarin code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "LiYing",
      "lastName": "Zhao"
    }
  ]
}
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",
      "firstName": "LiYing",
      "lastName": "Zhao"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": null,
            "id": null,
            "firstName": "LiYing",
            "lastName": "Zhao",
            "orderOption": null,
            "matchCandidates": [
                {
                    "candidateName": "赵丽英",
                    "probability": 0.26153460755147884,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                },
                {
                    "candidateName": "赵丽颖",
                    "probability": 0.11856235542333707,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                }
            ]
        }
    ]
}

Translate Chinese Name To Mandarin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameCandidatesBatch", {
  "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",
      "firstName": "LiYing",
      "lastName": "Zhao"
    }
  ]
})
});

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",
      "firstName": "LiYing",
      "lastName": "Zhao"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": null,
            "id": null,
            "firstName": "LiYing",
            "lastName": "Zhao",
            "orderOption": null,
            "matchCandidates": [
                {
                    "candidateName": "赵丽英",
                    "probability": 0.26153460755147884,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                },
                {
                    "candidateName": "赵丽颖",
                    "probability": 0.11856235542333707,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                }
            ]
        }
    ]
}
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/chineseNameCandidates/{lastName}/{firstName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
lastNameStringRequiredChinese surname (or family name or last name) in Pinyin.
firstNameStringRequiredChinese given name (or first name) in Pinyin.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted given name.
lastNameStringSubmitted surname.
orderOptionStringSorting order for matchCandidates.
matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Standard Mandarin Chinese.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for surname or last name).

Code sample:

Translate Chinese Name To Mandarin code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameCandidates/Zhao/LiYing \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": null,
    "id": null,
    "firstName": "LiYing",
    "lastName": "Zhao",
    "orderOption": null,
    "matchCandidates": [
        {
            "candidateName": "赵丽英",
            "probability": 0.26153460755147884,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        },
        {
            "candidateName": "赵丽颖",
            "probability": 0.11856235542333707,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        }
    ]
}

Translate Chinese Name To Mandarin code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameCandidates/Zhao/LiYing")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": null,
    "id": null,
    "firstName": "LiYing",
    "lastName": "Zhao",
    "orderOption": null,
    "matchCandidates": [
        {
            "candidateName": "赵丽英",
            "probability": 0.26153460755147884,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        },
        {
            "candidateName": "赵丽颖",
            "probability": 0.11856235542333707,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        }
    ]
}

Translate Chinese Name To Mandarin code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameCandidates/Zhao/LiYing"

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": null,
    "id": null,
    "firstName": "LiYing",
    "lastName": "Zhao",
    "orderOption": null,
    "matchCandidates": [
        {
            "candidateName": "赵丽英",
            "probability": 0.26153460755147884,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        },
        {
            "candidateName": "赵丽颖",
            "probability": 0.11856235542333707,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        }
    ]
}

Translate Chinese Name To Mandarin code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameCandidates/Zhao/LiYing", {
  "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": null,
    "id": null,
    "firstName": "LiYing",
    "lastName": "Zhao",
    "orderOption": null,
    "matchCandidates": [
        {
            "candidateName": "赵丽英",
            "probability": 0.26153460755147884,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        },
        {
            "candidateName": "赵丽颖",
            "probability": 0.11856235542333707,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        }
    ]
}

Translate Chinese Name To Mandarin Gender

Translate Chinese Name To Mandarin Gender feature transcribes a Chinese given name or a Chinese surname or both written in Pinyin (Latin alphabet), into standard Mandarin Chinese. This feature is based on gender to improve accuracy of the transcription than the basic feature Translate Chinese Name To Mandarin. The feature returns a list of the most likely transcribed names accompanied by a calibrated probability and sorted from most likely to least likely.

information

Mandarin name transcription will only work with given names and surnames identified as Chinese.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameCandidatesGenderBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal Chinese names in Pinyin (Latin alphabet) and their known gender.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalChinese given name (or first name) in Pinyin.
[{...}].lastNameStringOptionalChinese surname (or family name or last name) in Pinyin.
[{...}].genderStringRequiredGender (female or male).
Response
NameTypeDescriptionEnumerators
namesAndMatchCandidatesArray of objectsList of submitted names converted to standard mandarin Chinese.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted given name.
[{...}].lastNameStringSubmitted surname.
[{...}].orderOptionStringSorting order for matchCandidates.
[{...}].matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Standard Mandarin Chinese.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for surname or last name).

Code sample:

Translate Chinese Name To Mandarin Gender code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameCandidatesGenderBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"LiYing","lastName":"Zhao","gender":"female"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "LiYing",
      "lastName": "Zhao",
      "gender": "female"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": null,
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "LiYing",
            "lastName": "Zhao",
            "orderOption": null,
            "matchCandidates": [
                {
                    "candidateName": "赵丽英",
                    "probability": 0.07949583832056487,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                },
                {
                    "candidateName": "赵丽颖",
                    "probability": 0.021402725701690543,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                }
            ]
        }
    ]
}

Translate Chinese Name To Mandarin Gender code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "LiYing",
      "lastName": "Zhao",
      "gender": "female"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": null,
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "LiYing",
            "lastName": "Zhao",
            "orderOption": null,
            "matchCandidates": [
                {
                    "candidateName": "赵丽英",
                    "probability": 0.07949583832056487,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                },
                {
                    "candidateName": "赵丽颖",
                    "probability": 0.021402725701690543,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                }
            ]
        }
    ]
}

Translate Chinese Name To Mandarin Gender code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "LiYing",
      "lastName": "Zhao",
      "gender": "female"
    }
  ]
}
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",
      "firstName": "LiYing",
      "lastName": "Zhao",
      "gender": "female"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": null,
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "LiYing",
            "lastName": "Zhao",
            "orderOption": null,
            "matchCandidates": [
                {
                    "candidateName": "赵丽英",
                    "probability": 0.07949583832056487,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                },
                {
                    "candidateName": "赵丽颖",
                    "probability": 0.021402725701690543,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                }
            ]
        }
    ]
}

Translate Chinese Name To Mandarin Gender code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameCandidatesGenderBatch", {
  "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",
      "firstName": "LiYing",
      "lastName": "Zhao",
      "gender": "female"
    }
  ]
})
});

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",
      "firstName": "LiYing",
      "lastName": "Zhao",
      "gender": "female"
    }
  ]
}

The above command returns JSON structured like this:

{
    "namesAndMatchCandidates": [
        {
            "script": null,
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "LiYing",
            "lastName": "Zhao",
            "orderOption": null,
            "matchCandidates": [
                {
                    "candidateName": "赵丽英",
                    "probability": 0.07949583832056487,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                },
                {
                    "candidateName": "赵丽颖",
                    "probability": 0.021402725701690543,
                    "predScoreGivenName": 0,
                    "predScoreFamilyName": 0
                }
            ]
        }
    ]
}
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/chineseNameGenderCandidates/{lastName}/{firstName}/{gender}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
lastNameStringRequiredChinese surname (or family name or last name) in Pinyin.
firstNameStringRequiredChinese given name (or first name) in Pinyin.
genderStringRequiredGender (female or male).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
firstNameStringSubmitted given name.
lastNameStringSubmitted surname.
orderOptionStringSorting order for matchCandidates.
matchCandidatesArray of objectsList of possible transcriptions for the submitted name.
[{...}].candidateNameStringInferred transcription of the submitted name to Standard Mandarin Chinese.
[{...}].probabilityNumberHigher implies a more reliable result, ranges from 0 to 1.
[{...}].predScoreGivenNameNumberHigher implies a more reliable result (for given name or first name).
[{...}].predScoreFamilyNameNumberHigher implies a more reliable result (for surname or last name).

Code sample:

Translate Chinese Name To Mandarin Gender code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameGenderCandidates/Fanzhi/Zeng/male \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": null,
    "id": null,
    "firstName": "Zeng",
    "lastName": "Fanzhi",
    "orderOption": null,
    "matchCandidates": [
        {
            "candidateName": "甑范志",
            "probability": 0.014705882352941176,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        },
        {
            "candidateName": "甑凡智",
            "probability": 0.014705882352941176,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        }
    ]
}

Translate Chinese Name To Mandarin Gender code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameGenderCandidates/Fanzhi/Zeng/male")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": null,
    "id": null,
    "firstName": "Zeng",
    "lastName": "Fanzhi",
    "orderOption": null,
    "matchCandidates": [
        {
            "candidateName": "甑范志",
            "probability": 0.014705882352941176,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        },
        {
            "candidateName": "甑凡智",
            "probability": 0.014705882352941176,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        }
    ]
}

Translate Chinese Name To Mandarin Gender code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameGenderCandidates/Fanzhi/Zeng/male"

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": null,
    "id": null,
    "firstName": "Zeng",
    "lastName": "Fanzhi",
    "orderOption": null,
    "matchCandidates": [
        {
            "candidateName": "甑范志",
            "probability": 0.014705882352941176,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        },
        {
            "candidateName": "甑凡智",
            "probability": 0.014705882352941176,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        }
    ]
}

Translate Chinese Name To Mandarin Gender code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameGenderCandidates/Fanzhi/Zeng/male", {
  "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": null,
    "id": null,
    "firstName": "Zeng",
    "lastName": "Fanzhi",
    "orderOption": null,
    "matchCandidates": [
        {
            "candidateName": "甑范志",
            "probability": 0.014705882352941176,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        },
        {
            "candidateName": "甑凡智",
            "probability": 0.014705882352941176,
            "predScoreGivenName": 0,
            "predScoreFamilyName": 0
        }
    ]
}

Match Chinese Name

Match Chinese Name feature assesses and grades the quality of a transcription between a Chinese name in Latin characters (Pinyin) and a Chinese name in standard Mandarin Chinese. The feature returns the status of the match, and scores the names transcription.

  • Description: Matches up to 100 full names in Standard Mandarin Chinese against corresponding given names and surnames in Pinyin.
  • Cost: 1 credit per name.
  • Test: Match Chinese Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameMatchBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal Chinese names in Pinyin and in Mandarin Chinese.
[{...}].idStringOptionalUnique identifier.
[{...}].name1ObjectRequired.
{...}.idStringOptionalUnique identifier.
{...}.firstNameStringRequiredChinese surname (or family name or last name) in Pinyin.
{...}.lastNameStringRequiredChinese given name (or first name) in Pinyin.
[{...}].name2ObjectRequired.
{...}.idStringOptionalUnique identifier.
{...}.nameStringRequiredChinese full name (given name and surname) in Standard Mandarin Chinese.
Response
NameTypeDescriptionEnumerators
matchedNamesArray of objectsList of submitted Chinese names with the status of their transcription.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].matchStatusStringSuccess status of the match.Match status
[{...}].scoreNumberHigher implies a better match, score is not normalized.

Code sample:

Match Chinese Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameMatchBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c41","name1":{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Hong","lastName":"Yu"},"name2":{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c43","name":"喻红"}}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Hong",
        "lastName": "Yu"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "喻红"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "matchedNames": [
        {
            "script": null,
            "id": null,
            "matchStatus": "Match",
            "score": 1.0017825620273417
        }
    ]
}

Match Chinese Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameMatchBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c41\",\"name1\":{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"firstName\":\"Hong\",\"lastName\":\"Yu\"},\"name2\":{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c43\",\"name\":\"喻红\"}}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Hong",
        "lastName": "Yu"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "喻红"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "matchedNames": [
        {
            "script": null,
            "id": null,
            "matchStatus": "Match",
            "score": 1.0017825620273417
        }
    ]
}

Match Chinese Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Hong",
        "lastName": "Yu"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "喻红"
      }
    }
  ]
}
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-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Hong",
        "lastName": "Yu"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "喻红"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "matchedNames": [
        {
            "script": null,
            "id": null,
            "matchStatus": "Match",
            "score": 1.0017825620273417
        }
    ]
}

Match Chinese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameMatchBatch", {
  "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-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Hong",
        "lastName": "Yu"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "喻红"
      }
    }
  ]
})
});

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-648aa8a21c41",
      "name1": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
        "firstName": "Hong",
        "lastName": "Yu"
      },
      "name2": {
        "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c43",
        "name": "喻红"
      }
    }
  ]
}

The above command returns JSON structured like this:

{
    "matchedNames": [
        {
            "script": null,
            "id": null,
            "matchStatus": "Match",
            "score": 1.0017825620273417
        }
    ]
}
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.

  • Description: Matches a full name in Standard Mandarin Chinese against a last name and a first name in Pinyin.
  • Cost: 1 credit per name.
  • Test: Match Chinese Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameMatch/{lastName}/{firstName}/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
lastNameStringRequiredChinese surname (or family name or last name) in Pinyin.
firstNameStringRequiredChinese given name (or first name) in Pinyin.
nameStringRequiredChinese full name (given name and surname) in Standard Mandarin Chinese.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
matchStatusStringSuccess status of the match.Match status
scoreNumberHigher implies a better match, score is not normalized.

Code sample:

Match Chinese Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameMatch/Yu/Hong/喻红 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": null,
    "id": null,
    "matchStatus": "Match",
    "score": 1.0017825620273417
}

Match Chinese Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameMatch/Yu/Hong/喻红")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": null,
    "id": null,
    "matchStatus": "Match",
    "score": 1.0017825620273417
}

Match Chinese Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameMatch/Yu/Hong/喻红"

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": null,
    "id": null,
    "matchStatus": "Match",
    "score": 1.0017825620273417
}

Match Chinese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/chineseNameMatch/Yu/Hong/喻红", {
  "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": null,
    "id": null,
    "matchStatus": "Match",
    "score": 1.0017825620273417
}

Genderize Chinese Name

Genderize Chinese Name feature accurately identifies the gender of a Chinese given name and a Chinese surname (optional), written in Latin alphabet (Pinyin) or Standard Mandarin Chinese, with slightly improved accuracy than the Genderize Chinese Full Name feature. The feature returns the most likely gender accompanied by a calibrated probability. If the probability of the returned gender is between 45% and 55%, the name can be interpreted as a gender neutral name.

  • Description: Returns the most likely gender of up to 100 given names and surnames (optional) in Pinyin or standard Mandarin Chinese.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Chinese Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNamePinyinBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of Chinese names.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringRequiredChinese given name (first name) in Pinyin or standard Mandarin Chinese.
[{...}].lastNameStringOptionalChinese surname (last name) in Pinyin or standard Mandarin Chinese.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted Chinese names genderized.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted given name.
[{...}].lastNameStringSubmitted surname.
[{...}].likelyGenderStringMost likely gender.Genders
[{...}].genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Chinese Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNamePinyinBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Dèng","lastName":"Qīngyún"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Dèng",
      "lastName": "Qīngyún"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Dèng",
            "lastName": "Qīngyún",
            "likelyGender": "male",
            "genderScale": -0.3132515162951226,
            "score": 6.747266465582973,
            "probabilityCalibrated": 0.6566257581475613
        }
    ]
}

Genderize Chinese Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNamePinyinBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNames\":[{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"firstName\":\"Dèng\",\"lastName\":\"Qīngyún\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Dèng",
      "lastName": "Qīngyún"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Dèng",
            "lastName": "Qīngyún",
            "likelyGender": "male",
            "genderScale": -0.3132515162951226,
            "score": 6.747266465582973,
            "probabilityCalibrated": 0.6566257581475613
        }
    ]
}

Genderize Chinese Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Dèng",
      "lastName": "Qīngyún"
    }
  ]
}
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",
      "firstName": "Dèng",
      "lastName": "Qīngyún"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Dèng",
            "lastName": "Qīngyún",
            "likelyGender": "male",
            "genderScale": -0.3132515162951226,
            "score": 6.747266465582973,
            "probabilityCalibrated": 0.6566257581475613
        }
    ]
}

Genderize Chinese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNamePinyinBatch", {
  "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",
      "firstName": "Dèng",
      "lastName": "Qīngyún"
    }
  ]
})
});

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",
      "firstName": "Dèng",
      "lastName": "Qīngyún"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Dèng",
            "lastName": "Qīngyún",
            "likelyGender": "male",
            "genderScale": -0.3132515162951226,
            "score": 6.747266465582973,
            "probabilityCalibrated": 0.6566257581475613
        }
    ]
}
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.

  • Description: Returns the most likely gender of a Chinese given name and a surname in Pinyin or standard Mandarin Chinese.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Chinese Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNamePinyin/{lastName}/{firstName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
lastNameStringRequiredChinese surname (last name) in Pinyin or Mandarin Chinese.
firstNameStringRequiredChinese given name (first name) in Pinyin or Mandarin Chinese.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted given name.
lastNameStringSubmitted surname.
likelyGenderStringMost likely gender.Genders
genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Chinese Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNamePinyin/Qīngyún/Dèng \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "9c1fda7c-54f1-48d1-b082-80cc6148aeb9",
    "firstName": "Dèng",
    "lastName": "Qīngyún",
    "likelyGender": "male",
    "genderScale": -0.014201270075495653,
    "score": 1.8597729950048343,
    "probabilityCalibrated": 0.5071006350377478
}

Genderize Chinese Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNamePinyin/Qīngyún/Dèng")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "9c1fda7c-54f1-48d1-b082-80cc6148aeb9",
    "firstName": "Dèng",
    "lastName": "Qīngyún",
    "likelyGender": "male",
    "genderScale": -0.014201270075495653,
    "score": 1.8597729950048343,
    "probabilityCalibrated": 0.5071006350377478
}

Genderize Chinese Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNamePinyin/Qīngyún/Dèng"

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": "9c1fda7c-54f1-48d1-b082-80cc6148aeb9",
    "firstName": "Dèng",
    "lastName": "Qīngyún",
    "likelyGender": "male",
    "genderScale": -0.014201270075495653,
    "score": 1.8597729950048343,
    "probabilityCalibrated": 0.5071006350377478
}

Genderize Chinese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNamePinyin/Qīngyún/Dèng", {
  "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": "9c1fda7c-54f1-48d1-b082-80cc6148aeb9",
    "firstName": "Dèng",
    "lastName": "Qīngyún",
    "likelyGender": "male",
    "genderScale": -0.014201270075495653,
    "score": 1.8597729950048343,
    "probabilityCalibrated": 0.5071006350377478
}

Genderize Chinese Full Name

Genderize Chinese Full Name feature accurately identifies the gender of an unsplit Chinese full name written in standard Mandarin Chinese. The feature returns most likely gender accompanied by a calibrated probability. If the probability of the returned gender is between 45% and 55%, the name can be interpreted as a unisex name.

information

The Genderize Chinese Full Name feature will only work with Chinese full names written in standard Mandarin Chinese.

  • Description: Returns the most likely gender of up to 100 unsplit Chinese full names (family names and given names) in in Standard Mandarin Chinese.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Chinese Full Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNameBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of Chinese full names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredUnsplit Chinese full name (given name and surname) in Standard Mandarin Chinese.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted Chinese full names genderized.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].likelyGenderStringMost likely gender.Genders
[{...}].genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Chinese Full Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNameBatch \
--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":"谢晓亮"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "谢晓亮"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "谢晓亮",
            "likelyGender": "male",
            "genderScale": -0.7130895869378251,
            "score": 8.286118331853034,
            "probabilityCalibrated": 0.8565447934689125
        }
    ]
}

Genderize Chinese Full Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNameBatch")
.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\":\"谢晓亮\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "谢晓亮"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "谢晓亮",
            "likelyGender": "male",
            "genderScale": -0.7130895869378251,
            "score": 8.286118331853034,
            "probabilityCalibrated": 0.8565447934689125
        }
    ]
}

Genderize Chinese Full Name code sample for python:

import requests

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

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

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "谢晓亮",
            "likelyGender": "male",
            "genderScale": -0.7130895869378251,
            "score": 8.286118331853034,
            "probabilityCalibrated": 0.8565447934689125
        }
    ]
}

Genderize Chinese Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseNameBatch", {
  "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": "谢晓亮"
    }
  ]
})
});

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": "谢晓亮"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "谢晓亮",
            "likelyGender": "male",
            "genderScale": -0.7130895869378251,
            "score": 8.286118331853034,
            "probabilityCalibrated": 0.8565447934689125
        }
    ]
}
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.

  • Description: Returns the most likely gender of an unsplit Chinese full name in Standard Mandarin Chinese.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Genderize Chinese Full Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseName/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit Chinese full name (given name and surname) in standard Mandarin Chinese.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
nameStringSubmitted full name.
likelyGenderStringMost likely gender.Genders
genderScaleNumberGender scale ranging from -1 (male) to +1 (female).
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberHigher implies a more reliable result, ranges from 0 to 1.

Code sample:

Genderize Chinese Full Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseName/谢晓亮 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "46661b4d-32cf-4ca5-b598-f62a8d7e0667",
    "name": "谢晓亮",
    "likelyGender": "male",
    "genderScale": -0.7130895869378251,
    "score": 8.286118331853034,
    "probabilityCalibrated": 0.8565447934689125
}

Genderize Chinese Full Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseName/谢晓亮")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "46661b4d-32cf-4ca5-b598-f62a8d7e0667",
    "name": "谢晓亮",
    "likelyGender": "male",
    "genderScale": -0.7130895869378251,
    "score": 8.286118331853034,
    "probabilityCalibrated": 0.8565447934689125
}

Genderize Chinese Full Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseName/谢晓亮"

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": "HAN",
    "id": "46661b4d-32cf-4ca5-b598-f62a8d7e0667",
    "name": "谢晓亮",
    "likelyGender": "male",
    "genderScale": -0.7130895869378251,
    "score": 8.286118331853034,
    "probabilityCalibrated": 0.8565447934689125
}

Genderize Chinese Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/genderChineseName/谢晓亮", {
  "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": "HAN",
    "id": "46661b4d-32cf-4ca5-b598-f62a8d7e0667",
    "name": "谢晓亮",
    "likelyGender": "male",
    "genderScale": -0.7130895869378251,
    "score": 8.286118331853034,
    "probabilityCalibrated": 0.8565447934689125
}

Split Chinese Name

Split Chinese Name feature accurately identifies the given name and the surname from an unsplit Chinese full name written in Latin alphabet (Pinyin) or in standard Mandarin Chinese.

  • Description: Returns the most likely given name and surname structure of up to 100 full names in Standard Mandarin Chinese or in Pinyin.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Split Chinese Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/parseChineseNameBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of Chinese unsplit full names.
[{...}].idStringOptionalUnique identifier.
[{...}].nameStringRequiredChinese full name (given name and surname) in Standard Mandarin Chinese or Pinyin.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted Chinese names separated into given name and surname structure.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].nameParserTypeStringMost likely structure of the name.Name structures
[{...}].nameParserTypeAltStringSecond most likely structure of the name.Name structures
[{...}].firstLastNameObjectSplit name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringGiven name (or first name) in Standard Mandarin Chinese.
{...}.lastNameStringSurname (or family name or last name) in Standard Mandarin Chinese.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Split Chinese Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/parseChineseNameBatch \
--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":"赵丽颖"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "赵丽颖"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "赵丽颖",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "丽颖",
                "lastName": "赵"
            },
            "score": 4.64102036931541
        }
    ]
}

Split Chinese Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/parseChineseNameBatch")
.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\":\"赵丽颖\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "赵丽颖"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "赵丽颖",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "丽颖",
                "lastName": "赵"
            },
            "score": 4.64102036931541
        }
    ]
}

Split Chinese Name code sample for python:

import requests

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

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

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "赵丽颖",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "丽颖",
                "lastName": "赵"
            },
            "score": 4.64102036931541
        }
    ]
}

Split Chinese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/parseChineseNameBatch", {
  "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": "赵丽颖"
    }
  ]
})
});

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": "赵丽颖"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "HAN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "赵丽颖",
            "nameParserType": "LN1FN1",
            "nameParserTypeAlt": null,
            "firstLastName": {
                "script": null,
                "id": null,
                "firstName": "丽颖",
                "lastName": "赵"
            },
            "score": 4.64102036931541
        }
    ]
}
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.

  • Description: Returns the most likely given name and surname structure of a full name in Standard Mandarin Chinese or in Pinyin.
  • Precision:Precision gauge
  • Cost: 1 credit per name.
  • Test: Split Chinese Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/parseChineseName/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredChinese full name (given name and surname) in Standard Mandarin Chinese or Pinyin.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
nameStringSubmitted full name.
nameParserTypeStringMost likely structure of the name.Name structures
nameParserTypeAltStringSecond most likely structure of the name.Name structures
firstLastNameObjectSplit name.
{...}.scriptStringName of the script used for the name, in ISO 15924 format.Script
{...}.idStringProvided unique identifier.
{...}.firstNameStringGiven name (or first name) in Standard Mandarin Chinese.
{...}.lastNameStringSurname (or family name or last name) in Standard Mandarin Chinese.
scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Split Chinese Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/parseChineseName/赵丽颖 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "赵丽颖",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "丽颖",
        "lastName": "赵"
    },
    "score": 4.64102036931541
}

Split Chinese Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/parseChineseName/赵丽颖")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "HAN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "赵丽颖",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "丽颖",
        "lastName": "赵"
    },
    "score": 4.64102036931541
}

Split Chinese Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/parseChineseName/赵丽颖"

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": "HAN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "赵丽颖",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "丽颖",
        "lastName": "赵"
    },
    "score": 4.64102036931541
}

Split Chinese Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/parseChineseName/赵丽颖", {
  "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": "HAN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "赵丽颖",
    "nameParserType": "LN1FN1",
    "nameParserTypeAlt": null,
    "firstLastName": {
        "script": null,
        "id": null,
        "firstName": "丽颖",
        "lastName": "赵"
    },
    "score": 4.64102036931541
}

Indian names

Namsor has developed extended functionality for Indian names. You will be able to determine a personn's caste group or religion from their first and/or last name. It is also possible to estimate the state or Union territory of residence directly from the name.

Caste Indian Name

Caste Indian Name feature analyzes a first name, a last name and an Indian state or Union territory of residence to determine the person's most likely caste group.Adding the first and last name increases the accuracy of the estimated religion. If the first and last name are not clearly identifiable, please use the Caste Indian Full Name feature.

  • Description: Returns the caste from first names, last names and territories of residence.
  • Cost: 10 credits per name.
  • Test: Caste Indian Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal full names with their State or Union territory of origin or residence.
[{...}].idStringOptionalProvided unique identifier.
[{...}].firstNameStringOptionalIndian first name, given name, nickname.
[{...}].lastNameStringOptionalIndian last name, family name, surname.
[{...}].subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted full names with their caste group.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringProvided first name.
[{...}].lastNameStringProvided last name.
[{...}].castegroupStringMost likely caste group.Indian caste groups
[{...}].castegroupAltStringSecond most likely caste group.Indian caste groups
[{...}].castegroupTopArrayTop of the most likely caste group, sorted from most likely to least likely.Indian caste groups
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberThe calibrated probability that castegroup has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that castegroup OR castegroupAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Caste Indian Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Akash","lastName":"Sharma","subdivisionIso":"IN-UP"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "string",
            "firstName": "Akash",
            "lastName": "Sharma",
            "castegroup": "General/High Caste",
            "castegroupAlt": "General",
            "castegroupTop": ["General/High Caste", "General", "OBC", "SC", "ST"],
            "score": 11.127678155723578,
            "probabilityCalibrated": 0.7031015750163506,
            "probabilityAltCalibrated": 0.9535225800378421
        }
    ]
}

Caste Indian Name code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "string",
            "firstName": "Akash",
            "lastName": "Sharma",
            "castegroup": "General/High Caste",
            "castegroupAlt": "General",
            "castegroupTop": ["General/High Caste", "General", "OBC", "SC", "ST"],
            "score": 11.127678155723578,
            "probabilityCalibrated": 0.7031015750163506,
            "probabilityAltCalibrated": 0.9535225800378421
        }
    ]
}

Caste Indian Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}
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",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "string",
            "firstName": "Akash",
            "lastName": "Sharma",
            "castegroup": "General/High Caste",
            "castegroupAlt": "General",
            "castegroupTop": ["General/High Caste", "General", "OBC", "SC", "ST"],
            "score": 11.127678155723578,
            "probabilityCalibrated": 0.7031015750163506,
            "probabilityAltCalibrated": 0.9535225800378421
        }
    ]
}

Caste Indian Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianBatch", {
  "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",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
})
});

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",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "string",
            "firstName": "Akash",
            "lastName": "Sharma",
            "castegroup": "General/High Caste",
            "castegroupAlt": "General",
            "castegroupTop": ["General/High Caste", "General", "OBC", "SC", "ST"],
            "score": 11.127678155723578,
            "probabilityCalibrated": 0.7031015750163506,
            "probabilityAltCalibrated": 0.9535225800378421
        }
    ]
}
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.

  • Description: Returns the caste from a first name, a last name and a territory of residence.
  • Cost: 10 credits per name.
  • Test: Caste Indian Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndian/{subdivisionIso}/{firstName}/{lastName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
firstNameStringRequiredIndian first name, given name, nickname.
lastNameStringRequiredIndian last name, family name, surname.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
firstNameStringProvided first name.
lastNameStringProvided last name.
castegroupStringMost likely caste group.Indian caste groups
castegroupAltStringSecond most likely caste group.Indian caste groups
castegroupTopArrayTop of the most likely caste group, sorted from most likely to least likely.Indian caste groups
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberThe calibrated probability that castegroup has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that castegroup OR castegroupAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Caste Indian Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndian/IN-UP/Akash/Sharma \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "firstName": "Akash",
    "lastName": "Sharma",
    "castegroup": "General/High Caste",
    "castegroupAlt": "General",
    "castegroupTop": ["General/High Caste", "General", "OBC", "SC", "ST"],
    "score": 11.127678155723578,
    "probabilityCalibrated": 0.7031015750163506,
    "probabilityAltCalibrated": 0.9535225800378421
}

Caste Indian Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndian/IN-UP/Akash/Sharma")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "firstName": "Akash",
    "lastName": "Sharma",
    "castegroup": "General/High Caste",
    "castegroupAlt": "General",
    "castegroupTop": ["General/High Caste", "General", "OBC", "SC", "ST"],
    "score": 11.127678155723578,
    "probabilityCalibrated": 0.7031015750163506,
    "probabilityAltCalibrated": 0.9535225800378421
}

Caste Indian Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndian/IN-UP/Akash/Sharma"

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",
    "firstName": "Akash",
    "lastName": "Sharma",
    "castegroup": "General/High Caste",
    "castegroupAlt": "General",
    "castegroupTop": ["General/High Caste", "General", "OBC", "SC", "ST"],
    "score": 11.127678155723578,
    "probabilityCalibrated": 0.7031015750163506,
    "probabilityAltCalibrated": 0.9535225800378421
}

Caste Indian Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndian/IN-UP/Akash/Sharma", {
  "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",
    "firstName": "Akash",
    "lastName": "Sharma",
    "castegroup": "General/High Caste",
    "castegroupAlt": "General",
    "castegroupTop": ["General/High Caste", "General", "OBC", "SC", "ST"],
    "score": 11.127678155723578,
    "probabilityCalibrated": 0.7031015750163506,
    "probabilityAltCalibrated": 0.9535225800378421
}

Caste Indian Full Name

Caste Indian Full Name feature analyzes an unsplit Indian full name and a Indian state or Union territory of residence to determine the person's most likely caste group.

  • Description: Returns the caste from unsplit Indian full names and territories of residence.
  • Cost: 10 credits per name.
  • Test: Caste Indian Full Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianFullBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal full names with their State or Union territory of origin or residence.
[{...}].idStringOptionalProvided unique identifier.
[{...}].nameStringRequiredUnsplit Indian full name (first name and last name).
[{...}].subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted full names with their caste group.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringProvided full name.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].castegroupStringMost likely caste group.Indian caste groups
[{...}].castegroupAltStringSecond most likely caste group.Indian caste groups
[{...}].castegroupTopArrayTop of the most likely caste group, sorted from most likely to least likely.Indian caste groups
[{...}].probabilityCalibratedNumberThe calibrated probability that castegroup has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that castegroup OR castegroupAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Caste Indian Full Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianFullBatch \
--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":"Akash Sharma","subdivisionIso":"IN-UP"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Akash Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "string",
            "name": "Akash Sharma",
            "score": 7.8984899727105295,
            "castegroup": "General/High Caste",
            "castegroupAlt": "General",
            "castegroupTop": ["General/High Caste", "General", "OBC", "ST", "SC"],
            "probabilityCalibrated": 0.6400351364066995,
            "probabilityAltCalibrated": 0.9559249062835251
        }
    ]
}

Caste Indian Full Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianFullBatch")
.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\":\"Akash Sharma\",\"subdivisionIso\":\"IN-UP\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Akash Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "string",
            "name": "Akash Sharma",
            "score": 7.8984899727105295,
            "castegroup": "General/High Caste",
            "castegroupAlt": "General",
            "castegroupTop": ["General/High Caste", "General", "OBC", "ST", "SC"],
            "probabilityCalibrated": 0.6400351364066995,
            "probabilityAltCalibrated": 0.9559249062835251
        }
    ]
}

Caste Indian Full Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Akash Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}
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": "Akash Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "string",
            "name": "Akash Sharma",
            "score": 7.8984899727105295,
            "castegroup": "General/High Caste",
            "castegroupAlt": "General",
            "castegroupTop": ["General/High Caste", "General", "OBC", "ST", "SC"],
            "probabilityCalibrated": 0.6400351364066995,
            "probabilityAltCalibrated": 0.9559249062835251
        }
    ]
}

Caste Indian Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianFullBatch", {
  "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": "Akash Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
})
});

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": "Akash Sharma",
      "subdivisionIso": "IN-UP"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "string",
            "name": "Akash Sharma",
            "score": 7.8984899727105295,
            "castegroup": "General/High Caste",
            "castegroupAlt": "General",
            "castegroupTop": ["General/High Caste", "General", "OBC", "ST", "SC"],
            "probabilityCalibrated": 0.6400351364066995,
            "probabilityAltCalibrated": 0.9559249062835251
        }
    ]
}
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.

  • Description: Returns the caste from an unsplit Indian full name and a territory of residence.
  • Cost: 10 credits per name.
  • Test: Caste Indian Full Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianFull/{subdivisionIso}/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
nameStringRequiredUnsplit Indian full name (first name and last name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
nameStringProvided full name.
scoreNumberHigher implies a more reliable result, score is not normalized.
castegroupStringMost likely caste group.Indian caste groups
castegroupAltStringSecond most likely caste group.Indian caste groups
castegroupTopArrayTop of the most likely caste group, sorted from most likely to least likely.Indian caste groups
probabilityCalibratedNumberThe calibrated probability that castegroup has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that castegroup OR castegroupAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Caste Indian Full Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianFull/IN-UP/Akash%20Sharma \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "name": "Akash Sharma",
    "score": 7.8984899727105295,
    "castegroup": "General/High Caste",
    "castegroupAlt": "General",
    "castegroupTop": ["General/High Caste", "General", "OBC", "ST", "SC"],
    "probabilityCalibrated": 0.6400351364066995,
    "probabilityAltCalibrated": 0.9559249062835251
}

Caste Indian Full Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianFull/IN-UP/Akash%20Sharma")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "name": "Akash Sharma",
    "score": 7.8984899727105295,
    "castegroup": "General/High Caste",
    "castegroupAlt": "General",
    "castegroupTop": ["General/High Caste", "General", "OBC", "ST", "SC"],
    "probabilityCalibrated": 0.6400351364066995,
    "probabilityAltCalibrated": 0.9559249062835251
}

Caste Indian Full Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianFull/IN-UP/Akash%20Sharma"

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",
    "name": "Akash Sharma",
    "score": 7.8984899727105295,
    "castegroup": "General/High Caste",
    "castegroupAlt": "General",
    "castegroupTop": ["General/High Caste", "General", "OBC", "ST", "SC"],
    "probabilityCalibrated": 0.6400351364066995,
    "probabilityAltCalibrated": 0.9559249062835251
}

Caste Indian Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/castegroupIndianFull/IN-UP/Akash%20Sharma", {
  "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",
    "name": "Akash Sharma",
    "score": 7.8984899727105295,
    "castegroup": "General/High Caste",
    "castegroupAlt": "General",
    "castegroupTop": ["General/High Caste", "General", "OBC", "ST", "SC"],
    "probabilityCalibrated": 0.6400351364066995,
    "probabilityAltCalibrated": 0.9559249062835251
}

Religion Indian Name

Religion Indian Name feature analyzes a first name, a last name and a Indian state or Union territory of residence to determine the person's most likely religion. Adding the first and last name increases the accuracy of the estimated religion. If the first and last name are not clearly identifiable, please use the Religion Indian Full Name feature.

  • Description: Returns religion from Indian first and last names and territories of origin.
  • Cost: 10 credits per name.
  • Test: Religion Indian Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names with their State or Union territory of origin or residence.
[{...}].idStringOptionalProvided unique identifier.
[{...}].firstNameStringOptionalIndian first name, given name, nickname.
[{...}].lastNameStringOptionalIndian last name, family name, surname.
[{...}].subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names with their religion.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringProvided first name.
[{...}].lastNameStringProvided last name.
[{...}].religionStringMost likely religion.Religions of India
[{...}].religionAltStringSecond most likely religion.Religions of India
[{...}].religionsTopArrayTop of the most likely religions, sorted from most likely to least likely.Religions of India
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberThe calibrated probability that religion has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that religion OR religionAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Religion Indian Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNames":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Akash","lastName":"Sharma","subdivisionIso":"IN-PB"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Akash",
            "lastName": "Sharma",
            "religion": "Hinduism",
            "religionAlt": "Jain",
            "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Parsi", "Muslim"],
            "score": 15.842441054636446,
            "probabilityCalibrated": 0.8366121598622244,
            "probabilityAltCalibrated": 0.9418751496555294
        }
    ]
}

Religion Indian Name code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Akash",
            "lastName": "Sharma",
            "religion": "Hinduism",
            "religionAlt": "Jain",
            "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Parsi", "Muslim"],
            "score": 15.842441054636446,
            "probabilityCalibrated": 0.8366121598622244,
            "probabilityAltCalibrated": 0.9418751496555294
        }
    ]
}

Religion Indian Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}
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",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Akash",
            "lastName": "Sharma",
            "religion": "Hinduism",
            "religionAlt": "Jain",
            "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Parsi", "Muslim"],
            "score": 15.842441054636446,
            "probabilityCalibrated": 0.8366121598622244,
            "probabilityAltCalibrated": 0.9418751496555294
        }
    ]
}

Religion Indian Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianBatch", {
  "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",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
})
});

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",
      "firstName": "Akash",
      "lastName": "Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Akash",
            "lastName": "Sharma",
            "religion": "Hinduism",
            "religionAlt": "Jain",
            "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Parsi", "Muslim"],
            "score": 15.842441054636446,
            "probabilityCalibrated": 0.8366121598622244,
            "probabilityAltCalibrated": 0.9418751496555294
        }
    ]
}
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.

  • Description: Returns the religion from a first name, a last name and a territory of residence.
  • Cost: 10 credits per name.
  • Test: Religion Indian Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndian/{subdivisionIso}/{firstName}/{lastName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
firstNameStringRequiredIndian first name, given name, nickname.
lastNameStringRequiredIndian last name, family name, surname.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
firstNameStringProvided first name.
lastNameStringProvided last name.
scoreNumberHigher implies a more reliable result, score is not normalized.
religionStringMost likely religion.Religions of India
religionAltStringSecond most likely religion.Religions of India
religionsTopArrayTop of the most likely religions, sorted from most likely to least likely.Religions of India
probabilityCalibratedNumberThe calibrated probability that religion has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that religion OR religionAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Religion Indian Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndian/IN-UP/Akash/Sharma \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "firstName": "Akash",
    "lastName": "Sharma",
    "score": 11.205099735191228,
    "religion": "Hinduism",
    "religionAlt": "Jain",
    "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
    "probabilityCalibrated": 0.9535569047307475,
    "probabilityAltCalibrated": 0.9896944325654494
}

Religion Indian Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndian/IN-UP/Akash/Sharma")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "firstName": "Akash",
    "lastName": "Sharma",
    "score": 11.205099735191228,
    "religion": "Hinduism",
    "religionAlt": "Jain",
    "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
    "probabilityCalibrated": 0.9535569047307475,
    "probabilityAltCalibrated": 0.9896944325654494
}

Religion Indian Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndian/IN-UP/Akash/Sharma"

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",
    "firstName": "Akash",
    "lastName": "Sharma",
    "score": 11.205099735191228,
    "religion": "Hinduism",
    "religionAlt": "Jain",
    "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
    "probabilityCalibrated": 0.9535569047307475,
    "probabilityAltCalibrated": 0.9896944325654494
}

Religion Indian Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndian/IN-UP/Akash/Sharma", {
  "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",
    "firstName": "Akash",
    "lastName": "Sharma",
    "score": 11.205099735191228,
    "religion": "Hinduism",
    "religionAlt": "Jain",
    "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
    "probabilityCalibrated": 0.9535569047307475,
    "probabilityAltCalibrated": 0.9896944325654494
}

Religion Indian Full Name

Religion Indian Name feature analyzes an unsplit Indian full name and a Indian state or Union territory of residence to determine the person's most likely religion.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianFullBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names with their State or Union territory of origin or residence.
[{...}].idStringOptionalProvided unique identifier.
[{...}].nameStringRequiredUnsplit Indian full name (first name and last name).
[{...}].subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names with their religion.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringProvided full name.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].religionStringMost likely religion.Religions of India
[{...}].religionAltStringSecond most likely religion.Religions of India
[{...}].religionsTopArrayTop of the most likely religions, sorted from most likely to least likely.Religions of India
[{...}].probabilityCalibratedNumberThe calibrated probability that religion has been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability that religion OR religionAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Religion Indian Full Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianFullBatch \
--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":"Akash Sharma","subdivisionIso":"IN-PB"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Akash Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Akash Sharma",
            "score": 11.205099735191228,
            "religion": "Hinduism",
            "religionAlt": "Jain",
            "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
            "probabilityCalibrated": 0.9535569047307475,
            "probabilityAltCalibrated": 0.9896944325654494
        }
    ]
}

Religion Indian Full Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianFullBatch")
.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\":\"Akash Sharma\",\"subdivisionIso\":\"IN-PB\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Akash Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Akash Sharma",
            "score": 11.205099735191228,
            "religion": "Hinduism",
            "religionAlt": "Jain",
            "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
            "probabilityCalibrated": 0.9535569047307475,
            "probabilityAltCalibrated": 0.9896944325654494
        }
    ]
}

Religion Indian Full Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Akash Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}
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": "Akash Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Akash Sharma",
            "score": 11.205099735191228,
            "religion": "Hinduism",
            "religionAlt": "Jain",
            "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
            "probabilityCalibrated": 0.9535569047307475,
            "probabilityAltCalibrated": 0.9896944325654494
        }
    ]
}

Religion Indian Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianFullBatch", {
  "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": "Akash Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
})
});

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": "Akash Sharma",
      "subdivisionIso": "IN-PB"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Akash Sharma",
            "score": 11.205099735191228,
            "religion": "Hinduism",
            "religionAlt": "Jain",
            "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
            "probabilityCalibrated": 0.9535569047307475,
            "probabilityAltCalibrated": 0.9896944325654494
        }
    ]
}
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/religionIndianFull/{subdivisionIso}/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
nameStringRequiredUnsplit Indian full name (first name and last name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
nameStringProvided full name.
scoreNumberHigher implies a more reliable result, score is not normalized.
religionStringMost likely religion.Religions of India
religionAltStringSecond most likely religion.Religions of India
religionsTopArrayTop of the most likely religions, sorted from most likely to least likely.Religions of India
probabilityCalibratedNumberThe calibrated probability that religion has been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability that religion OR religionAlt have been guessed correctly. -1 = still calibrating.

Code sample:

Religion Indian Full Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianFull/IN-UP/Akash%20Sharma \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "name": "Akash Sharma",
    "score": 11.205099735191228,
    "religion": "Hinduism",
    "religionAlt": "Jain",
    "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
    "probabilityCalibrated": 0.9535569047307475,
    "probabilityAltCalibrated": 0.9896944325654494
}

Religion Indian Full Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianFull/IN-UP/Akash%20Sharma")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "name": "Akash Sharma",
    "score": 11.205099735191228,
    "religion": "Hinduism",
    "religionAlt": "Jain",
    "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
    "probabilityCalibrated": 0.9535569047307475,
    "probabilityAltCalibrated": 0.9896944325654494
}

Religion Indian Full Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianFull/IN-UP/Akash%20Sharma"

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",
    "name": "Akash Sharma",
    "score": 11.205099735191228,
    "religion": "Hinduism",
    "religionAlt": "Jain",
    "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
    "probabilityCalibrated": 0.9535569047307475,
    "probabilityAltCalibrated": 0.9896944325654494
}

Religion Indian Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianFull/IN-UP/Akash%20Sharma", {
  "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",
    "name": "Akash Sharma",
    "score": 11.205099735191228,
    "religion": "Hinduism",
    "religionAlt": "Jain",
    "religionsTop": ["Hinduism", "Jain", "Buddhist", "Christian", "Sikh", "Muslim", "Parsi"],
    "probabilityCalibrated": 0.9535569047307475,
    "probabilityAltCalibrated": 0.9896944325654494
}

Subclassification Indian Name

Subclassification Indian Name feature analyzes a first name or a last name (or both for more precision) to estimate the person's most likely State or Union territory of residence (in ISO 3166-2 alpha-2 format), with slightly improved accuracy than the Subclassification Indian Full Name feature.

  • Description: Returns the most likely Indian State or Union territory of residence of up to 100 Indian first names and/or last names.
  • Cost: 10 credits per name.
  • Test: Subclassification Indian Name feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names.
[{...}].idStringOptionalProvided unique identifier.
[{...}].firstNameStringOptionalFirst name, given name, nickname.
[{...}].lastNameStringOptionalLast name, family name, surname.
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names with their most likely geographic subdivision context.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name.
[{...}].lastNameStringSubmitted last name.
[{...}].countryIso2StringMost likely country of residence, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].subClassificationStringMost likely Indian State or Union territory of residence, in ISO 3166-2 alpha-2 format.Indian subdivision
[{...}].subClassificationAltStringSecond most likely Indian State or Union territory of residence, in ISO 3166-2 alpha-2 format.Indian subdivision
[{...}].subclassificationTopArrayTop 10 most likely Indian State or Union territory of residence, sorted from most likely to least likely.Indian subdivision
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberThe calibrated probability for subClassification to have been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability for subClassification OR subClassificationAlt to have been guessed correctly. -1 = still calibrating.

Code sample:

Subclassification Indian Name code sample for shell:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Jannat",
      "lastName": "Rahmani"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Jannat",
            "lastName": "Rahmani",
            "countryIso2": "IN",
            "subClassification": "IN-CH",
            "subClassificationAlt": "IN-PY",
            "subclassificationTop": ["IN-CH", "IN-PY", "IN-UP", "IN-AN", "IN-RJ", "IN-JH", "IN-KL", "IN-BR", "IN-DL", "IN-UT"],
            "score": 2.5087208339960445,
            "probabilityCalibrated": 0.3684249074494664,
            "probabilityAltCalibrated": 0.4738687735374875
        }
    ]
}

Subclassification Indian Name code sample for java:

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

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Jannat",
      "lastName": "Rahmani"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Jannat",
            "lastName": "Rahmani",
            "countryIso2": "IN",
            "subClassification": "IN-CH",
            "subClassificationAlt": "IN-PY",
            "subclassificationTop": ["IN-CH", "IN-PY", "IN-UP", "IN-AN", "IN-RJ", "IN-JH", "IN-KL", "IN-BR", "IN-DL", "IN-UT"],
            "score": 2.5087208339960445,
            "probabilityCalibrated": 0.3684249074494664,
            "probabilityAltCalibrated": 0.4738687735374875
        }
    ]
}

Subclassification Indian Name code sample for python:

import requests

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

payload = {
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Jannat",
      "lastName": "Rahmani"
    }
  ]
}
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",
      "firstName": "Jannat",
      "lastName": "Rahmani"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Jannat",
            "lastName": "Rahmani",
            "countryIso2": "IN",
            "subClassification": "IN-CH",
            "subClassificationAlt": "IN-PY",
            "subclassificationTop": ["IN-CH", "IN-PY", "IN-UP", "IN-AN", "IN-RJ", "IN-JH", "IN-KL", "IN-BR", "IN-DL", "IN-UT"],
            "score": 2.5087208339960445,
            "probabilityCalibrated": 0.3684249074494664,
            "probabilityAltCalibrated": 0.4738687735374875
        }
    ]
}

Subclassification Indian Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianBatch", {
  "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",
      "firstName": "Jannat",
      "lastName": "Rahmani"
    }
  ]
})
});

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",
      "firstName": "Jannat",
      "lastName": "Rahmani"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Jannat",
            "lastName": "Rahmani",
            "countryIso2": "IN",
            "subClassification": "IN-CH",
            "subClassificationAlt": "IN-PY",
            "subclassificationTop": ["IN-CH", "IN-PY", "IN-UP", "IN-AN", "IN-RJ", "IN-JH", "IN-KL", "IN-BR", "IN-DL", "IN-UT"],
            "score": 2.5087208339960445,
            "probabilityCalibrated": 0.3684249074494664,
            "probabilityAltCalibrated": 0.4738687735374875
        }
    ]
}
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.

  • Description: Returns the most likely Indian State or Union territory of residence from a first name and/or a last name.
  • Cost: 10 credits per name.
  • Test: Subclassification Indian Name feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndian/{firstName}/{lastName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
firstNameStringRequiredFirst name, given name, nickname.
lastNameStringRequiredLast name, family name, surname.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
firstNameStringSubmitted first name.
lastNameStringSubmitted last name.
countryIso2StringMost likely country of residence, in ISO 3166-1 alpha-2 format (always "IN").Country of residence
subClassificationStringMost likely Indian State or Union territory of residence, in ISO 3166-2 alpha-2 format.Indian subdivision
subClassificationAltStringSecond most likely Indian State or Union territory of residence, in ISO 3166-2 alpha-2 format.Indian subdivision
subclassificationTopArrayTop 10 most likely Indian State or Union territory of residence, sorted from most likely to least likely.Indian subdivision
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberThe calibrated probability for subClassification to have been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability for subClassification OR subClassificationAlt to have been guessed correctly. -1 = still calibrating.

Code sample:

Subclassification Indian Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndian/Amitabh/Bachchan \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "5dd784f2-d1d3-41b8-bba5-c064a836646b",
    "firstName": "Amitabh",
    "lastName": "Bachchan",
    "countryIso2": "IN",
    "subClassification": "IN-CH",
    "subClassificationAlt": "IN-UT",
    "subclassificationTop": ["IN-CH", "IN-UT", "IN-AN", "IN-UP", "IN-DL", "IN-HR", "IN-RJ", "IN-HP", "IN-BR", "IN-KL"],
    "score": 8.02456285165782,
    "probabilityCalibrated": 0.5561082178046067,
    "probabilityAltCalibrated": 0.698831534498132
}

Subclassification Indian Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndian/Amitabh/Bachchan")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "5dd784f2-d1d3-41b8-bba5-c064a836646b",
    "firstName": "Amitabh",
    "lastName": "Bachchan",
    "countryIso2": "IN",
    "subClassification": "IN-CH",
    "subClassificationAlt": "IN-UT",
    "subclassificationTop": ["IN-CH", "IN-UT", "IN-AN", "IN-UP", "IN-DL", "IN-HR", "IN-RJ", "IN-HP", "IN-BR", "IN-KL"],
    "score": 8.02456285165782,
    "probabilityCalibrated": 0.5561082178046067,
    "probabilityAltCalibrated": 0.698831534498132
}

Subclassification Indian Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndian/Amitabh/Bachchan"

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": "5dd784f2-d1d3-41b8-bba5-c064a836646b",
    "firstName": "Amitabh",
    "lastName": "Bachchan",
    "countryIso2": "IN",
    "subClassification": "IN-CH",
    "subClassificationAlt": "IN-UT",
    "subclassificationTop": ["IN-CH", "IN-UT", "IN-AN", "IN-UP", "IN-DL", "IN-HR", "IN-RJ", "IN-HP", "IN-BR", "IN-KL"],
    "score": 8.02456285165782,
    "probabilityCalibrated": 0.5561082178046067,
    "probabilityAltCalibrated": 0.698831534498132
}

Subclassification Indian Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndian/Amitabh/Bachchan", {
  "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": "5dd784f2-d1d3-41b8-bba5-c064a836646b",
    "firstName": "Amitabh",
    "lastName": "Bachchan",
    "countryIso2": "IN",
    "subClassification": "IN-CH",
    "subClassificationAlt": "IN-UT",
    "subclassificationTop": ["IN-CH", "IN-UT", "IN-AN", "IN-UP", "IN-DL", "IN-HR", "IN-RJ", "IN-HP", "IN-BR", "IN-KL"],
    "score": 8.02456285165782,
    "probabilityCalibrated": 0.5561082178046067,
    "probabilityAltCalibrated": 0.698831534498132
}

Subclassification Indian Full Name

Subclassification Indian Full Name feature analyzes an unsplit full name (first name and last name) to identify the person's most likely State or Union territory of residence, in ISO 3166-2 alpha-2 format.

information

If the first and last name are clearly identifiable, the Subclassification Indian Name feature will be slightly more accurate.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianFullBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesArray of objectsRequiredA list of personal names.
[{...}].idStringOptionalProvided unique identifier.
[{...}].nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
personalNamesArray of objectsList of submitted names with their most likely geographic subdivision context.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].nameStringSubmitted full name.
[{...}].countryIso2StringMost likely country of residence, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].subClassificationStringMost likely Indian State or Union territory of residence, in ISO 3166-2 alpha-2 format.Indian subdivision
[{...}].subClassificationAltStringSecond most likely Indian State or Union territory of residence, in ISO 3166-2 alpha-2 format.Indian subdivision
[{...}].subclassificationTopArrayTop 10 most likely Indian State or Union territory of residence, sorted from most likely to least likely.Indian subdivision
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.
[{...}].probabilityCalibratedNumberThe calibrated probability for subClassification to have been guessed correctly. -1 = still calibrating.
[{...}].probabilityAltCalibratedNumberThe calibrated probability for subClassification OR subClassificationAlt to have been guessed correctly. -1 = still calibrating.

Code sample:

Subclassification Indian Full Name code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianFullBatch \
--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":"Jannat Rahmani"}]}'

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Jannat Rahmani"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Jannat Rahmani",
            "countryIso2": "IN",
            "subClassification": "IN-CH",
            "subClassificationAlt": "IN-PY",
            "subclassificationTop": ["IN-CH", "IN-PY", "IN-UP", "IN-AN", "IN-RJ", "IN-JH", "IN-KL", "IN-BR", "IN-DL", "IN-UT"],
            "score": 2.5087208339960445,
            "probabilityCalibrated": 0.3684249074494664,
            "probabilityAltCalibrated": 0.4738687735374875
        }
    ]
}

Subclassification Indian Full Name code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianFullBatch")
.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\":\"Jannat Rahmani\"}]}")
.asString();

Body parameter:

{
  "personalNames": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "name": "Jannat Rahmani"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Jannat Rahmani",
            "countryIso2": "IN",
            "subClassification": "IN-CH",
            "subClassificationAlt": "IN-PY",
            "subclassificationTop": ["IN-CH", "IN-PY", "IN-UP", "IN-AN", "IN-RJ", "IN-JH", "IN-KL", "IN-BR", "IN-DL", "IN-UT"],
            "score": 2.5087208339960445,
            "probabilityCalibrated": 0.3684249074494664,
            "probabilityAltCalibrated": 0.4738687735374875
        }
    ]
}

Subclassification Indian Full Name code sample for python:

import requests

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

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

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Jannat Rahmani",
            "countryIso2": "IN",
            "subClassification": "IN-CH",
            "subClassificationAlt": "IN-PY",
            "subclassificationTop": ["IN-CH", "IN-PY", "IN-UP", "IN-AN", "IN-RJ", "IN-JH", "IN-KL", "IN-BR", "IN-DL", "IN-UT"],
            "score": 2.5087208339960445,
            "probabilityCalibrated": 0.3684249074494664,
            "probabilityAltCalibrated": 0.4738687735374875
        }
    ]
}

Subclassification Indian Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianFullBatch", {
  "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": "Jannat Rahmani"
    }
  ]
})
});

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": "Jannat Rahmani"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNames": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "name": "Jannat Rahmani",
            "countryIso2": "IN",
            "subClassification": "IN-CH",
            "subClassificationAlt": "IN-PY",
            "subclassificationTop": ["IN-CH", "IN-PY", "IN-UP", "IN-AN", "IN-RJ", "IN-JH", "IN-KL", "IN-BR", "IN-DL", "IN-UT"],
            "score": 2.5087208339960445,
            "probabilityCalibrated": 0.3684249074494664,
            "probabilityAltCalibrated": 0.4738687735374875
        }
    ]
}
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/subclassificationIndianFull/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit full name (first name and last name).
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringProvided unique identifier.
nameStringSubmitted full name.
countryIso2StringMost likely country of residence, in ISO 3166-1 alpha-2 format (always "IN").Country of residence
subClassificationStringMost likely Indian State or Union territory of residence, in ISO 3166-2 alpha-2 format.Indian subdivision
subClassificationAltStringSecond most likely Indian State or Union territory of residence, in ISO 3166-2 alpha-2 format.Indian subdivision
subclassificationTopArrayTop 10 most likely Indian State or Union territory of residence, sorted from most likely to least likely.Indian subdivision
scoreNumberHigher implies a more reliable result, score is not normalized.
probabilityCalibratedNumberThe calibrated probability for subClassification to have been guessed correctly. -1 = still calibrating.
probabilityAltCalibratedNumberThe calibrated probability for subClassification OR subClassificationAlt to have been guessed correctly. -1 = still calibrating.

Code sample:

Subclassification Indian Full Name code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianFull/Amitabh%20Bachchan \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "5dd784f2-d1d3-41b8-bba5-c064a836646b",
    "name": "Amitabh Bachchan",
    "countryIso2": "IN",
    "subClassification": "IN-CH",
    "subClassificationAlt": "IN-UT",
    "subclassificationTop": ["IN-CH", "IN-UT", "IN-AN", "IN-UP", "IN-DL", "IN-HR", "IN-RJ", "IN-HP", "IN-BR", "IN-KL"],
    "score": 8.02456285165782,
    "probabilityCalibrated": 0.5561082178046067,
    "probabilityAltCalibrated": 0.698831534498132
}

Subclassification Indian Full Name code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianFull/Amitabh%20Bachchan")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "5dd784f2-d1d3-41b8-bba5-c064a836646b",
    "name": "Amitabh Bachchan",
    "countryIso2": "IN",
    "subClassification": "IN-CH",
    "subClassificationAlt": "IN-UT",
    "subclassificationTop": ["IN-CH", "IN-UT", "IN-AN", "IN-UP", "IN-DL", "IN-HR", "IN-RJ", "IN-HP", "IN-BR", "IN-KL"],
    "score": 8.02456285165782,
    "probabilityCalibrated": 0.5561082178046067,
    "probabilityAltCalibrated": 0.698831534498132
}

Subclassification Indian Full Name code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianFull/Amitabh%20Bachchan"

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": "5dd784f2-d1d3-41b8-bba5-c064a836646b",
    "name": "Amitabh Bachchan",
    "countryIso2": "IN",
    "subClassification": "IN-CH",
    "subClassificationAlt": "IN-UT",
    "subclassificationTop": ["IN-CH", "IN-UT", "IN-AN", "IN-UP", "IN-DL", "IN-HR", "IN-RJ", "IN-HP", "IN-BR", "IN-KL"],
    "score": 8.02456285165782,
    "probabilityCalibrated": 0.5561082178046067,
    "probabilityAltCalibrated": 0.698831534498132
}

Subclassification Indian Full Name code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianFull/Amitabh%20Bachchan", {
  "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": "5dd784f2-d1d3-41b8-bba5-c064a836646b",
    "name": "Amitabh Bachchan",
    "countryIso2": "IN",
    "subClassification": "IN-CH",
    "subClassificationAlt": "IN-UT",
    "subclassificationTop": ["IN-CH", "IN-UT", "IN-AN", "IN-UP", "IN-DL", "IN-HR", "IN-RJ", "IN-HP", "IN-BR", "IN-KL"],
    "score": 8.02456285165782,
    "probabilityCalibrated": 0.5561082178046067,
    "probabilityAltCalibrated": 0.698831534498132
}

Phone number

The Namsor name analysis software has been trained to evaluate formated, as well as unformatted, phone numbers. It is able to process a first name, last name and phone number in order to establish its phone prefix and country code as well as determine the structure of the phone number and check if it is valid.

Format Phone Number

Format Phone Number feature analyzes a first name, a last name and a phone number to determine the most likely phone prefix, country of origin and formated phone number.

  • Description: Returns the most likely phone prefix, country of residence and format of up to 100 phone numbers using first names and last names.
  • Precision:Precision gauge
  • Cost: 11 credits per name.
  • Test: Format Phone Number feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesWithPhoneNumbersArray of objectsRequiredA list of personal names with phone numbers.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalFirst name (or given name).
[{...}].lastNameStringOptionalLast name (or family name).
[{...}].phoneNumberStringRequiredPhone number, formatted or unformatted.
Response
NameTypeDescriptionEnumerators
personalNamesWithPhoneNumbersArray of objectsList of formatted phone numbers.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name (or given name).
[{...}].lastNameStringSubmitted last name (or family name).
[{...}].internationalPhoneNumberVerifiedStringPositively verified phone number, in E.164 format (according to LibPhoneNumber).
[{...}].phoneCountryIso2VerifiedStringPositively verified country of origin of the phone number, in ISO 3166-1 alpha-2 format (according to LibPhoneNumber).Country of residence
[{...}].phoneCountryCodeNumberMost likely country calling code.Phone prefix
[{...}].phoneCountryCodeAltNumberSecond most likely country calling code.Phone prefix
[{...}].phoneCountryIso2StringMost likely country of origin of the phone number, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].phoneCountryIso2AltStringSecond most likely country of origin of the phone number, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].originCountryIso2StringMost likely country of residence of the name, in ISO 3166-1 alpha-2 format.Country of origin
[{...}].originCountryIso2AltStringSecond most likely country of residence of the name, in ISO 3166-1 alpha-2 format.Country of origin
[{...}].phoneNumberStringSubmitted phone number.
[{...}].verifiedBooleanIndicates if the phone number could be positively verified using LibPhoneNumber.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Format Phone Number code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNamesWithPhoneNumbers":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Jamini","lastName":"Roy","phoneNumber":"09804201420"}]}'

Body parameter:

{
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Jamini",
      "lastName": "Roy",
      "phoneNumber": "09804201420"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNamesWithPhoneNumbers": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Jamini",
            "lastName": "Roy",
            "internationalPhoneNumberVerified": "+91 98042 01420",
            "phoneCountryIso2Verified": "IN",
            "phoneCountryCode": 91,
            "phoneCountryCodeAlt": 98,
            "phoneCountryIso2": "IN",
            "phoneCountryIso2Alt": "IR",
            "originCountryIso2": "BD",
            "originCountryIso2Alt": "ID",
            "phoneNumber": "09804201420",
            "verified": true,
            "score": 7.659341221254494
        }
    ]
}

Format Phone Number code sample for java:

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

Body parameter:

{
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Jamini",
      "lastName": "Roy",
      "phoneNumber": "09804201420"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNamesWithPhoneNumbers": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Jamini",
            "lastName": "Roy",
            "internationalPhoneNumberVerified": "+91 98042 01420",
            "phoneCountryIso2Verified": "IN",
            "phoneCountryCode": 91,
            "phoneCountryCodeAlt": 98,
            "phoneCountryIso2": "IN",
            "phoneCountryIso2Alt": "IR",
            "originCountryIso2": "BD",
            "originCountryIso2Alt": "ID",
            "phoneNumber": "09804201420",
            "verified": true,
            "score": 7.659341221254494
        }
    ]
}

Format Phone Number code sample for python:

import requests

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

payload = {
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Jamini",
      "lastName": "Roy",
      "phoneNumber": "09804201420"
    }
  ]
}
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:

{
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Jamini",
      "lastName": "Roy",
      "phoneNumber": "09804201420"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNamesWithPhoneNumbers": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Jamini",
            "lastName": "Roy",
            "internationalPhoneNumberVerified": "+91 98042 01420",
            "phoneCountryIso2Verified": "IN",
            "phoneCountryCode": 91,
            "phoneCountryCodeAlt": 98,
            "phoneCountryIso2": "IN",
            "phoneCountryIso2Alt": "IR",
            "originCountryIso2": "BD",
            "originCountryIso2Alt": "ID",
            "phoneNumber": "09804201420",
            "verified": true,
            "score": 7.659341221254494
        }
    ]
}

Format Phone Number code sample for javascript:

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

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:

{
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Jamini",
      "lastName": "Roy",
      "phoneNumber": "09804201420"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNamesWithPhoneNumbers": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Jamini",
            "lastName": "Roy",
            "internationalPhoneNumberVerified": "+91 98042 01420",
            "phoneCountryIso2Verified": "IN",
            "phoneCountryCode": 91,
            "phoneCountryCodeAlt": 98,
            "phoneCountryIso2": "IN",
            "phoneCountryIso2Alt": "IR",
            "originCountryIso2": "BD",
            "originCountryIso2Alt": "ID",
            "phoneNumber": "09804201420",
            "verified": true,
            "score": 7.659341221254494
        }
    ]
}
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.

  • Description: Returns the most likely phone prefix, country of residence and format of a phone number using a first name and a last name.
  • Precision:Precision gauge
  • Cost: 11 credits per name.
  • Test: Format Phone Number feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCode/{firstName}/{lastName}/{phoneNumber}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
firstNameStringRequiredFirst name (or given name).
lastNameStringRequiredLast name (or family name).
phoneNumberStringRequiredPhone number, formatted or unformatted.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted first name.
lastNameStringSubmitted last name.
internationalPhoneNumberVerifiedStringPositively verified phone number, in E.164 format (according to LibPhoneNumber).
phoneCountryIso2VerifiedStringPositively verified country of origin of the phone number, in ISO 3166-1 alpha-2 format (according to LibPhoneNumber).Country of residence
phoneCountryCodeNumberMost likely country calling code.Phone prefix
phoneCountryCodeAltNumberSecond most likely country calling code.Phone prefix
phoneCountryIso2StringMost likely country of origin of the phone number, in ISO 3166-1 alpha-2 format.Country of residence
phoneCountryIso2AltStringSecond most likely country of origin of the phone number, in ISO 3166-1 alpha-2 format.Country of residence
originCountryIso2StringMost likely country of residence of the name, in ISO 3166-1 alpha-2 format.Country of origin
originCountryIso2AltStringSecond most likely country of residence of the name, in ISO 3166-1 alpha-2 format.Country of origin
phoneNumberStringSubmitted phone number.
verifiedBooleanIndicates if the phone number could be positively verified using LibPhoneNumber.
scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Format Phone Number code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCode/Jamini/Roy/09804201420 \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": null,
    "firstName": "Jamini",
    "lastName": "Roy",
    "internationalPhoneNumberVerified": "+91 98042 01420",
    "phoneCountryIso2Verified": "IN",
    "phoneCountryCode": 91,
    "phoneCountryCodeAlt": 98,
    "phoneCountryIso2": "IN",
    "phoneCountryIso2Alt": "IR",
    "originCountryIso2": "BD",
    "originCountryIso2Alt": "ID",
    "phoneNumber": "09804201420",
    "verified": true,
    "score": 7.659341221254624
}

Format Phone Number code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCode/Jamini/Roy/09804201420")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": null,
    "firstName": "Jamini",
    "lastName": "Roy",
    "internationalPhoneNumberVerified": "+91 98042 01420",
    "phoneCountryIso2Verified": "IN",
    "phoneCountryCode": 91,
    "phoneCountryCodeAlt": 98,
    "phoneCountryIso2": "IN",
    "phoneCountryIso2Alt": "IR",
    "originCountryIso2": "BD",
    "originCountryIso2Alt": "ID",
    "phoneNumber": "09804201420",
    "verified": true,
    "score": 7.659341221254624
}

Format Phone Number code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCode/Jamini/Roy/09804201420"

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": null,
    "firstName": "Jamini",
    "lastName": "Roy",
    "internationalPhoneNumberVerified": "+91 98042 01420",
    "phoneCountryIso2Verified": "IN",
    "phoneCountryCode": 91,
    "phoneCountryCodeAlt": 98,
    "phoneCountryIso2": "IN",
    "phoneCountryIso2Alt": "IR",
    "originCountryIso2": "BD",
    "originCountryIso2Alt": "ID",
    "phoneNumber": "09804201420",
    "verified": true,
    "score": 7.659341221254624
}

Format Phone Number code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCode/Jamini/Roy/09804201420", {
  "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": null,
    "firstName": "Jamini",
    "lastName": "Roy",
    "internationalPhoneNumberVerified": "+91 98042 01420",
    "phoneCountryIso2Verified": "IN",
    "phoneCountryCode": 91,
    "phoneCountryCodeAlt": 98,
    "phoneCountryIso2": "IN",
    "phoneCountryIso2Alt": "IR",
    "originCountryIso2": "BD",
    "originCountryIso2Alt": "ID",
    "phoneNumber": "09804201420",
    "verified": true,
    "score": 7.659341221254624
}

Format Phone Number Geo

Format Phone Number Geo feature analyzes a first name, a last name, a phone number and a local context to determine the most likely phone prefix, country of origin and formated phone number, with improved accuracy than the basic feature Format Phone Number.

  • Description: Returns the most likely phone prefix and format of up to 100 phone numbers using first names, last names and geographic context.
  • Precision:Precision gauge
  • Cost: 11 credits per name.
  • Test: Format Phone Number Geo feature.

HTTP request

http request
POST
https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeGeoBatch
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request body
NameTypeRequiredDescription
personalNamesWithPhoneNumbersArray of objectsRequiredA list of personal names with phone numbers and their local context.
[{...}].idStringOptionalUnique identifier.
[{...}].firstNameStringOptionalFirst name (or given name).
[{...}].lastNameStringOptionalLast name (or family name).
[{...}].phoneNumberStringRequiredPhone number, formatted or unformatted.
[{...}].countryIso2StringRequiredMost likely country of residence, in ISO 3166-1 alpha-2 format.
[{...}].countryIso2AltStringOptionalSecond most likely country of residence, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
personalNamesWithPhoneNumbersArray of objectsList of formatted phone numbers.
[{...}].scriptStringName of the script used for the name, in ISO 15924 format.Script
[{...}].idStringProvided unique identifier.
[{...}].firstNameStringSubmitted first name (or given name).
[{...}].lastNameStringSubmitted last name (or family name).
[{...}].internationalPhoneNumberVerifiedStringPositively verified phone number, in E.164 format (according to LibPhoneNumber).
[{...}].phoneCountryIso2VerifiedStringPositively verified country of origin of the phone number, in ISO 3166-1 alpha-2 format (according to LibPhoneNumber).Country of residence
[{...}].phoneCountryCodeNumberMost likely country calling code.Phone prefix
[{...}].phoneCountryCodeAltNumberSecond most likely country calling code.Phone prefix
[{...}].phoneCountryIso2StringMost likely country of origin of the phone number, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].phoneCountryIso2AltStringSecond most likely country of origin of the phone number, in ISO 3166-1 alpha-2 format.Country of residence
[{...}].originCountryIso2StringMost likely country of residence of the name, in ISO 3166-1 alpha-2 format.Country of origin
[{...}].originCountryIso2AltStringSecond most likely country of residence of the name, in ISO 3166-1 alpha-2 format.Country of origin
[{...}].phoneNumberStringSubmitted phone number.
[{...}].verifiedBooleanIndicates if the phone number could be positively verified using LibPhoneNumber.
[{...}].scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Format Phone Number Geo code sample for shell:

curl --request POST \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeGeoBatch \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'
--header 'Content-Type: application/json' \
--data '{"personalNamesWithPhoneNumbers":[{"id":"e630dda5-13b3-42c5-8f1d-648aa8a21c42","firstName":"Teniola","lastName":"Apata","phoneNumber":"08186472651","countryIso2":"NG","countryIso2Alt":"CI"}]}'

Body parameter:

{
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Teniola",
      "lastName": "Apata",
      "phoneNumber": "08186472651",
      "countryIso2": "NG",
      "countryIso2Alt": "CI"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNamesWithPhoneNumbers": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Teniola",
            "lastName": "Apata",
            "internationalPhoneNumberVerified": "+234 818 647 2651",
            "phoneCountryIso2Verified": "NG",
            "phoneCountryCode": 234,
            "phoneCountryCodeAlt": 62,
            "phoneCountryIso2": "NG",
            "phoneCountryIso2Alt": "ID",
            "originCountryIso2": "NG",
            "originCountryIso2Alt": "CI",
            "phoneNumber": "08186472651",
            "verified": true,
            "score": 2.362918055640346
        }
    ]
}

Format Phone Number Geo code sample for java:

HttpResponse<String> response = Unirest.post("https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeGeoBatch")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body("{\"personalNamesWithPhoneNumbers\":[{\"id\":\"e630dda5-13b3-42c5-8f1d-648aa8a21c42\",\"firstName\":\"Teniola\",\"lastName\":\"Apata\",\"phoneNumber\":\"08186472651\",\"countryIso2\":\"NG\",\"countryIso2Alt\":\"CI\"}]}")
.asString();

Body parameter:

{
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Teniola",
      "lastName": "Apata",
      "phoneNumber": "08186472651",
      "countryIso2": "NG",
      "countryIso2Alt": "CI"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNamesWithPhoneNumbers": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Teniola",
            "lastName": "Apata",
            "internationalPhoneNumberVerified": "+234 818 647 2651",
            "phoneCountryIso2Verified": "NG",
            "phoneCountryCode": 234,
            "phoneCountryCodeAlt": 62,
            "phoneCountryIso2": "NG",
            "phoneCountryIso2Alt": "ID",
            "originCountryIso2": "NG",
            "originCountryIso2Alt": "CI",
            "phoneNumber": "08186472651",
            "verified": true,
            "score": 2.362918055640346
        }
    ]
}

Format Phone Number Geo code sample for python:

import requests

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

payload = {
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Teniola",
      "lastName": "Apata",
      "phoneNumber": "08186472651",
      "countryIso2": "NG",
      "countryIso2Alt": "CI"
    }
  ]
}
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:

{
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Teniola",
      "lastName": "Apata",
      "phoneNumber": "08186472651",
      "countryIso2": "NG",
      "countryIso2Alt": "CI"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNamesWithPhoneNumbers": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Teniola",
            "lastName": "Apata",
            "internationalPhoneNumberVerified": "+234 818 647 2651",
            "phoneCountryIso2Verified": "NG",
            "phoneCountryCode": 234,
            "phoneCountryCodeAlt": 62,
            "phoneCountryIso2": "NG",
            "phoneCountryIso2Alt": "ID",
            "originCountryIso2": "NG",
            "originCountryIso2Alt": "CI",
            "phoneNumber": "08186472651",
            "verified": true,
            "score": 2.362918055640346
        }
    ]
}

Format Phone Number Geo code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeGeoBatch", {
  "method": "POST",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Teniola",
      "lastName": "Apata",
      "phoneNumber": "08186472651",
      "countryIso2": "NG",
      "countryIso2Alt": "CI"
    }
  ]
})
});

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:

{
  "personalNamesWithPhoneNumbers": [
    {
      "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
      "firstName": "Teniola",
      "lastName": "Apata",
      "phoneNumber": "08186472651",
      "countryIso2": "NG",
      "countryIso2Alt": "CI"
    }
  ]
}

The above command returns JSON structured like this:

{
    "personalNamesWithPhoneNumbers": [
        {
            "script": "LATIN",
            "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
            "firstName": "Teniola",
            "lastName": "Apata",
            "internationalPhoneNumberVerified": "+234 818 647 2651",
            "phoneCountryIso2Verified": "NG",
            "phoneCountryCode": 234,
            "phoneCountryCodeAlt": 62,
            "phoneCountryIso2": "NG",
            "phoneCountryIso2Alt": "ID",
            "originCountryIso2": "NG",
            "originCountryIso2Alt": "CI",
            "phoneNumber": "08186472651",
            "verified": true,
            "score": 2.362918055640346
        }
    ]
}
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.

  • Description: Returns the most likely phone prefix and format of a phone number using a first name, last name and geographic context.
  • Precision:Precision gauge
  • Cost: 11 credits per name.
  • Test: Format Phone Number Geo feature.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeGeo/{firstName}/{lastName}/{phoneNumber}/{countryIso2}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
firstNameStringRequiredFirst name (or given name).
lastNameStringRequiredLast name (or family name).
phoneNumberStringRequiredPhone number, formatted or unformatted.
countryIso2StringRequiredLocal context, in ISO 3166-1 alpha-2 format.
Response
NameTypeDescriptionEnumerators
scriptStringName of the script used for the name, in ISO 15924 format.Script
idStringUnique identifier.
firstNameStringSubmitted first name.
lastNameStringSubmitted last name.
internationalPhoneNumberVerifiedStringPositively verified phone number, in E.164 format (according to LibPhoneNumber).
phoneCountryIso2VerifiedStringPositively verified country of origin of the phone number, in ISO 3166-1 alpha-2 format (according to LibPhoneNumber).Country of residence
phoneCountryCodeNumberMost likely country calling code.Phone prefix
phoneCountryCodeAltNumberSecond most likely country calling code.Phone prefix
phoneCountryIso2StringMost likely country of origin of the phone number, in ISO 3166-1 alpha-2 format.Country of residence
phoneCountryIso2AltStringSecond most likely country of origin of the phone number, in ISO 3166-1 alpha-2 format.Country of residence
originCountryIso2StringMost likely country of residence of the name, in ISO 3166-1 alpha-2 format.Country of origin
originCountryIso2AltStringSecond most likely country of residence of the name, in ISO 3166-1 alpha-2 format.Country of origin
phoneNumberStringSubmitted phone number.
verifiedBooleanIndicates if the phone number could be positively verified using LibPhoneNumber.
scoreNumberHigher implies a more reliable result, score is not normalized.

Code sample:

Format Phone Number Geo code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeGeo/Teniola/Apata/08186472651/NG \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": null,
    "firstName": "Teniola",
    "lastName": "Apata",
    "internationalPhoneNumberVerified": "+234 818 647 2651",
    "phoneCountryIso2Verified": "NG",
    "phoneCountryCode": 234,
    "phoneCountryCodeAlt": 62,
    "phoneCountryIso2": "NG",
    "phoneCountryIso2Alt": "ID",
    "originCountryIso2": "NG",
    "originCountryIso2Alt": "CI",
    "phoneNumber": "08186472651",
    "verified": true,
    "score": 2.362918055640346
}

Format Phone Number Geo code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeGeo/Teniola/Apata/08186472651/NG")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": null,
    "firstName": "Teniola",
    "lastName": "Apata",
    "internationalPhoneNumberVerified": "+234 818 647 2651",
    "phoneCountryIso2Verified": "NG",
    "phoneCountryCode": 234,
    "phoneCountryCodeAlt": 62,
    "phoneCountryIso2": "NG",
    "phoneCountryIso2Alt": "ID",
    "originCountryIso2": "NG",
    "originCountryIso2Alt": "CI",
    "phoneNumber": "08186472651",
    "verified": true,
    "score": 2.362918055640346
}

Format Phone Number Geo code sample for python:

import requests

url = "https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeGeo/Teniola/Apata/08186472651/NG"

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": null,
    "firstName": "Teniola",
    "lastName": "Apata",
    "internationalPhoneNumberVerified": "+234 818 647 2651",
    "phoneCountryIso2Verified": "NG",
    "phoneCountryCode": 234,
    "phoneCountryCodeAlt": 62,
    "phoneCountryIso2": "NG",
    "phoneCountryIso2Alt": "ID",
    "originCountryIso2": "NG",
    "originCountryIso2Alt": "CI",
    "phoneNumber": "08186472651",
    "verified": true,
    "score": 2.362918055640346
}

Format Phone Number Geo code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/phoneCodeGeo/Teniola/Apata/08186472651/NG", {
  "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": null,
    "firstName": "Teniola",
    "lastName": "Apata",
    "internationalPhoneNumberVerified": "+234 818 647 2651",
    "phoneCountryIso2Verified": "NG",
    "phoneCountryCode": 234,
    "phoneCountryCodeAlt": 62,
    "phoneCountryIso2": "NG",
    "phoneCountryIso2Alt": "ID",
    "originCountryIso2": "NG",
    "originCountryIso2Alt": "CI",
    "phoneNumber": "08186472651",
    "verified": true,
    "score": 2.362918055640346
}

Admin

The Admin endpoints allow you to access a wide range of administrative tools. Access your API usage history, check the status and availability of Namsor's endpoints or query the possible enumerators for a given classifier. Among other features you may also set your privacy options or disable your key.

Software Version

GET
  • Description: Returns the current version of the Namsor software.
  • Cost: 1 credit per name.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/softwareVersion
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Response
NameTypeDescription
softwareNameAndVersionStringName and version of the API.
softwareVersionArraySoftware version, as an array (major, minor and patch).

Code sample:

Software Version code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/softwareVersion \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "softwareNameAndVersion": "NamSorAPIv2.0.14B01",
    "softwareVersion": [
        2,
        0,
        14
    ]
}

Software Version code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/softwareVersion")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "softwareNameAndVersion": "NamSorAPIv2.0.14B01",
    "softwareVersion": [
        2,
        0,
        14
    ]
}

Software Version code sample for python:

import requests

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

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:

{
    "softwareNameAndVersion": "NamSorAPIv2.0.14B01",
    "softwareVersion": [
        2,
        0,
        14
    ]
}

Software Version code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/softwareVersion", {
  "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:

{
    "softwareNameAndVersion": "NamSorAPIv2.0.14B01",
    "softwareVersion": [
        2,
        0,
        14
    ]
}

Api Status

GET
  • Description: Returns the current version of the Namsor software and the status of the classifiers (API services).
  • Cost: 1 credit per name.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/apiStatus
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Response
NameTypeDescription
softwareVersionObjectSoftware version information.
{...}.softwareNameAndVersionStringName and version of the API.
{...}.softwareVersionArraySoftware version, as an array (major, minor and patch).
classifiersArray of objectsList of available classifiers.
[{...}].classifierNameStringName of the classifier / service.
[{...}].servingBooleanTrue if the classifier is serving requests (has reached minimal learning, is not shutting down).
[{...}].learningBooleanTrue if the classifier is learning.
[{...}].shuttingDownBooleanTrue if the classifier is shutting down.
[{...}].probabilityCalibratedBooleanTrue if the classifier has finished the initial learning and has calibrated probabilities (during initial learning, calibrated probabilities will be equal to -1).

Code sample:

Api Status code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/apiStatus \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "softwareVersion": {
        "softwareNameAndVersion": "NamSorAPIv2.0.14B01",
        "softwareVersion": [
            2,
            0,
            14
        ]
    },
    "classifiers": [
        {
            "classifierName": "name_category",
            "serving": true,
            "learning": true,
            "shuttingDown": false,
            "probabilityCalibrated": false
        },
        {
            "classifierName": "personalname_gender",
            "serving": true,
            "learning": true,
            "shuttingDown": false,
            "probabilityCalibrated": true
        }
    ]
}

Api Status code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/apiStatus")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "softwareVersion": {
        "softwareNameAndVersion": "NamSorAPIv2.0.14B01",
        "softwareVersion": [
            2,
            0,
            14
        ]
    },
    "classifiers": [
        {
            "classifierName": "name_category",
            "serving": true,
            "learning": true,
            "shuttingDown": false,
            "probabilityCalibrated": false
        },
        {
            "classifierName": "personalname_gender",
            "serving": true,
            "learning": true,
            "shuttingDown": false,
            "probabilityCalibrated": true
        }
    ]
}

Api Status code sample for python:

import requests

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

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:

{
    "softwareVersion": {
        "softwareNameAndVersion": "NamSorAPIv2.0.14B01",
        "softwareVersion": [
            2,
            0,
            14
        ]
    },
    "classifiers": [
        {
            "classifierName": "name_category",
            "serving": true,
            "learning": true,
            "shuttingDown": false,
            "probabilityCalibrated": false
        },
        {
            "classifierName": "personalname_gender",
            "serving": true,
            "learning": true,
            "shuttingDown": false,
            "probabilityCalibrated": true
        }
    ]
}

Api Status code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/apiStatus", {
  "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:

{
    "softwareVersion": {
        "softwareNameAndVersion": "NamSorAPIv2.0.14B01",
        "softwareVersion": [
            2,
            0,
            14
        ]
    },
    "classifiers": [
        {
            "classifierName": "name_category",
            "serving": true,
            "learning": true,
            "shuttingDown": false,
            "probabilityCalibrated": false
        },
        {
            "classifierName": "personalname_gender",
            "serving": true,
            "learning": true,
            "shuttingDown": false,
            "probabilityCalibrated": true
        }
    ]
}

Available Services

GET
  • Description: Returns a list of the API services (classifiers) and their usage costs in credits.
  • Cost: 1 credit per name.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/apiServices
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Response
NameTypeDescription
apiServicesArray of objectsList of available API services.
[{...}].serviceNameStringName of the classifier / service.
[{...}].serviceGroupStringGroup the classifier / service belong to.
[{...}].costInUnitsNumberUsage cost of the service, in credits.

Code sample:

Available Services code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/apiServices \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "apiServices": [
        {
            "serviceName": "name_category",
            "serviceGroup": "general",
            "costInUnits": 1
        },
        {
            "serviceName": "personalname_gender",
            "serviceGroup": "gender",
            "costInUnits": 1
        }
    ]
}

Available Services code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/apiServices")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "apiServices": [
        {
            "serviceName": "name_category",
            "serviceGroup": "general",
            "costInUnits": 1
        },
        {
            "serviceName": "personalname_gender",
            "serviceGroup": "gender",
            "costInUnits": 1
        }
    ]
}

Available Services code sample for python:

import requests

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

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:

{
    "apiServices": [
        {
            "serviceName": "name_category",
            "serviceGroup": "general",
            "costInUnits": 1
        },
        {
            "serviceName": "personalname_gender",
            "serviceGroup": "gender",
            "costInUnits": 1
        }
    ]
}

Available Services code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/apiServices", {
  "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:

{
    "apiServices": [
        {
            "serviceName": "name_category",
            "serviceGroup": "general",
            "costInUnits": 1
        },
        {
            "serviceName": "personalname_gender",
            "serviceGroup": "gender",
            "costInUnits": 1
        }
    ]
}

Taxonomy Classes

GET
  • Description: Returns a list of the possible enumerators for a given classifier.
  • Cost: 1 credit per name.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/taxonomyClasses/{classifierName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Request parameters
NameTypeRequiredDescription
classifierNameStringRequiredName of the classifier.
Response
NameTypeDescription
classifierNameStringName of the submitted classifier.
taxonomyClassesArrayPossible enumerators for this classifier.

Code sample:

Taxonomy Classes code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/taxonomyClasses/personalname_gender \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "classifierName": "personalname_gender",
    "taxonomyClasses": ["female", "male"]
}

Taxonomy Classes code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/taxonomyClasses/personalname_gender")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "classifierName": "personalname_gender",
    "taxonomyClasses": ["female", "male"]
}

Taxonomy Classes code sample for python:

import requests

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

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:

{
    "classifierName": "personalname_gender",
    "taxonomyClasses": ["female", "male"]
}

Taxonomy Classes code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/taxonomyClasses/personalname_gender", {
  "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:

{
    "classifierName": "personalname_gender",
    "taxonomyClasses": ["female", "male"]
}

Api Usage

GET
  • Description: Returns information on your subscription plan, billing period and current API usage.
  • Cost: 1 credit per name.

HTTP request

http request
GET
https://v2.namsor.com/NamSorAPIv2/api2/json/apiUsage
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
Response
NameTypeDescription
subscriptionObjectSubscription information.
{...}.apiKeyStringYour Namsor API key.
{...}.planStartedNumberStart date of the plan, in UNIX time format.
{...}.priorPlanStartedNumberDatetime when the user subscribed to the prior plan.
{...}.planEndedNumberEnd date of the plan, in UNIX time format.
{...}.taxRateNumberApplicable tax rate for the plan.
{...}.planNameStringName of the plan.
{...}.planBaseFeesKeyStringCurrent plan key (as in Stripe product).
{...}.planStatusStringPlan status.
{...}.planQuotaNumberTotal number of credits associated with this plan.
{...}.priceUSDNumberPrice in US dollars ($).
{...}.priceOverageUSDNumberOverage price in US dollars ($).
{...}.priceNumberPrice in the user's preferred currency.
{...}.priceOverageNumberOveraged price in the user's preferred currency.
{...}.currencyStringThe user's preferred currency.
{...}.currencyFactorNumberFor USD, GBP, EUR - the factor is 1.
{...}.stripeCustomerIdStringUnique Stripe Customer identifier.
{...}.stripeStatusStringStripe status.
{...}.stripeSubscriptionStringStripe subscription identifier.
{...}.userIdStringUnique user identifier.
billingPeriodObjectBilling information.
{...}.apiKeyStringYour Namsor API key.
{...}.subscriptionStartedNumberSubscription start date, in UNIX time format.
{...}.periodStartedNumberSubscription period start date, in UNIX time format.
{...}.periodEndedNumberSubscription end date, in UNIX time format.
{...}.stripeCurrentPeriodEndNumberEnd of the current plan in Stripe.
{...}.stripeCurrentPeriodStartNumberStart of the current plan in Stripe.
{...}.billingStatusStringStatus of the current period billing.
{...}.usageNumberNumber of credits used so far.
{...}.softLimitNumberCurrent soft limit for the period.
{...}.hardLimitNumberCurrent hard limit for the period.
overageExclTaxNumberOverage amount excluding tax.
overageInclTaxNumberOverage amount including tax (if applicable).
overageCurrencyStringCurrency of the overage amount.
overageQuantityNumberQuantity above monthly quota of the current subscritpion, in credits.

Code sample:

Api Usage code sample for shell:

curl --request GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/apiUsage \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "subscription": {
        "apiKey": "v7menlws2yo8r2mnm10f3uai53tmblth",
        "planStarted": 1602705605199,
        "priorPlanStarted": 0,
        "planEnded": 0,
        "taxRate": 0,
        "planName": "BASIC",
        "planBaseFeesKey": "namsorapi_v2_BASIC_usd",
        "planStatus": "OPEN",
        "planQuota": 5000,
        "priceUSD": 0,
        "priceOverageUSD": 0.005,
        "price": 0,
        "priceOverage": 0.005,
        "currency": "usd",
        "currencyFactor": 1,
        "stripeCustomerId": null,
        "stripeStatus": null,
        "stripeSubscription": null,
        "userId": "GYUAUzTKPusJ3aqUH5gQte0dOQCr"
    },
    "billingPeriod": {
        "apiKey": "v7menlws2yo8r2mnm10f3uai53tmblth",
        "subscriptionStarted": 1602705635199,
        "periodStarted": 1618430435199,
        "periodEnded": 0,
        "stripeCurrentPeriodEnd": 0,
        "stripeCurrentPeriodStart": 0,
        "billingStatus": "OPEN",
        "usage": 34,
        "softLimit": 3000,
        "hardLimit": 5000
    },
    "overageExclTax": 0,
    "overageInclTax": 0,
    "overageCurrency": null,
    "overageQuantity": 0
}

Api Usage code sample for java:

HttpResponse<String> response = Unirest.get("https://v2.namsor.com/NamSorAPIv2/api2/json/apiUsage")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "subscription": {
        "apiKey": "v7menlws2yo8r2mnm10f3uai53tmblth",
        "planStarted": 1602705605199,
        "priorPlanStarted": 0,
        "planEnded": 0,
        "taxRate": 0,
        "planName": "BASIC",
        "planBaseFeesKey": "namsorapi_v2_BASIC_usd",
        "planStatus": "OPEN",
        "planQuota": 5000,
        "priceUSD": 0,
        "priceOverageUSD": 0.005,
        "price": 0,
        "priceOverage": 0.005,
        "currency": "usd",
        "currencyFactor": 1,
        "stripeCustomerId": null,
        "stripeStatus": null,
        "stripeSubscription": null,
        "userId": "GYUAUzTKPusJ3aqUH5gQte0dOQCr"
    },
    "billingPeriod": {
        "apiKey": "v7menlws2yo8r2mnm10f3uai53tmblth",
        "subscriptionStarted": 1602705635199,
        "periodStarted": 1618430435199,
        "periodEnded": 0,
        "stripeCurrentPeriodEnd": 0,
        "stripeCurrentPeriodStart": 0,
        "billingStatus": "OPEN",
        "usage": 34,
        "softLimit": 3000,
        "hardLimit": 5000
    },
    "overageExclTax": 0,
    "overageInclTax": 0,
    "overageCurrency": null,
    "overageQuantity": 0
}

Api Usage code sample for python:

import requests

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

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:

{
    "subscription": {
        "apiKey": "v7menlws2yo8r2mnm10f3uai53tmblth",
        "planStarted": 1602705605199,
        "priorPlanStarted": 0,
        "planEnded": 0,
        "taxRate": 0,
        "planName": "BASIC",
        "planBaseFeesKey": "namsorapi_v2_BASIC_usd",
        "planStatus": "OPEN",
        "planQuota": 5000,
        "priceUSD": 0,
        "priceOverageUSD": 0.005,
        "price": 0,
        "priceOverage": 0.005,
        "currency": "usd",
        "currencyFactor": 1,
        "stripeCustomerId": null,
        "stripeStatus": null,
        "stripeSubscription": null,
        "userId": "GYUAUzTKPusJ3aqUH5gQte0dOQCr"
    },
    "billingPeriod": {
        "apiKey": "v7menlws2yo8r2mnm10f3uai53tmblth",
        "subscriptionStarted": 1602705635199,
        "periodStarted": 1618430435199,
        "periodEnded": 0,
        "stripeCurrentPeriodEnd": 0,
        "stripeCurrentPeriodStart": 0,
        "billingStatus": "OPEN",
        "usage": 34,
        "softLimit": 3000,
        "hardLimit": 5000
    },
    "overageExclTax": 0,
    "overageInclTax": 0,
    "overageCurrency": null,
    "overageQuantity": 0
}

Api Usage code sample for javascript:

const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/apiUsage", {
  "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:

{
    "subscription": {
        "apiKey": "v7menlws2yo8r2mnm10f3uai53tmblth",
        "planStarted": 1602705605199,
        "priorPlanStarted": 0,
        "planEnded": 0,
        "taxRate": 0,
        "planName": "BASIC",
        "planBaseFeesKey": "namsorapi_v2_BASIC_usd",
        "planStatus": "OPEN",
        "planQuota": 5000,
        "priceUSD": 0,
        "priceOverageUSD": 0.005,
        "price": 0,
        "priceOverage": 0.005,
        "currency": "usd",
        "currencyFactor": 1,
        "stripeCustomerId": null,
        "stripeStatus": null,
        "stripeSubscription": null,
        "userId": "GYUAUzTKPusJ3aqUH5gQte0dOQCr"
    },
    "billingPeriod": {
        "apiKey": "v7menlws2yo8r2mnm10f3uai53tmblth",
        "subscriptionStarted": 1602705635199,
        "periodStarted": 1618430435199,
        "periodEnded": 0,
        "stripeCurrentPeriodEnd": 0,
        "stripeCurrentPeriodStart": 0,
        "billingStatus": "OPEN",
        "usage": 34,
        "softLimit": 3000,
        "hardLimit": 5000
    },
    "overageExclTax": 0,
    "overageInclTax": 0,
    "overageCurrency": null,
    "overageQuantity": 0
}