---
title: "[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.)"
method: GET
path: "/api2/json/diaspora/{countryIso2}/{firstName}/{lastName}"
tags: ["personal"]
---

# [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.)

`GET /api2/json/diaspora/{countryIso2}/{firstName}/{lastName}`

## Path parameters

- `countryIso2` string, required
- `firstName` string, required
- `lastName` string, required

## Response `200`

A diaspora / ethnicity for given name and geography.

- FirstLastNameDiasporaedOut — Represents the output of inferring the LIKELY ethnicity from a personal name, given an country of residence.
  - `script` string
  - `id` string
  - `explanation` string
  - `firstName` string — The first name (also known as given name)
  - `lastName` string — The last name (also known as family name, or surname)
  - `score` number, double — Compatibility to NamSor_v1 Diaspora score value. Higher score is better, but score is not normalized. Use calibratedProbability if available.
  - `ethnicityAlt` string — The second best alternative ethnicity
  - `ethnicity` string — The most likely ethnicity
  - `lifted` boolean — Indicates if the output ethnicity is based on machine learning only, or further lifted as a known fact by a country-specific rule. Let us know if you believe ethnicity is incorrect on a specific case where lifted is true.
  - `countryIso2` string — From input data, the countryIso2 of geographic context (US,CA etc.)
  - `ethnicitiesTop` string[] — List most likely ethnicities (top 10)
  - `probabilityCalibrated` number, double — The calibrated probability for ethnicity to have been guessed correctly. -1 = still calibrating.
  - `probabilityAltCalibrated` number, double — The calibrated probability for ethnicity OR ethnicityAlt to have been guessed correctly. -1 = still calibrating.
  - `religionStats` ReligionStatOut[] — Geographic religious statistics, assuming ethnicity is correctly predicted.
    - `religion` string
    - `pct` number, double
  - `religionStatsAlt` ReligionStatOut[] — Geographic religious statistics, for country best alternative.
    - `religion` string
    - `pct` number, double

## Other responses

- `401` — Missing or incorrect API Key
- `403` — Email not Verified, or API Limit Reached, or API Key Disabled
- `429` — Too Many Requests

---

[API](https://skmtc.net/namsor/apis/namsor-api-v2.md) · [All operations](https://skmtc.net/namsor/apis/namsor-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/namsor/namsor-api-v2/versions/305e4f6eeaf5/schema)
