Find an API

Search public APIs with auth details & Postman guides

← All APIs

Agify API

api.agify.io · Developer Tools

Developer Tools No Auth Free & Open Data Names Demographics

Predict the age, gender, and nationality of a person based on their first name. Trained on 100M+ names. No API key required for 1,000 requests/day.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Predict age by name

Predict the most likely age for the name Michael.

https://api.agify.io?name=michael

Hover any highlighted part to learn what it does

curl -X GET "https://api.agify.io/?name=michael"
import requests
params = {
    "name": "michael"
}
response = requests.get(
    "https://api.agify.io/",
    params=params,
)
print(response.json())
const url = new URL('https://api.agify.io/');
url.searchParams.set('name', 'michael');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.agify.io/")
	q := baseURL.Query()
	q.Set("name", "michael")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.agify.io/")
uri.query = URI.encode_www_form({
  "name" => "michael"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.agify.io/?" . http_build_query([
    "name" => "michael"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Predict gender (Genderize)

Predict gender for the name Alex.

https://api.agify.io/https:/api.genderize.io?name=alex

Hover any highlighted part to learn what it does

curl -X GET "https://api.agify.iohttps://api.genderize.io?name=alex"
import requests
params = {
    "name": "alex"
}
response = requests.get(
    "https://api.agify.iohttps://api.genderize.io",
    params=params,
)
print(response.json())
const url = new URL('https://api.agify.iohttps://api.genderize.io');
url.searchParams.set('name', 'alex');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.agify.iohttps://api.genderize.io")
	q := baseURL.Query()
	q.Set("name", "alex")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.agify.iohttps://api.genderize.io")
uri.query = URI.encode_www_form({
  "name" => "alex"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.agify.iohttps://api.genderize.io?" . http_build_query([
    "name" => "alex"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed (1,000 req/day)
  2. Age: GET https://api.agify.io?name=emma
  3. Gender: GET https://api.genderize.io?name=jordan
  4. Nationality: GET https://api.nationalize.io?name=zhang
  5. Batch: GET https://api.agify.io?name[]=peter&name[]=anna

Open documentation ↗