---
title: "Infer the likely ethnicity/diaspora, country, gender of up to 100 personal names, given a country of residence ISO2 code (ex. US, CA, AU, NZ etc.) for community engagement (require special module/pricing)"
method: POST
path: "/api2/json/communityEngageBatch"
tags: ["personal"]
---

# Infer the likely ethnicity/diaspora, country, gender of up to 100 personal names, given a country of residence ISO2 code (ex. US, CA, AU, NZ etc.) for community engagement (require special module/pricing)

`POST /api2/json/communityEngageBatch`

## Request body

- BatchFirstLastNameGeoIn
  - `personalNames` FirstLastNameGeoIn[]
    - `id` string
    - `firstName` string
    - `lastName` string
    - `countryIso2` string

## Response `200`

A list of diaspora / ethnicity given a name and residency.

- BatchCommunityEngageOut
  - `engagementCandidates` CommunityEngageOut[] — Classified community engagement candidates
    - `id` string
    - `PersonalNameDiasporaedOut` PersonalNameDiasporaedOut — Represents the output of inferring the LIKELY ethnicity from a personal name, given an country of residence.
      - `script` string
      - `id` string
      - `explanation` string
      - `name` string — The input name.
      - `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
    - `PersonalNameOriginedOut` PersonalNameOriginedOut — Represents the output of inferring the LIKELY country of Origin from a personal name.
      - `script` string
      - `id` string
      - `explanation` string
      - `name` string — The input name.
      - `countryOrigin` string — Most likely country of Origin
      - `countryOriginAlt` string — Second best alternative : country of Origin
      - `countriesOriginTop` string[] — List countries of Origin (top 10)
      - `score` number, double — Compatibility to NamSor_v1 Origin score value. Higher score is better, but score is not normalized. Use calibratedProbability if available.
      - `regionOrigin` string — Most likely region of Origin (based on countryOrigin ISO2 code)
      - `topRegionOrigin` string — Most likely top region of Origin (based on countryOrigin ISO2 code)
      - `subRegionOrigin` string — Most likely sub region of Origin (based on countryOrigin ISO2 code)
      - `probabilityCalibrated` number, double — The calibrated probability for countryOrigin to have been guessed correctly. -1 = still calibrating.
      - `probabilityAltCalibrated` number, double — The calibrated probability for countryOrigin OR countryOriginAlt to have been guessed correctly. -1 = still calibrating.
      - `religionStats` ReligionStatOut[] — Geographic religious statistics, assuming country of origin is correctly predicted.
        - `religion` string
        - `pct` number, double
      - `religionStatsAlt` ReligionStatOut[] — Geographic religious statistics, for country best alternative.
        - `religion` string
        - `pct` number, double
      - `religionStatsSynthetic` ReligionStatOut[] — Geographic religious statistics, assuming country of origin OR best alternative is correctly predicted.
        - `religion` string
        - `pct` number, double
    - `country` PersonalNameGeoOut
      - `script` string
      - `id` string
      - `explanation` string
      - `name` string — The input name.
      - `score` number, double — Higher score is better, but score is not normalized. Use calibratedProbability if available.
      - `country` string — Most likely country
      - `countryAlt` string — Second best alternative : country
      - `region` string — Most likely region (based on country ISO2 code)
      - `topRegion` string — Most likely top region (based on country ISO2 code)
      - `subRegion` string — Most likely sub region (based on country ISO2 code)
      - `countriesTop` string[] — List countries (top 10)
      - `probabilityCalibrated` number, double — The calibrated probability for country to have been guessed correctly. -1 = still calibrating.
      - `probabilityAltCalibrated` number, double — The calibrated probability for country OR countryAlt to have been guessed correctly. -1 = still calibrating.
      - `religionStats` ReligionStatOut[] — Geographic religious statistics, assuming country is correctly predicted.
        - `religion` string
        - `pct` number, double
      - `religionStatsAlt` ReligionStatOut[] — Geographic religious statistics, for country best alternative.
        - `religion` string
        - `pct` number, double
    - `gender` PersonalNameGenderedOut — Classified genderized names
      - `script` string
      - `id` string
      - `explanation` string
      - `name` string — The input name.
      - `likelyGender` 'male' | 'female' | 'unknown' — Most likely gender
      - `genderScale` number, double — Compatibility to NamSor_v1 Gender Scale M[-1..U..+1]F value.
      - `score` number, double — Compatibility to NamSor_v1 Gender score value. Higher score is better, but score is not normalized. Use calibratedProbability if available.
      - `probabilityCalibrated` number, double — The calibrated probability for inferred gender to have been guessed correctly. -1 = still calibrating.
    - `PersonalNameUSRaceEthnicityOut` PersonalNameUSRaceEthnicityOut — Represents the output of inferring the LIKELY US 'race/ethnicity' from a personal name, given US country of residence and (optionally) a ZIP5 code.
      - `script` string
      - `id` string
      - `explanation` string
      - `name` string — The input name.
      - `raceEthnicityAlt` 'W_NL' | 'HL' | 'A' | 'B_NL' | 'AI_AN' | 'PI' — Second most likely US 'race'/ethnicity
      - `raceEthnicity` 'W_NL' | 'HL' | 'A' | 'B_NL' | 'AI_AN' | 'PI' — Most likely US 'race'/ethnicity
      - `score` number, double — Higher score is better, but score is not normalized. Use calibratedProbability if available.
      - `raceEthnicitiesTop` string[] — List 'race'/ethnicities
      - `probabilityCalibrated` number, double — The calibrated probability for raceEthnicity to have been guessed correctly. -1 = still calibrating.
      - `probabilityAltCalibrated` number, double — The calibrated probability for raceEthnicity OR raceEthnicityAlt to have been guessed correctly. -1 = still calibrating.
    - `prime` boolean
    - `scoped` boolean
    - `script` string

## Other responses

- `400` — Bad request (ex. too many names)
- `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)
