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.
Pick your surface
API
HTTPS endpoint,
GET
requests, JSON responses. Backend code, batch jobs, any language with an HTTP client.
MCP server
Connect Claude Code and other MCP clients to predict nationality from natural-language prompts.
Read moreSpreadsheet
Predict nationality on a column of names. Upload a file in the browser, download the enriched output.
Read moreUse 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.
Genderize
Predict gender from a name.
Read moreAgify
Predict age from a name.
Read moreNationalize
Predict nationality from a name.
Quickstart
Sign in at nationalize.io/login to get an API key. Then send a name:
curl "https://api.nationalize.io?name=nguyen&apikey=YOUR_API_KEY"import requests
response = requests.get(
"https://api.nationalize.io",
params={"name": "nguyen", "apikey": "YOUR_API_KEY"},
)
print(response.json())const url = new URL("https://api.nationalize.io");
url.searchParams.set("name", "nguyen");
url.searchParams.set("apikey", "YOUR_API_KEY");
const response = await fetch(url);
console.log(await response.json());$response = file_get_contents(
"https://api.nationalize.io?name=nguyen&apikey=YOUR_API_KEY"
);
echo $response;require "net/http"
require "json"
uri = URI("https://api.nationalize.io")
uri.query = URI.encode_www_form(name: "nguyen", apikey: "YOUR_API_KEY")
puts JSON.parse(Net::HTTP.get(uri))package main
import (
"fmt"
"io"
"net/http"
)
func main() {
resp, _ := http.Get("https://api.nationalize.io?name=nguyen&apikey=YOUR_API_KEY")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"name": "nguyen",
"country": [
{ "country_id": "VN", "probability": 0.561 },
{ "country_id": "US", "probability": 0.035 }
],
"count": 360408
}
The free tier includes 2,500 names per month. For higher volumes, see pricing.
More
- Client libraries — community-maintained SDKs for Ruby, Python, Node, PHP, Go, and others.
- FAQ — accuracy, data sources, GDPR, billing.