# Social Security Administration API

> Social Security Administration returns U.S. baby-name ranks and birth counts through a workflow and API.

Social Security Administration (SSA) Get name popularity returns yearly U.S. ranks and reported birth counts for a required first name. Birth-record sex and year bounds are optional inputs to Get name popularity. List top baby names returns ranked U.S. or state names and birth counts for a year, with optional state and result limit.

- Page: https://fous.com/tools/social-security-administration
- Handle: `@social-security-administration`
- Category: [Data](https://fous.com/tools/category/data)
- Source website: https://ssa.gov/oact/babynames
- Last verified: Sep 29, 2026

## Methods

### Get name popularity

Operation `get_name_popularity`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get yearly U.S. baby-name ranks and reported birth counts from Social Security data. Ranks cover the top 1,000 names for each sex; counts are unavailable for names reported fewer than five times.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `sex` | string | no | `"male"` | Birth-record sex, such as female. Defaults to the more common sex for this name across the available years. |
| `to_year` | integer | no | `1993` | Last birth year to include, such as 2025. Defaults to the latest available year. |
| `from_year` | integer | no | `1990` | First birth year to include, such as 1990. Defaults to 1990. |
| `first_name` | string | yes | `"James"` | First name to check, such as Olivia. |

**Input schema**

```json
{
  "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 across the available years.",
      "examples": [
        "male"
      ]
    },
    "to_year": {
      "type": "integer",
      "minimum": 1880,
      "description": "Last birth year to include, such as 2025. Defaults to the latest available year.",
      "examples": [
        1993,
        2008
      ]
    },
    "from_year": {
      "type": "integer",
      "default": 1990,
      "minimum": 1880,
      "description": "First birth year to include, such as 1990. Defaults to 1990.",
      "examples": [
        1990,
        2023,
        2004
      ]
    },
    "first_name": {
      "type": "string",
      "minLength": 1,
      "description": "First name to check, such as Olivia.",
      "examples": [
        "James",
        "Olivia",
        "Harper"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "sex": "male",
      "to_year": 1993,
      "from_year": 1990,
      "first_name": "James"
    },
    {
      "from_year": 2023,
      "first_name": "Olivia"
    },
    {
      "sex": "male",
      "to_year": 2008,
      "from_year": 2004,
      "first_name": "Harper"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `sex` | string | `"male"` | Birth-record sex used for the rankings. |
| `name` | string | `"James"` | Name as reported by Social Security. |
| `years` | array |  | Annual popularity in chronological order. A missing count means fewer than five births were reported for that name and sex. |
| `years[].year` | integer | `1990` | Birth year. |
| `years[].page_link` | string | `"https://www.ssa.gov/oact/babynames/"` | Social Security page for looking up this year’s baby-name popularity. |
| `years[].popularity_rank` | integer or null | `8` | Rank among names of this sex, or null if not in the top 1,000. |
| `years[].number_of_babies` | integer or null | `32359` | Reported births with this name and sex, or null when unavailable. |

**Example input**

```json
{
  "sex": "male",
  "to_year": 1993,
  "from_year": 1990,
  "first_name": "James"
}
```

**Example output**

```json
{
  "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
    }
  ]
}
```

### List top baby names

Operation `list_top_baby_names`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

List ranked U.S. baby names and birth counts for a year, nationwide or in a state. National years begin in 1880; state years begin in 1960. State lists contain at most 100 ranks.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `year` | integer | no | `2024` | Birth year, such as 2024. Defaults to the latest available year. |
| `state` | string | no | `"California"` | U.S. state name or two-letter code, such as California or CA. Leave blank for the whole United States. |
| `max_results` | integer | no | `20` | Maximum ranks to return, such as 20. Up to 100 for a state, or 1000 nationwide. |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "year": {
      "type": "integer",
      "description": "Birth year, such as 2024. Defaults to the latest available year.",
      "examples": [
        2024,
        1960,
        1880
      ]
    },
    "state": {
      "type": "string",
      "description": "U.S. state name or two-letter code, such as California or CA. Leave blank for the whole United States.",
      "examples": [
        "California",
        "AK"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 1000,
      "minimum": 1,
      "description": "Maximum ranks to return, such as 20. Up to 100 for a state, or 1000 nationwide.",
      "x-fous-developer": true,
      "examples": [
        20,
        125,
        1000
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {},
    {
      "year": 2024,
      "state": "California",
      "max_results": 20
    },
    {
      "year": 1960,
      "state": "AK",
      "max_results": 125
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `area` | string | `"United States"` | United States or state name. |
| `year` | integer | `2025` | Birth year. |
| `names` | array |  |  |
| `names[].rank` | integer | `1` |  |
| `names[].boy_name` | string or null | `"Liam"` |  |
| `names[].girl_name` | string or null | `"Olivia"` |  |
| `names[].page_link` | string | `"https://www.ssa.gov/oact/babynames/"` | SSA page where visitors can select and view this list. |
| `names[].number_of_boys` | integer | `20818` |  |
| `names[].number_of_girls` | integer | `13544` |  |

**Example input**

```json
{}
```

**Example output**

```json
{
  "area": "United States",
  "year": 2025,
  "names": [
    {
      "rank": 1,
      "boy_name": "Liam",
      "girl_name": "Olivia",
      "page_link": "https://www.ssa.gov/oact/babynames/",
      "number_of_boys": 20818,
      "number_of_girls": 13544
    },
    {
      "rank": 2,
      "boy_name": "Noah",
      "girl_name": "Charlotte",
      "page_link": "https://www.ssa.gov/oact/babynames/",
      "number_of_boys": 20358,
      "number_of_girls": 13400
    },
    {
      "rank": 3,
      "boy_name": "Oliver",
      "girl_name": "Emma",
      "page_link": "https://www.ssa.gov/oact/babynames/",
      "number_of_boys": 14939,
      "number_of_girls": 12754
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@social-security-administration",
  "visibility": "public",
  "operation": "get_name_popularity",
  "version": 1,
  "input": {
    "sex": "male",
    "to_year": 1993,
    "from_year": 1990,
    "first_name": "James"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@social-security-administration\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_name_popularity\",\n  \"version\": 1,\n  \"input\": {\n    \"sex\": \"male\",\n    \"to_year\": 1993,\n    \"from_year\": 1990,\n    \"first_name\": \"James\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@social-security-administration",
  "visibility": "public",
  "operation": "get_name_popularity",
  "version": 1,
  "input": {
    "sex": "male",
    "to_year": 1993,
    "from_year": 1990,
    "first_name": "James"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/social-security-administration`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_name_popularity`: Get name popularity. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `list_top_baby_names`: List top baby names. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-social-security-administration https://api.fous.com/mcp/tools/social-security-administration --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Track a first name’s rank and reported births over time
- Compare ranked baby names across states
- Find top boy and girl names for a birth year
- Review national baby-name rankings by year

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Social Security Administration tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Social Security Administration account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from ssa.gov when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### How popular was a first name in a given year?

Get name popularity returns yearly ranks and reported birth counts for a first name and birth-record sex.

### What were the top baby names in a state?

List top baby names returns ranked names and birth counts for a selected state and year.

### What were the top U.S. baby names in a year?

List top baby names returns ranked national names and birth counts for a selected year.

## Related

- [World Bank API](https://fous.com/tools/world-bank.md): World Bank provides country statistics and latest values within selected years, plus country rankings for a chosen year or the latest broadly covered year.
- [US Census Bureau API](https://fous.com/tools/us-census-bureau.md): US Census Bureau returns statistics from varying Census years, population estimates through July 1, and address geographies using Census vintages that may differ from representation.
- [Ballotpedia API](https://fous.com/tools/ballotpedia.md): Ballotpedia provides state and local election information, ballot measure coverage, statewide measure details and results by year, and candidate and officeholder profiles with available background and election results.
- [Bureau of Labor Statistics API](https://fous.com/tools/bureau-of-labor-statistics.md): Bureau of Labor Statistics provides latest occupation pay, employment, career outlooks, unemployment, category inflation (up to 24 months’ history), and CPI conversions from January 1913.
- [Apple App Store API](https://fous.com/tools/apple-app-store.md): Apple App Store returns public app listings, keyword search, ratings, prices, listed purchases, country-specific reviews and visible replies, and up to 200 ranked chart apps.
- [IMF API](https://fous.com/tools/imf.md): IMF economic data provides country and regional forecasts with actual or forecast labels, and country rankings by World Economic Outlook indicators, excluding groups and missing values.
- [FIFA API](https://fous.com/tools/fifa.md): FIFA provides official men’s and women’s national-team rankings, excluding unranked teams, and year-specific tournament matches with scores, teams, stages and venues.
- [National Archives API](https://fous.com/tools/national-archives.md): Search the public U.S. National Archives Catalog for historical records.
- [All Data tools](https://fous.com/tools/category/data)
