# \[ANN\] NamSor.jl: Julia wrappers for NamSor v2 API

**URL:** https://discourse.julialang.org/t/ann-namsor-jl-julia-wrappers-for-namsor-v2-api/114424
**Category:** Package Announcements
**Created:** [May 18, 2024, 10:52am UTC](https://discourse.julialang.org/t/ann-namsor-jl-julia-wrappers-for-namsor-v2-api/114424 "2024-05-18T10:52:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NeroBlackstone](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/neroblackstone/32/208679_2.png) [@NeroBlackstone](https://discourse.julialang.org/u/NeroBlackstone)
#### Post date: [May 18, 2024, 10:52am UTC](https://discourse.julialang.org/t/ann-namsor-jl-julia-wrappers-for-namsor-v2-api/114424/1 "2024-05-18T10:52:27Z")

</div>

[Namsor](https://namsor.app/) is a name checker for gender, origin and ethnicity determination.

This Julia package wrap the NamSor Web API.

## API key

Please apply for your [NamSor API key](https://namsor.app/api-documentation/) first. Then paste your api key at `$HOME/.config/NAMSOR_KEY.txt`. Or save api key to `NAMSOR_KEY` environment variable.

## Initialization

Before calling the NamSor interface, you need to initialize the corresponding NamSor API through `init_api()`. For example, analyzes name “Julia Fox” to identify its country of origin.

```julia-repl
julia> using NamSor
julia> personal_api = init_api(APIClient.PersonalApi)
julia> first(origin(personal_api,"Julia","Fox"))
{
  "script": "LATIN",
  "id": "0893c8d7-4f9e-4718-8946-d2fcdd7929a2",
  "firstName": "Julia",
  "lastName": "Fox",
  "countryOrigin": "IE",
  "countryOriginAlt": "GB",
  "countriesOriginTop": [
    "IE",
    "GB",
    "ES",
    "IL",
    "NA",
    "PT",
    "SK",
    "DE",
    "BE",
    "FR"
  ],
  "score": 2.994869283184946,
  "regionOrigin": "Europe",
  "topRegionOrigin": "Europe",
  "subRegionOrigin": "Northern Europe",
  "probabilityCalibrated": 0.5070530505259684,
  "probabilityAltCalibrated": 0.8538791383744339
}

```

The “countryOrigin” field shows she might be Irish.
