Namsor

Indian names API – Identify a caste group or religion

Namsor's Indian Names API offers precise insights into the caste group, religion, and state or union territory of residence associated with Indian names. Whether you provide a full name or separate first and last names, our API seamlessly adapts to your data format, ensuring smooth integration into your systems.


By analyzing naming patterns and regional information, this API can classify individuals into one of the four primary caste groups: Scheduled Castes (SC), Scheduled Tribes (ST), Other Backward Classes (OBC), or General. The API also identifies the most probable religion among seven major Indian religions: Hinduism, Islam, Christianity, Sikhism, Buddhism, Jainism, and Parsi. It further determines the likely state or union territory of residence within India. This comprehensive analysis is invaluable for researchers, policymakers, and organizations seeking to understand India's diverse social fabric.

600+Research contributions

99.99%Names availability

11B billionsNames processed

,

Caste Indian Name

Caste group from first name (optional), last name (optional), state .

{
    "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 analyzes a first name, last name, and an Indian state or Union territory of residence to determine the person's most likely caste group. Providing both names improves the accuracy of the prediction.

  • Cost: 10 credits per name.
  • Description: Returns the caste from first names, last names and territories of residence.
  • More about: Caste Indian Name

HTTP request

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

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

Request body
NameTypeRequiredDescription
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
        }
    ]
}
  • Cost: 10 credits per name.
  • Description: Returns the caste from a first name, a last name and a territory of residence.
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/castegroupIndian/{subdivisionIso}/{firstName}/{lastName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
information

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

Request parameters
NameTypeRequiredDescription
firstNameStringRequiredIndian first name, given name, nickname.
lastNameStringRequiredIndian last name, family name, surname.
subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
Response
NameTypeDescriptionEnumerators
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 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",
    "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.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",
    "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/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",
    "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/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",
    "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 Full Name

Caste group from full name , state .

{
    "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 analyzes an unsplit Indian full name along with a state or Union territory of residence to identify the person's most likely caste group.

information

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

  • Cost: 10 credits per name.
  • Description: Returns the caste from unsplit Indian full names and territories of residence.
  • More about: Caste Indian Full Name

HTTP request

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

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

Request body
NameTypeRequiredDescription
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
        }
    ]
}
  • Cost: 10 credits per name.
  • Description: Returns the caste from an unsplit Indian full name and a territory of residence.
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/castegroupIndianFull/{subdivisionIso}/{name}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
information

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

Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit Indian full name (first name and last name).
subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
Response
NameTypeDescriptionEnumerators
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 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",
    "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.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",
    "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/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",
    "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/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",
    "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
}

Religion Indian Name

Religion from first name (optional), last name (optional), state .

{
    "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 analyzes a first name, last name, and an Indian state or Union territory of residence to determine the person's most likely religion. Accuracy is improved when both names are provided.

  • Cost: 10 credits per name.
  • Description: Returns religion from Indian first and last names and territories of origin.
  • More about: Religion Indian Name

HTTP request

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

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

Request body
NameTypeRequiredDescription
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
        }
    ]
}
  • Cost: 10 credits per name.
  • Description: Returns the religion from a first name, a last name and a territory of residence.
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/religionIndian/{subdivisionIso}/{firstName}/{lastName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
information

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

Request parameters
NameTypeRequiredDescription
firstNameStringRequiredIndian first name, given name, nickname.
lastNameStringRequiredIndian last name, family name, surname.
subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
Response
NameTypeDescriptionEnumerators
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 GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndian/IN-PB/Akash/Sharma \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "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.get("https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndian/IN-PB/Akash/Sharma")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "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/religionIndian/IN-PB/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",
    "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/religionIndian/IN-PB/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",
    "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 Full Name

Religion from full name , state .

{
    "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 analyzes an unsplit Indian full name along with a state or Union territory of residence to determine the person's most likely religion.

information

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

  • Cost: 10 credits per name.
  • Description: Returns religion from unsplit Indian full names and territories of origin.
  • More about: Religion Indian Full Name

HTTP request

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

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

Request body
NameTypeRequiredDescription
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
        }
    ]
}
  • Cost: 10 credits per name.
  • Description: Returns the religion from an unsplit Indian full name and a territory of residence.
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
information

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

