API Directory › 📚 Data, Text & Words › Agify
No authHTTPSCORS

Agify API

Predict the likely age for a given first name — free, no-key.

Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open Agify docs ↗

What it does

Agify predicts the likely age associated with a first name, based on a large dataset of name–age pairs. One GET, one name, back comes an estimated age and the sample size behind it. Sibling APIs Genderize and Nationalize work the same way for gender and likely country.

Base URL

https://api.agify.io

Authentication

None for light use. Free tier is IP-based; for higher volume you buy an API key and pass it as apikey. No account needed to start.

Code examples

curl
curl -s "https://api.agify.io?name=amara&country_id=NG"
Python
import requests

r = requests.get("https://api.agify.io", params={"name": "amara"}, timeout=10)
r.raise_for_status()
d = r.json()
print(d["name"], "~", d["age"], "(n=", d["count"], ")")

# batch: up to 10 names per request
names = ["amara", "chidi", "ngozi"]
q = "&".join(f"name[]={n}" for n in names)
batch = requests.get(f"https://api.agify.io?{q}").json()
JavaScript
const res = await fetch("https://api.agify.io?name=amara&country_id=NG");
const { age, count } = await res.json();
console.log(`~${age} (based on ${count} people)`);

Rate limits & quotas

Free: 100 names/day without a key, rising to 1,000/day if you register a free key. Paid plans go to 100,000+/day. Every response includes X-Rate-Limit-Limit, X-Rate-Limit-Remaining and X-Rate-Reset headers. Batch up to 10 names per request with repeated name[] params.

Key response fields

nameEcho of the input name
ageEstimated age (integer), or null if the name is unknown
countNumber of data points behind the estimate — low count = low confidence
country_idPresent when you pass country_id to localise the estimate

Common errors

422Missing name parameter.
429Daily quota exceeded — check X-Rate-Reset for the reset time.
null ageNot an error: the name isn’t in the dataset. Handle it gracefully.

When to use it (and alternatives)

Agify is a fun enrichment / personalisation touch — never a source of truth. Don’t use it for anything consequential (age-gating, eligibility): it’s a population average, and it’s biased toward the countries with the most data. Pair it with Genderize and Nationalize for a light “about this name” card.

FAQ

Is Agify accurate?

It’s a statistical average, not a prediction about an individual. Accuracy is decent for common names in well-represented countries and poor otherwise. Treat it as entertainment.

How do I look up several names at once?

Repeat the parameter: ?name[]=alice&name[]=bob — up to 10 per request. Each name still counts against your daily quota.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

Word CounterJSON Formatter

Related Data, Text & Words APIs

← Back

More Data, Text & Words APIs · All 196 APIs