The nationality API takes a name input and provides the probability of its nationality. It also provides the probability it belongs to regions with the same naming traditions, e.g. Spanish/Hispanic.
Nationality is not the same as ethnicity, though the two are considerably analogous. An ethnicity API is in production and will be able to identify sub-groups within nations, e.g. Tatars in Russia and Tamils in India.
The API works by taking a name input, e.g.
Forename: Avetis
Surname: Arakelyan
And it returns the probability someone with that name would be a national of a country, e.g.
| Country | Probability |
| Armenia | 62.74114% |
| Russia | 21.08805% |
| Uzbekistan | 4.52620% |
| et cetera. | |
The result is provided in JSON.
Using a sample with an equal percentage of people from 235 countries/jurisdictions the API returns the actual nationality as the most likely nationality in 85.1% of cases. To reference the above example of Avetis Arakelyan, this means there is statistically an 85.1% chance the first result returned (Armenia in this case) will be the nationality of Avetis Arakelyan.
Owing to the spread of naming customs to other countries, historic and recent migration and the ambiguity of names between cultures it is not possible to predict a person's nationality in each case by their name alone. For example the name James Fraser is common in The United States, the constituent countries of The United Kingdom, Canada, Australia, New Zealand and the Anglophone countries of The Caribbean.
For this reason the API also provides the probability a name comes from regions of the world using a number of naming traditions, e.g. British, Spanish, Portuguese, Arab, Serbo-Croat etc. Theses are known as onospheres. This provides the correct result 94.7% of the time, using a weighted global sample.
At 85.1% accurate the API is the most accurate solution for identifying origin by name, by margin of 26%.
The actual nationality of a name will be in the top three returned countries in 93.4% of cases; the top five in 95.8% of cases; and the top ten in 97.9% of cases.
The ability of the API to return a person's nationality as the most likely varies by country. The larger a country is and the more unique its naming traditions the more likely the API's most likely result will be correct. For example Japan has a unique naming tradition and a population of about 127 million; as a result the API can detect the nationality of Japanese people in almost 100% of cases. While Lichtenstein, with a population of about 35,000 people with predominantly German names can rarely be detected as the most likely nationality.
See the API's accuracy by country/jurisdiction and onosphere for more details.