Country Association

/api/countryassociation 1 credit(s) per call

Determine the statistical likelihood that a given first name is associated with specific countries based on worldwide name frequency data, with per-country probability and the contributing data sources.

Overview

The Country Association API determines the statistical likelihood that a given first name is associated with specific countries based on worldwide name frequency data from multiple sources. It returns the top countries for a name, each with a probability.

Note: This API returns a population-level statistical measure based on name frequency data. It does not determine or imply anyone's nationality or origin. Results reflect historical naming patterns and data source coverage and should not be used to make assumptions about individuals.

Endpoint

POST /api/countryassociation
GET /api/countryassociation/associate?name=Maria&limit=5

Request Parameters

Parameter Type Required Description
name string Yes The first name to look up (case-insensitive)
limit int No Number of top countries to return (1–25, default 5)

Response Fields

The response is wrapped in a standard API envelope:

Field Type Description
success boolean true on success
data.name string The normalized name queried
data.sampleSize long Total number of name records used for the association
data.countries array Top countries ranked by likelihood, each with isoCode, country, and probability (0.00–1.00)
data.sources array List of data source names contributing to the result

Example

Get the country association for a name:

curl -X POST https://simplewebapis.com/api/countryassociation \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: swa_your_key" \
  -d '{"name": "Maria", "limit": 5}'

The response is a JSON object (Content-Type: application/json).

Try it out

Use the Playground to test this API live.