---
title: "[USES 10 UNITS PER NAME] Infer the likely country of residence of a personal first / last name, or one surname. Assumes names as they are in the country of residence OR the country of origin."
method: GET
path: "/api2/json/countryFnLn/{firstName}/{lastName}"
tags: ["personal"]
---

# \[USES 10 UNITS PER NAME\] Infer the likely country of residence of a personal first / last name, or one surname. Assumes names as they are in the country of residence OR the country of origin.

`GET /api2/json/countryFnLn/{firstName}/{lastName}`

## Request

- Base URL: `https://v2.namsor.com/NamSorAPIv2`
- URL: `https://v2.namsor.com/NamSorAPIv2/api2/json/countryFnLn/{firstName}/{lastName}`
- Auth: API key in header `X-API-KEY`

## Path parameters

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

## Response `200`

A origined name.

- FirstLastNameOriginedOut: Represents the output of inferring the LIKELY country of Origin from a personal name.
  - `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)
  - `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 origin 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

## Changes

- **2025-05-16** `6297d39b756d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/namsor/apis/namsor-api-v2/changes/api2/json/countryFnLn/:firstName/:lastName/get.md)

---

[API](https://skmtc.dev/namsor/apis/namsor-api-v2.md) - [All operations](https://skmtc.dev/namsor/apis/namsor-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/namsor/apis/namsor-api-v2/revisions/305e4f6eeaf5?raw)
