Agify API
Free API that estimates age from a first name using public name data. No key for 100 requests/day. Tested curl example, live response and accuracy caveats.
Endpoint tested and returned HTTP 200 on 2026-08-19
What is the Agify API?
Agify is a free API that estimates the likely age associated with a given first name, based on statistical analysis of public name datasets. It allows 100 requests per day with no API key.
Agify returns a single estimated age for a name alongside the sample size the estimate is based on. It is a statistical average across a population, not a prediction about any individual — and the `count` field matters, because an estimate drawn from 12 records is far weaker than one drawn from 12,000.
It is worth being clear about appropriate use. Inferring someone's age from their name and acting on it — pricing, content restrictions, targeting — is both unreliable and ethically questionable. Treat this as a demographic aggregate or a demonstration API, not as a fact about a user.
Quick facts
- Base URL
https://api.agify.io- Authentication
- No key for the free tier. An optional API key raises the daily limit.
- Rate limit
- 100 requests per day without a key.
- Pricing
- Free tier; paid plans for higher volume.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Agify API
Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.
1. Estimate the age associated with a name
GET https://api.agify.io?name=michael
curl 'https://api.agify.io?name=michael'const res = await fetch("https://api.agify.io?name=michael");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.agify.io?name=michael", timeout=20)
res.raise_for_status()
print(res.json()){
"count": 311558,
"name": "michael",
"age": 57
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Required | First name to analyse. michael |
country_id | string | Optional | ISO 3166-1 alpha-2 code to localise the estimate. US |
Response fields
namestring- The name that was queried.
ageinteger|null- Estimated age, or null when the name is unknown.
countinteger- Number of data points behind the estimate — the confidence signal.
country_idstring- Country the estimate was localised to, when requested.
What you can build with the Agify API
- Analyse aggregate demographics of a name dataset
- Demonstrate statistical inference and its limits in teaching
- Enrich anonymised research data with population-level estimates
- Prototype personalisation logic without real user data
Common errors and how to fix them
age: null
The name is not in the dataset.
Fix: Handle null explicitly; unusual and non-Western names are frequently missing.
429
Daily allowance of 100 requests exhausted.
Fix: Cache by name — the estimate for a given name does not change day to day.
Misleading estimate
A low `count` means a statistically weak result.
Fix: Check `count` and discard estimates below a threshold you consider meaningful.
Agify API — frequently asked questions
How accurate is Agify?
It reports a population average, not an individual's age. Accuracy depends heavily on the `count` field — a small sample means a weak estimate — and it is frequently wrong for any specific person.
Is Agify free?
Yes, 100 requests per day with no API key. An optional key and paid plans raise the limit.
Should I use Agify to make decisions about users?
No. Inferring age from a name is unreliable and using it to gate content, set pricing or target individuals is both inaccurate and ethically problematic. Use it for aggregate analysis only.
Why does it return null for some names?
The name is not present in the underlying dataset. Coverage skews towards Western names, so many names return null — always handle that case.
Tools that pair with this API
Age Calculator
Find your exact age in years, months and days from your date of birth, plus totals in weeks, days and hours and a countdown to your next birthday.
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Agify is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.