Documentation

Predict nationality from a name. Use Nationalize from your API client, your spreadsheet, your no-code workflow, or your AI assistant. Pick the surface that matches how you work.

What Nationalize does

Nationalize answers one question: which countries is a name most likely to come from? Send a last name, like nguyen, or a full name like Sarah Johnson, and the answer comes back as a ranked list of up to five countries, each with its own probability, and the number of records behind it.

Names travel with families and cultures, and surnames in particular are strong markers of origin. Nationalize looks the name up in a large dataset of real-world name records and reports the countries where it is most common.

What the response contains

Every Nationalize response contains three fields.

name The name from the request, echoed exactly as sent.
country Up to five candidate countries, ordered by descending probability. Each candidate pairs a two-letter country_id with a probability between 0 and 1. Empty when no prediction can be made.
count Data points behind the prediction.

How Nationalize reads names

Send the fullest form of the name you have. Every part of a name carries signal: the surname is the dominant signal for nationality, and the given name adds to it. When both parts point to the same country, the prediction strengthens — Sarah Johnson produces a better prediction than Johnson alone.

  • Name parts are identified by evidence, not position. Tanaka Hiroshi and Hiroshi Tanaka produce the same prediction.
  • You can send names with titles, initials, or nicknames — Nationalize handles them. Dr. J. Sarah Johnson reads as Sarah Johnson.
  • You can send accented or unaccented spellings — Nationalize handles both José and Jose.

The name field in the response always echoes the input exactly as sent.

Pick your surface

Use it where you already work

Need gender, age, and nationality together?

Nationalize is one of three Demografix services. The same API key works on all three — set it up once and call any of them.