Nationality API

Nationality prediction in one API call

Send a name, get back up to five likely countries with a probability for each. Batch up to 100 names per request.

  • 2,500 names a month free
  • No credit card
  • 8 official SDKs
GET
curl "https://api.nationalize.io?name=nguyen&apikey=YOUR_API_KEY"

Response · 200 OK

{
  "name": "nguyen",
  "country": [
    { "country_id": "VN", "probability": 0.891132 },
    { "country_id": "MO", "probability": 0.019031 },
    { "country_id": "US", "probability": 0.010936 },
    { "country_id": "SG", "probability": 0.009201 },
    { "country_id": "FR", "probability": 0.006889 }
  ],
  "count": 100783
}

Trusted by leading organizations

The Guardian logoColumbia University logoUber logoNature logoMIT University logoShopify logoThe Washington Post logoYale University logo

Built for developers

Everything you need in one endpoint

Plain GET requests, JSON responses and a key that works from any language. Most integrations take minutes.

One GET request

One endpoint and one query parameter. No SDK required, though we have them.

Batches of up to 100

Send repeated name[] parameters and get an array back in the same order.

Up to five countries

Each result ranks up to five likely countries, each with a probability.

Last names or full names

Send names as they are. Diacritics and non-Latin alphabets are supported.

Know how much data is behind it

Every result carries the number of records the prediction is based on.

Rate-limit headers

Every response reports your limit, what's left and when the window resets.

Official client libraries for eight languages

Install the official Demografix package for your stack. Each library wraps all three name analysis APIs behind one API key, so you can integrate gender, age, and nationality without writing a client.

  • Python
  • Node
  • Go
  • PHP
  • Ruby
  • Rust
  • Elixir
  • C#
Browse 8 libraries

Use cases

What teams build with it

Most integrations enrich records in bulk, then report on the group as a whole.

Analytics and dashboards

Report the nationality mix of your users, customers or contacts.

Research at scale

See the nationality mix of an author list or a research community.

AI assistants

Connect the same key to Claude, ChatGPT or Cursor through our hosted MCP server and ask aggregate questions in plain language.

MCP docs

Pricing and limits

Simple, predictable limits

  • Over your limit, requests return 429 until the period resets. We never charge overage fees.
  • Rate-limit headers on every response show what's left.
  • One key works for Genderize, Agify and Nationalize.

Free plan

2,500 names a month

Sign up with an email address and no credit card. Your key works right away.

Paid plans cover higher volumes. Upgrades take effect immediately and you can cancel any time.

See pricing

Frequently asked questions

How do I get an API key?
Create a free account and your key is waiting in your account dashboard. Pass it as the apikey query parameter.
How many names can I send per request?
Up to 100, using repeated name[] parameters. The response is an array in the same order as your input.
How is usage counted?
Every name you send counts against your monthly quota, including each name in a batch. A batch of 100 names uses 100.
What happens when I reach my limit?
Requests return 429 until your quota resets. There are no overage fees, and upgrades take effect immediately.
How accurate is it?
Every result ranks up to five countries with a probability for each. Predictions describe name statistics, not individuals, so they are most reliable across many names. We publish open benchmarks .
Do you have SDKs?
Yes, official libraries for 8 languages , all using the same key. Or call the endpoint directly: it's a single GET request.

Start with a free API key

Your key is ready in seconds, and the first 2,500 names every month are free.