Agify.io API

Beginner's Pick Development / No Auth Required Beginner HTTPS CORS
Free to Use 25 per window
78 B
Measured Score 0 50 100 Speed 10/30 Consistency 20/20 Security 18/20 Browser access 15/15 Transparency 15/15 TESTED 2026-08-10

Overview

Agify.io is a free API that predicts the likely age of a person based solely on their first name, using a database of over 350 million historical records. You can query a single name or batch up to 10 names in one request, and optionally filter predictions by country code for improved regional accuracy. It is widely used for demographics research, marketing personalization, and fun side projects.

Beginner Tip

No API key or account is needed — just send a GET request with a name parameter and you will receive a prediction instantly. The free tier allows 1,000 requests per day per IP address; if you need more, register for an API key to raise that limit.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.agify.io?name=michael
Result
HTTP 200 · application/json · 42 bytes · compressed
Response time
315 ms (median of 3) · fastest 302 ms
Transport
TLSv1.2 · ECDHE-RSA-AES128-GCM-SHA256 · certificate issued by Let's Encrypt
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Rate limit
25 per window
Served by
nginx/1.16.1
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
count integer 311558
name string michael
age integer 57

Captured Response

Captured from a real request to https://api.agify.io?name=michael on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "count": 311558,
  "name": "michael",
  "age": 57
}

Field Reference

name The name that was submitted for age prediction.
age Predicted median age for people with this name, or null if data is insufficient.
count Total number of records in the database matching this name.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.agify.io?name=michael";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/html

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

422 Unprocessable Entity The name parameter is missing, empty, or contains only numbers.
Always provide a non-empty alphabetic string for the name parameter; strip digits and special characters before sending.
Null age returned for uncommon names Names with very few records in the database return null instead of a numeric estimate.
Check if the age field is null before using it and display a fallback message like "insufficient data" to end users.
Rate limit hit (429) during batch usage Exceeding 1,000 calls per day from the same IP triggers a block.
Pass an X-RapidAPI-Key or register at agify.io for a personal API key to get a higher daily quota.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 10/30
Consistency 20/20
Security 18/20
Browser access 15/15
Transparency 15/15
Endpoint Response Time 315ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Development
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →