# 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/workflows/social-security-administration
- Handle: `@social-security-administration`
- Category: [Data](https://fous.com/workflows/category/data)
- Source website: https://ssa.gov/oact/babynames
- Last verified: Sep 29, 2026
- Fous is not affiliated with Social Security Administration.

## Methods

### Get name popularity

Operation `get_name_popularity`, version 1. 1 credit per call.

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 call.

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

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_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.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

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=120) 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.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_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);
```

Or describe the data in plain language: send `{"api":"@social-security-administration","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## 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

### Is Fous affiliated with Social Security Administration?

No. Fous is not affiliated with Social Security Administration. This workflow reads the public ssa.gov website and returns its data.

### How much does it cost?

Each run costs 1 credit. 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; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check 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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/national-archives.md): Search the public U.S. National Archives Catalog for historical records.
- [All Data workflows](https://fous.com/workflows/category/data)
