Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Script for scraping data on baby names from the website of the Social Security Administration.
tree: 1a949d3924

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


This is a script for scraping data on popular baby names from the Social Security Administration's website (

It can be used to get nationwide data on the top 1,000 names for each sex in each year since 1880, and state-by-state data on the top 100 names for each sex in each year since 1960.

Requires: Python >= 2.6


Get national data, sent to standard output in CSV format:

    $ python

Get national data, saving it to a file in CSV format:

    $ python -f names.csv

Get state-by-state data, for all states

    $ python -s All

Get state data for Virginia, Maryland and Pennsylvania, saving it to a file:

    $ python -s VA,PA,MD -f mystates.csv
Something went wrong with that request. Please try again.