Request parameters
NameTypeRequiredDescription
nameStringRequiredUnsplit Indian full name (first name and last name).
subdivisionIsoStringRequiredIndian state or Union territory (origin or residence), in ISO 3166-2 format.
Response
NameTypeDescriptionEnumerators
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 GET \ 
--url https://v2.namsor.com/NamSorAPIv2/api2/json/religionIndianFull/IN-PB/Akash%20Sharma \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "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-PB/Akash%20Sharma")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "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-PB/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",
    "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/religionIndianFull/IN-PB/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",
    "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
}

Subclassification Indian Name

Indian State or Union territory from first name (optional), last name (optional).

{
    "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 estimates the most likely State or Union territory of residence (in ISO 3166-2 alpha-2 format) based on a first name, last name, or both. It offers slightly better accuracy than Subclassification Indian Full Name.

  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Description: Returns the most likely Indian State or Union territory of residence of up to 100 Indian first names and/or last names.
  • More about: Subclassification Indian Name

HTTP request

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

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

Request body
NameTypeRequiredDescription
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
        }
    ]
}
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Description: Returns the most likely Indian State or Union territory of residence from a first name and/or a last name.
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/subclassificationIndian/{firstName}/{lastName}
Request header
PropertyRequiredDescription
X-API-KEYRequiredYour Namsor's services API key
information

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

Request parameters
NameTypeRequiredDescription
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.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/Jannat/Rahmani \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "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.get("https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndian/Jannat/Rahmani")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "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/subclassificationIndian/Jannat/Rahmani"

headers = {
  "X-API-KEY": "your-api-key",
 "Accept": "application/json"
}

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "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/subclassificationIndian/Jannat/Rahmani", {
  "method": "GET",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json"
  }
});

if (response.ok) {
  const data = await response.json(); // Extract JSON data from response
  console.log(data); // View data in the console
} else {
  console.error("The request failed with status:", response.status, response);
}

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "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 Full Name

Indian State or Union territory from full name .

{
    "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 analyzes an unsplit full name (first and last name combined) to determine the person's most likely State or Union territory of residence, returned 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.

  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Description: Returns the most likely Indian State or Union territory of residence of up to 100 unsplit full names.
  • More about: Subclassification Indian Full Name

HTTP request

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

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

Request body
NameTypeRequiredDescription
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
        }
    ]
}
  • Precision:Precision gauge
  • Cost: 10 credits per name.
  • Description: Returns the most likely Indian State or Union territory of residence of an unsplit full name.
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
information

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

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.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/Jannat%20Rahmani \
--header 'X-API-KEY: your-api-key' \
--header 'Accept: application/json'

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "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.get("https://v2.namsor.com/NamSorAPIv2/api2/json/subclassificationIndianFull/Jannat%20Rahmani")
.header("X-API-KEY", "your-api-key")
.header("Accept", "application/json")
.asString();

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "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/subclassificationIndianFull/Jannat%20Rahmani"

headers = {
  "X-API-KEY": "your-api-key",
 "Accept": "application/json"
}

response = requests.request("GET", url, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "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/subclassificationIndianFull/Jannat%20Rahmani", {
  "method": "GET",
  "headers": {
    "X-API-KEY": "your-api-key",
    "Accept": "application/json"
  }
});

if (response.ok) {
  const data = await response.json(); // Extract JSON data from response
  console.log(data); // View data in the console
} else {
  console.error("The request failed with status:", response.status, response);
}

The above command returns JSON structured like this:

{
    "script": "LATIN",
    "id": "e630dda5-13b3-42c5-8f1d-648aa8a21c42",
    "name": "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
}