Skip to content

NamSor API v2 API

by namsor.com

API keyHTTPSText Analysis
Open documentation ↗

Overview

NamSor API v2 : enpoints to process personal names (gender, cultural origin or ethnicity) in all alphabets or languages. By default, enpoints use 1 unit per name (ex. Gender), but Ethnicity classification uses 10 to 20 units per name depending on taxonomy. Use GET methods for small tests, but prefer POST methods for higher throughput (batch processing of up to 100 names at a time). Need something you can't find here? We have many more features coming soon. Let us know, we'll do our best to add it!

NamSor API v2 is a text analysis API from namsor.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 84 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Base URL
https://v2.namsor.com/NamSorAPIv2
Version
2.0.24
Endpoints
84
Spec updated
2023-03-06

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://v2.namsor.com/NamSorAPIv2/api2/json/apiKeyInfo" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://v2.namsor.com/NamSorAPIv2/api2/json/apiKeyInfo", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://v2.namsor.com/NamSorAPIv2/api2/json/apiKeyInfo",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/api2/json/anonymize/{source}/{anonymized}/{token}Activate/deactivate anonymization for a source.
GET/api2/json/apiKeyInfoRead API Key info.
GET/api2/json/apiServicesList of classification services and usage cost in Units per classification (default is 1=ONE Unit). Some API endpoints (ex. Corridor) combine multiple classifie
GET/api2/json/apiStatusPrints the current status of the classifiers. A classifier name in apiStatus corresponds to a service name in apiServices.
GET/api2/json/apiUsagePrint current API usage.
GET/api2/json/apiUsageHistoryPrint historical API usage.
GET/api2/json/apiUsageHistoryAggregatePrint historical API usage (in an aggregated view, by service, by day/hour/min).
GET/api2/json/castegroupIndianFull/{subDivisionIso31662}/{personalNameFull}[USES 10 UNITS PER NAME] Infer the likely Indian name castegroup of a personal full name.
POST/api2/json/castegroupIndianFullBatch[USES 10 UNITS PER NAME] Infer the likely Indian name castegroup of up to 100 personal full names.
GET/api2/json/chineseNameCandidates/{chineseSurnameLatin}/{chineseGivenNameLatin}Identify Chinese name candidates, based on the romanized name ex. Wang Xiaoming
POST/api2/json/chineseNameCandidatesBatchIdentify Chinese name candidates, based on the romanized name (firstName = chineseGivenName; lastName=chineseSurname), ex. Wang Xiaoming
POST/api2/json/chineseNameCandidatesGenderBatchIdentify Chinese name candidates, based on the romanized name (firstName = chineseGivenName; lastName=chineseSurname) ex. Wang Xiaoming.
GET/api2/json/chineseNameGenderCandidates/{chineseSurnameLatin}/{chineseGivenNameLatin}/{knownGender}Identify Chinese name candidates, based on the romanized name ex. Wang Xiaoming - having a known gender ('male' or 'female')
GET/api2/json/chineseNameMatch/{chineseSurnameLatin}/{chineseGivenNameLatin}/{chineseName}Return a score for matching Chinese name ex. 王晓明 with a romanized name ex. Wang Xiaoming
POST/api2/json/chineseNameMatchBatchIdentify Chinese name candidates, based on the romanized name (firstName = chineseGivenName; lastName=chineseSurname), ex. Wang Xiaoming
GET/api2/json/corridor/{countryIso2From}/{firstNameFrom}/{lastNameFrom}/{countryIso2To}/{firstNameTo}/{lastNameTo}[USES 20 UNITS PER NAME COUPLE] Infer several classifications for a cross border interaction between names (ex. remit, travel, intl com)
POST/api2/json/corridorBatch[USES 20 UNITS PER NAME PAIR] Infer several classifications for up to 100 cross border interaction between names (ex. remit, travel, intl com)
GET/api2/json/country/{personalNameFull}[USES 10 UNITS PER NAME] Infer the likely country of residence of a personal full name, or one surname. Assumes names as they are in the country of residence OR
POST/api2/json/countryBatch[USES 10 UNITS PER NAME] Infer the likely country of residence of up to 100 personal full names, or surnames. Assumes names as they are in the country of reside
GET/api2/json/diaspora/{countryIso2}/{firstName}/{lastName}[USES 20 UNITS PER NAME] Infer the likely ethnicity/diaspora of a personal name, given a country of residence ISO2 code (ex. US, CA, AU, NZ etc.)
POST/api2/json/diasporaBatch[USES 20 UNITS PER NAME] Infer the likely ethnicity/diaspora of up to 100 personal names, given a country of residence ISO2 code (ex. US, CA, AU, NZ etc.)
GET/api2/json/gender/{firstName}Infer the likely gender of a just a fiven name, assuming default 'US' local context. Please use preferably full names and local geographic context for better ac
GET/api2/json/gender/{firstName}/{lastName}Infer the likely gender of a name.
POST/api2/json/genderBatchInfer the likely gender of up to 100 names, detecting automatically the cultural context.
GET/api2/json/genderChineseName/{chineseName}Infer the likely gender of a Chinese full name ex. 王晓明
POST/api2/json/genderChineseNameBatchInfer the likely gender of up to 100 full names ex. 王晓明
GET/api2/json/genderChineseNamePinyin/{chineseSurnameLatin}/{chineseGivenNameLatin}Infer the likely gender of a Chinese name in LATIN (Pinyin).
POST/api2/json/genderChineseNamePinyinBatchInfer the likely gender of up to 100 Chinese names in LATIN (Pinyin).
GET/api2/json/genderFull/{fullName}Infer the likely gender of a full name, ex. John H. Smith
POST/api2/json/genderFullBatchInfer the likely gender of up to 100 full names, detecting automatically the cultural context.
GET/api2/json/genderFullGeo/{fullName}/{countryIso2}Infer the likely gender of a full name, given a local context (ISO2 country code).
POST/api2/json/genderFullGeoBatchInfer the likely gender of up to 100 full names, with a given cultural context (country ISO2 code).
GET/api2/json/genderGeo/{firstName}/{lastName}/{countryIso2}Infer the likely gender of a name, given a local context (ISO2 country code).
POST/api2/json/genderGeoBatchInfer the likely gender of up to 100 names, each given a local context (ISO2 country code).
GET/api2/json/genderJapaneseName/{japaneseSurname}/{japaneseGivenName}Infer the likely gender of a Japanese name in LATIN (Pinyin).
POST/api2/json/genderJapaneseNameBatchInfer the likely gender of up to 100 Japanese names in LATIN (Pinyin).
GET/api2/json/genderJapaneseNameFull/{japaneseName}Infer the likely gender of a Japanese full name ex. 王晓明
POST/api2/json/genderJapaneseNameFullBatchInfer the likely gender of up to 100 full names
POST/api2/json/japaneseNameGenderKanjiCandidatesBatchIdentify japanese name candidates in KANJI, based on the romanized name (firstName = japaneseGivenName; lastName=japaneseSurname) with KNOWN gender, ex. Yamamot
GET/api2/json/japaneseNameKanjiCandidates/{japaneseSurnameLatin}/{japaneseGivenNameLatin}Identify japanese name candidates in KANJI, based on the romanized name ex. Yamamoto Sanae
GET/api2/json/japaneseNameKanjiCandidates/{japaneseSurnameLatin}/{japaneseGivenNameLatin}/{knownGender}Identify japanese name candidates in KANJI, based on the romanized name ex. Yamamoto Sanae - and a known gender.
POST/api2/json/japaneseNameKanjiCandidatesBatchIdentify japanese name candidates in KANJI, based on the romanized name (firstName = japaneseGivenName; lastName=japaneseSurname), ex. Yamamoto Sanae
GET/api2/json/japaneseNameLatinCandidates/{japaneseSurnameKanji}/{japaneseGivenNameKanji}Romanize japanese name, based on the name in Kanji.
POST/api2/json/japaneseNameLatinCandidatesBatchRomanize japanese names, based on the name in KANJI
GET/api2/json/japaneseNameMatch/{japaneseSurnameLatin}/{japaneseGivenNameLatin}/{japaneseName}Return a score for matching Japanese name in KANJI ex. 山本 早苗 with a romanized name ex. Yamamoto Sanae
POST/api2/json/japaneseNameMatchBatchReturn a score for matching a list of Japanese names in KANJI ex. 山本 早苗 with romanized names ex. Yamamoto Sanae
GET/api2/json/japaneseNameMatchFeedbackLoop/{japaneseSurnameLatin}/{japaneseGivenNameLatin}/{japaneseName}[CREDITS 1 UNIT] Feedback loop to better perform matching Japanese name in KANJI ex. 山本 早苗 with a romanized name ex. Yamamoto Sanae
GET/api2/json/learnable/{source}/{learnable}/{token}Activate/deactivate learning from a source.
GET/api2/json/nameType/{properNoun}Infer the likely type of a proper noun (personal name, brand name, place name etc.)
POST/api2/json/nameTypeBatchInfer the likely common type of up to 100 proper nouns (personal name, brand name, place name etc.)
GET/api2/json/nameTypeGeo/{properNoun}/{countryIso2}Infer the likely type of a proper noun (personal name, brand name, place name etc.)
POST/api2/json/nameTypeGeoBatchInfer the likely common type of up to 100 proper nouns (personal name, brand name, place name etc.)
GET/api2/json/origin/{firstName}/{lastName}[USES 10 UNITS PER NAME] Infer the likely country of origin of a personal name. Assumes names as they are in the country of origin. For US, CA, AU, NZ and other
POST/api2/json/originBatch[USES 10 UNITS PER NAME] Infer the likely country of origin of up to 100 names, detecting automatically the cultural context.
GET/api2/json/parseChineseName/{chineseName}Infer the likely first/last name structure of a name, ex. 王晓明 -> 王(surname) 晓明(given name)
POST/api2/json/parseChineseNameBatchInfer the likely first/last name structure of a name, ex. 王晓明 -> 王(surname) 晓明(given name).
GET/api2/json/parseJapaneseName/{japaneseName}Infer the likely first/last name structure of a name, ex. 山本 早苗 or Yamamoto Sanae
POST/api2/json/parseJapaneseNameBatchInfer the likely first/last name structure of a name, ex. 山本 早苗 or Yamamoto Sanae
GET/api2/json/parseName/{nameFull}Infer the likely first/last name structure of a name, ex. John Smith or SMITH, John or SMITH; John.
GET/api2/json/parseName/{nameFull}/{countryIso2}Infer the likely first/last name structure of a name, ex. John Smith or SMITH, John or SMITH; John. For better accuracy, provide a geographic context.
POST/api2/json/parseNameBatchInfer the likely first/last name structure of a name, ex. John Smith or SMITH, John or SMITH; John.
POST/api2/json/parseNameGeoBatchInfer the likely first/last name structure of a name, ex. John Smith or SMITH, John or SMITH; John. Giving a local context improves precision.
GET/api2/json/phoneCode/{firstName}/{lastName}/{phoneNumber}[USES 11 UNITS PER NAME] Infer the likely country and phone prefix, given a personal name and formatted / unformatted phone number.
POST/api2/json/phoneCodeBatch[USES 11 UNITS PER NAME] Infer the likely country and phone prefix, of up to 100 personal names, detecting automatically the local context given a name and form
GET/api2/json/phoneCodeGeo/{firstName}/{lastName}/{phoneNumber}/{countryIso2}[USES 11 UNITS PER NAME] Infer the likely phone prefix, given a personal name and formatted / unformatted phone number, with a local context (ISO2 country of re
POST/api2/json/phoneCodeGeoBatch[USES 11 UNITS PER NAME] Infer the likely country and phone prefix, of up to 100 personal names, with a local context (ISO2 country of residence).
GET/api2/json/phoneCodeGeoFeedbackLoop/{firstName}/{lastName}/{phoneNumber}/{phoneNumberE164}/{countryIso2}[CREDITS 1 UNIT] Feedback loop to better infer the likely phone prefix, given a personal name and formatted / unformatted phone number, with a local context (IS
GET/api2/json/pinyinChineseName/{chineseName}Romanize the Chinese name to Pinyin, ex. 王晓明 -> Wang (surname) Xiaoming (given name)
POST/api2/json/pinyinChineseNameBatchRomanize a list of Chinese name to Pinyin, ex. 王晓明 -> Wang (surname) Xiaoming (given name).
GET/api2/json/regionsPrint basic source statistics.
GET/api2/json/religionFull/{countryIso2}/{subDivisionIso31662}/{personalNameFull}[USES 10 UNITS PER NAME] Infer the likely religion of a personal full name. NB: only for INDIA (as of current version).
POST/api2/json/religionFullBatch[USES 10 UNITS PER NAME] Infer the likely religion of up to 100 personal full names. NB: only for India as of currently.
GET/api2/json/religionIndianFull/{subDivisionIso31662}/{personalNameFull}[USES 10 UNITS PER NAME] Infer the likely religion of a personal Indian full name, provided the Indian state or Union territory (NB/ this can be inferred using
POST/api2/json/religionIndianFullBatch[USES 10 UNITS PER NAME] Infer the likely religion of up to 100 personal full Indian names, provided the subclassification at State or Union territory level (NB
GET/api2/json/softwareVersionGet the current software version
GET/api2/json/subclassification/{countryIso2}/{firstName}/{lastName}[USES 10 UNITS PER NAME] Infer the likely origin of a name at a country subclassification level (state or regeion). Initially, this is only supported for India
POST/api2/json/subclassificationBatch[USES 10 UNITS PER NAME] Infer the likely origin of a list of up to 100 names at a country subclassification level (state or regeion). Initially, this is only s
GET/api2/json/subclassificationIndian/{firstName}/{lastName}[USES 10 UNITS PER NAME] Infer the likely Indian state of Union territory according to ISO 3166-2:IN based on the name.
POST/api2/json/subclassificationIndianBatch[USES 10 UNITS PER NAME] Infer the likely Indian state of Union territory according to ISO 3166-2:IN based on a list of up to 100 names.
GET/api2/json/taxonomyClasses/{classifierName}Print the taxonomy classes valid for the given classifier.
GET/api2/json/usRaceEthnicity/{firstName}/{lastName}[USES 10 UNITS PER NAME] Infer a US resident's likely race/ethnicity according to US Census taxonomy W_NL (white, non latino), HL (hispano latino), A (asian, n
POST/api2/json/usRaceEthnicityBatch[USES 10 UNITS PER NAME] Infer up-to 100 US resident's likely race/ethnicity according to US Census taxonomy. Output is W_NL (white, non latino), HL (hispano la
GET/api2/json/usRaceEthnicityZIP5/{firstName}/{lastName}/{zip5Code}[USES 10 UNITS PER NAME] Infer a US resident's likely race/ethnicity according to US Census taxonomy, using (optional) ZIP5 code info. Output is W_NL (white, no
POST/api2/json/usZipRaceEthnicityBatch[USES 10 UNITS PER NAME] Infer up-to 100 US resident's likely race/ethnicity according to US Census taxonomy, with (optional) ZIP code. Output is W_NL (white, n

Questions

Does the NamSor API v2 API need an API key?

Yes. The NamSor API v2 API uses API key authentication; the documentation explains how to get credentials.

Does the NamSor API v2 API support HTTPS?

Yes, the NamSor API v2 API is served over HTTPS.

How many endpoints does the NamSor API v2 API have?

Its OpenAPI description lists 84 endpoints in version 2.0.24. All of them are shown on this page.

What are alternatives to the NamSor API v2 API?

Other Text Analysis APIs include Google Cloud Natural, LanguageTool, Tisane, LibreTranslate, Asynchronous Speech-To-Text API Documentation.

Compare alternatives →

Google Cloud Natural

Text Analysis

Natural language understanding technology, including sentiment, entity and syntax analysis

API key

LanguageTool

Text Analysis

Style and Grammar Checker for 25+ Languages

No auth5 endpoints

Tisane

Text Analysis

Text Analytics with focus on detection of abusive content and law enforcement applications

OAuthCORS6 endpoints

LibreTranslate

Text Analysis

Translation tool with 17 available languages

No auth

Asynchronous Speech-To-Text API Documentation

Text Analysis

Rev.ai provides quality speech-text recognition via a RESTful API. All public methods and objects are documented here for developer reference. For a real-time speech to text solution, use Rev.ai's [Streaming API](/docs/streaming). # Base Endpoint The base url for this version of the API is > `https://api.rev.ai/speechtotext/v1` All endpoints described in this documentation are relative to this base url. # Quick Start Follow the [getting started checklist](https://www.rev.ai/getting_started) ## Get your Access Token You can generate your [access token](#section/Authentication/Access-Token) on the [settings page](https://www.rev.ai/access_token) of your account. This access token only needs to be generated once and never expires. You can re-generate your token, however this will invalidate the previous token. ## Submit a File To submit an audio file for transcription to Rev.ai: ``` curl -X POST "https://api.rev.ai/speechtotext/v1/jobs" -H "Authorization: Bearer $REV_ACCESS_TOKEN" -H "Content-Type: application/json" -d "{\"media_url\":\"https://www.rev.ai/FTC_Sample_1.mp3\",\"metadata\":\"This is a sample submit jobs option\"}" ``` You’ll receive a response like this: ~~~ { "id": "Umx5c6F7pH7r", "created_on": "2018-09-15T05:14:38.13", "name": "sample.mp3", "metadata": "This is a sample submit jobs option for multipart", "status": "in_progress" } ~~~ The `id` (in this case `Umx5c6F7pH7r`) will allow you to retrieve your transcript. ## Get Your Transcript Once a transcription job's `status` becomes `transcribed`, you can retrieve the transcript in JSON format by running: ``` curl -X GET "https://api.rev.ai/speechtotext/v1/jobs/{id}/transcript" -H "Authorization: Bearer $REV_ACCESS_TOKEN" -H "Accept: application/vnd.rev.transcript.v1.0+json" ``` Alternatively you can get the plain text version by running: ``` curl -X GET "https://api.rev.ai/speechtotext/v1/jobs/{id}/transcript" -H "Authorization: Bearer $REV_ACCESS_TOKEN" -H "Accept: text/plain" ``` You can poll for the `status` of your job by querying for the job periodically: ``` curl -X GET https://api.rev.ai/speechtotext/v1/jobs/{id} -H "Authorization: Bearer $REV_ACCESS_TOKEN" ``` **Note:** Polling is NOT recommended in a production server. Rather, use [webhooks](#section/Webhooks) to asynchronously receive notifications once the transcription job completes If you have any further questions, contact us at <[email protected]> # Submitting Files Two `POST` request formats can be used to submit a file: `application/json` or `multipart/form-data`. ## JSON This is the preferred method of file submission. Uses the `media_url` property to provide a direct download URL to the Rev.ai server. This method supports the use of pre-signed URLs. Links to videos hosted on platforms like Youtube are not valid because they are not direct download links. **Important note on presigned URLs:** Signed URLs usually have an expiration time which is configurable. To ensure the Rev.ai server can access the link, make sure the expiration time is set to 2 hours or more. In the event you plan on resending the same file, make sure to generate a new presigned URL. ## FormData Used to send a local file to the Rev.ai server. This allows the customer to send the file directly from the host machine. Certain limits apply to this format, see the [Async API Limits section](#section/Async-API-Limits) for more detals. # Turnaround Time and Chunking Often, especially for shorter files, your transcript will be ready in 5 minutes or less. It generally takes no longer than 15 minutes to return longer audios. If you require faster turn around time please contact <[email protected]> Chunking is the act of breaking audio files into smaller segments. Rev.ai uses this method to decrease turnaround time of audios greater than 3 minutes in length. # Webhooks If the optional `callback_url` is provided, the API will make an HTTP POST request to the `callback_url` with the following request body when the job either completes successfull

Bearer token7 endpoints

Detect Language

Text Analysis

Detects text language

API key

Listed from APIs.guru (CC0).