Social Security Administration API: Get baby name popularity
Gets yearly U.S. baby-name ranks and reported birth counts for a first name from Social Security data. Ranks cover the top 1,000 names for each sex; counts are given for the years the name is in that top 1,000.
Unofficial. Not affiliated with or endorsed by Social Security Administration.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Sex optional
sex Birth-record sex, such as female. Defaults to the more common sex for this name.
male
One of
female,male.- To Year optional
to_year Last birth year to include, such as 2025. Defaults to the latest available year.
1993
Whole number 1880 or more.
- From Year optional
from_year First birth year to include, such as 1990. Defaults to 1990.
1990
Whole number 1880 or more. Default
1990.- First Name, required
first_name First name to check, such as Olivia.
James
Input as JSON
{ "sex": "male", "to_year": 1993, "from_year": 1990, "first_name": "James"}Output
{ "sex": "male", "name": "James", "years": [ { "year": 1990, "page_link": "https://www.ssa.gov/oact/babynames/" , "popularity_rank": 8, "number_of_babies": 32359 }, { "year": 1991, "page_link": "https://www.ssa.gov/oact/babynames/" , "popularity_rank": 7, "number_of_babies": 30514 }, { "year": 1992, "page_link": "https://www.ssa.gov/oact/babynames/" , "popularity_rank": 9, "number_of_babies": 28513 } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"ssa.gov/get_name_popularity","input":{"sex":"male","to_year":1993,"from_year":1990,"first_name":"James"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "ssa.gov/get_name_popularity" , "input": { "sex": "male", "to_year": 1993, "from_year": 1990, "first_name": "James" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "ssa.gov/get_name_popularity" , "input": { "sex": "male", "to_year": 1993, "from_year": 1990, "first_name": "James" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run ssa.gov/get_name_popularity# with {"sex":"male","to_year":1993,"from_year":1990,"first_name":"James"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "first_name" ], "properties": { "sex": { "enum": [ "female", "male" ], "type": "string", "description": "Birth-record sex, such as female. Defaults to the more common sex for this name." }, "to_year": { "type": "integer", "minimum": 1880, "description": "Last birth year to include, such as 2025. Defaults to the latest available year." }, "from_year": { "type": "integer", "default": 1990, "minimum": 1880, "description": "First birth year to include, such as 1990. Defaults to 1990." }, "first_name": { "type": "string", "minLength": 1, "description": "First name to check, such as Olivia." } }}Output schema
{ "type": "object", "required": [ "name", "sex", "years" ], "properties": { "sex": { "enum": [ "female", "male" ], "type": "string", "description": "Birth-record sex used for the rankings." }, "name": { "type": "string", "description": "Name as reported by Social Security." }, "years": { "type": "array", "items": { "type": "object", "required": [ "year", "popularity_rank", "number_of_babies", "page_link" ], "properties": { "year": { "type": "integer", "description": "Birth year." }, "page_link": { "type": "string", "description": "Social Security page for looking up this year's baby-name popularity." }, "popularity_rank": { "type": [ "integer", "null" ], "description": "Rank among names of this sex, or null if not in the top 1,000." }, "number_of_babies": { "type": [ "integer", "null" ], "description": "Reported births with this name and sex, or null when unavailable." } }, "additionalProperties": false }, "description": "Annual popularity in chronological order. A missing count means the name was outside the top 1,000 for that year." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
ssa.gov/get_name_popularity- Returns
- name, sex, yearly rank and number of babies
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method ssa.gov/get_name_popularity with the inputs above.
Ask your agent
- How has the name Harper ranked for girls each year since 2000, and how many babies got that name?
- Pull the SSA baby name data for the boy's name Liam from 1980 through 2010 — yearly rank and birth counts.
- Was Jaden ever a top 1,000 name for girls? Show me the ranks by year.
- I'm thinking of naming my son Theodore. Can you show me how popular it's been each year since 1990?
- Using Social Security records, give me the yearly popularity of Ashley as a female name between 1960 and 2000, including the number of babies.
Lists the ranked top baby names and birth counts for a U.S. birth year, nationwide or for one state.
ssa.gov/list_top_baby_namesRanks countries by a World Development Indicators statistic for a given year, or for the latest year with broad country coverage. Regional aggregates and countries without data for that year are left out.
worldbank.org/compare_countriesFinds the latest published BLS pay and employment for an occupation in the US, a state, or a metro area, and compares it with the national median.
bls.gov/get_occupation_wagesLooks up a World Bank statistic for a country and returns its annual values and latest value for the selected years.
data.worldbank.org/get_country_statisticGets the latest WHO value of a health statistic for a country, with sex-specific values, the regional value for the same year, and up to 10 years of history.
who.int/get_country_health_statisticsFinds the best-matching Occupational Outlook Handbook profile for a job title and returns its pay, entry requirements, jobs and 10-year outlook.
bls.gov/get_occupation_outlookGets a company's Fortune 500 or Fortune 1000 rank and headline figures for a list year. CEO, ticker and website come from the current company profile and may not reflect a historical year.
fortune.com/get_company_rankGets the latest official FIFA men's or women's national-team ranking, with points and movement since the previous ranking. Unranked teams are excluded.
fifa.com/get_world_ranking