{
  "openapi": "3.1.0",
  "info": {
    "title": "Name Intelligence API",
    "version": "1.0.0",
    "description": "Gender inference with real probabilities and popularity history for 105,966 first names and 162,253 surnames.\n\nTurn a first name into structured intelligence: gender with a real probability, all-time popularity, active years, peak year and per-decade history — built from 146 years of official US Social Security records (1880-2025, 105,966 distinct names) plus the Census Bureau's 162,253-surname frequency file. One call answers what gender-inference services charge monthly for: Michael -> male at 99.5% over 4.4M records; ambiguous names answer honestly (Taylor -> female at 74%); unknown strings return null instead of a guess. Batch up to 100 names per POST for CRM and list enrichment. Search names by prefix, gender or popularity; pull full statistics with decade-by-decade counts (watch Ada peak in 1918 and revive in the 2020s); look up any surname's rank, count and per-100k frequency (Smith #1, Nguyen #38). All source data is public domain and refreshes with the SSA's annual May release. Built for CRM enrichment, personalization, analytics, form autofill and demographic research — statistical inference from official records, not identity claims about individuals. Complements our Baby Names API (popularity browsing) with the data-enrichment side. Self-hosted — no third-party calls at request time.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/name-intelligence.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/name-intelligence"
  },
  "servers": [
    {
      "url": "https://api-name-intelligence.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Tools",
      "description": "Name Intelligence API belongs to the Tools category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/gender": {
      "post": {
        "operationId": "batchInferGender",
        "summary": "Batch Infer Gender",
        "description": "Batch Infer Gender endpoint of the Name Intelligence API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/name-intelligence/batch-infer-gender"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "names": [
                  "Grace",
                  "Liam",
                  "Taylor"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "count": 4,
                  "results": [
                    {
                      "name": "Grace",
                      "gender": "female",
                      "probability": 0.9974,
                      "count": 536340
                    },
                    {
                      "name": "Liam",
                      "gender": "male",
                      "probability": 0.9985,
                      "count": 359085
                    },
                    {
                      "name": "Taylor",
                      "gender": "female",
                      "probability": 0.7441,
                      "count": 443686
                    },
                    {
                      "name": "Zzyzx",
                      "gender": "male",
                      "probability": 1,
                      "count": 10
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/sources": {
      "get": {
        "operationId": "dataSources",
        "summary": "Data Sources",
        "description": "Data Sources endpoint of the Name Intelligence API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/name-intelligence/data-sources"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "count": 2,
                  "sources": [
                    {
                      "slug": "census-surnames",
                      "name": "US Census Bureau surnames (2010 Census)",
                      "publisher": "US Census Bureau",
                      "licence": "US Government work - public domain",
                      "source_url": "https://www.census.gov/topics/population/genealogy/data/2010_surnames.html",
                      "file_url": "https://www2.census.gov/topics/genealogy/2010surnames/names.zip",
                      "cadence": "decennial",
                      "record_count": 162253,
                      "retrieved_at": "2026-09-02"
                    },
                    {
                      "slug": "ssa-names",
                      "name": "SSA national baby names 1880-2025",
                      "publisher": "US Social Security Administration",
                      "licence": "US Government work - public domain",
                      "source_url": "https://www.ssa.gov/oact/babynames/",
                      "file_url": "https://www.ssa.gov/oact/babynames/names.zip",
                      "cadence": "annual (May release)",
                      "record_count": 105966,
                      "retrieved_at": "2026-09-02"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/names/{name}": {
      "get": {
        "operationId": "getNameStatistics",
        "summary": "Get Name Statistics",
        "description": "Get Name Statistics endpoint of the Name Intelligence API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/name-intelligence/get-name-statistics"
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Ada"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "name": "Ada",
                  "gender": "female",
                  "gender_probability": 0.9974,
                  "counts": {
                    "male": 278,
                    "female": 106905,
                    "total": 107183
                  },
                  "years": {
                    "first": 1880,
                    "last": 2025,
                    "peak": 1918
                  },
                  "peak_count": 1950,
                  "by_decade": {
                    "1880": 8451,
                    "1890": 10422,
                    "1900": 9129,
                    "1910": 15286,
                    "1920": 15212,
                    "1930": 8521,
                    "1940": 5890,
                    "1950": 4306,
                    "1960": 2874,
                    "1970": 1929,
                    "1980": 1617,
                    "1990": 1600,
                    "2000": 3407,
                    "2010": 9044,
                    "2020": 9495
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/surnames/{name}": {
      "get": {
        "operationId": "getSurname",
        "summary": "Get Surname",
        "description": "Get Surname endpoint of the Name Intelligence API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/name-intelligence/get-surname"
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Nguyen"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "name": "Nguyen",
                  "rank": 38,
                  "count": 437645,
                  "per_100k": 148.36
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/gender/{name}": {
      "get": {
        "operationId": "inferGender",
        "summary": "Infer Gender",
        "description": "Infer Gender endpoint of the Name Intelligence API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/name-intelligence/infer-gender"
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Taylor"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "name": "Taylor",
                  "gender": "female",
                  "probability": 0.7441,
                  "count": 443686
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/names": {
      "get": {
        "operationId": "searchFirstNames",
        "summary": "Search First Names",
        "description": "Search First Names endpoint of the Name Intelligence API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/name-intelligence/search-first-names"
        },
        "parameters": [
          {
            "name": "gender",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "female"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "20"
          },
          {
            "name": "min_total",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "10000"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Ka"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "total": 68,
                  "page": 1,
                  "limit": 20,
                  "count": 3,
                  "results": [
                    {
                      "name": "Karen",
                      "gender": "female",
                      "gender_probability": 0.9972,
                      "counts": {
                        "male": 2785,
                        "female": 987989,
                        "total": 990774
                      },
                      "years": {
                        "first": 1881,
                        "last": 2025,
                        "peak": 1957
                      },
                      "peak_count": 40668,
                      "by_decade": {
                        "1880": 49,
                        "1890": 79,
                        "1900": 98,
                        "1910": 304,
                        "1920": 564,
                        "1930": 16760,
                        "1940": 168154,
                        "1950": 333094,
                        "1960": 286775,
                        "1970": 95549,
                        "1980": 35186,
                        "1990": 24694,
                        "2000": 20712,
                        "2010": 7398,
                        "2020": 1358
                      }
                    },
                    {
                      "name": "Kathleen",
                      "gender": "female",
                      "gender_probability": 0.9976,
                      "counts": {
                        "male": 1691,
                        "female": 713645,
                        "total": 715336
                      },
                      "years": {
                        "first": 1880,
                        "last": 2025,
                        "peak": 1951
                      },
                      "peak_count": 26749,
                      "by_decade": {
                        "1880": 389,
                        "1890": 1942,
                        "1900": 3924,
                        "1910": 16606,
                        "1920": 33679,
                        "1930": 34708,
                        "1940": 153343,
                        "1950": 224736,
                        "1960": 121252,
                        "1970": 45025,
                        "1980": 39578,
                        "1990": 24865,
                        "2000": 10065,
                        "2010": 3809,
                        "2020": 1415
                      }
                    },
                    {
                      "name": "Katherine",
                      "gender": "female",
                      "gender_probability": 0.9972,
                      "counts": {
                        "male": 1824,
                        "female": 650926,
                        "total": 652750
                      },
                      "years": {
                        "first": 1880,
                        "last": 2025,
                        "peak": 1990
                      },
                      "peak_count": 11657,
                      "by_decade": {
                        "1880": 6927,
                        "1890": 9413,
                        "1900": 12139,
                        "1910": 36965,
                        "1920": 42911,
                        "1930": 25332,
                        "1940": 40042,
                        "1950": 67002,
                        "1960": 50775,
                        "1970": 54251,
                        "1980": 99625,
                        "1990": 97053,
                        "2000": 65475,
                        "2010": 34165,
                        "2020": 10675
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/surnames": {
      "get": {
        "operationId": "searchSurnames",
        "summary": "Search Surnames",
        "description": "Search Surnames endpoint of the Name Intelligence API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/name-intelligence/search-surnames"
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "20"
          },
          {
            "name": "max_rank",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "100"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Ngu"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "total": 1,
                  "page": 1,
                  "limit": 20,
                  "count": 1,
                  "results": [
                    {
                      "name": "Nguyen",
                      "rank": 38,
                      "count": 437645,
                      "per_100k": 148.36
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}