49

Is there a database containing the list of the most popular first names and surnames (with occurrence count, or at least sorted by popularity) for many nations/countries?

I need such data for the generating of sample customer database. Customers from given land should at best have the realistic names from that land.

4
  • 1
    Maybe you can use names from telephone directories? May 8, 2013 at 21:05
  • if there are freely available telephone directories for multiple countries... but at best would be a single DB May 8, 2013 at 21:16
  • There may also be something useful in this StackOverflow thread: stackoverflow.com/questions/818203/… Dec 7, 2013 at 23:04
  • I bet the SE Worldbuilding would have something like that. Or even the SE RPG group. I've had to generate random names for RPG games before.
    – Bulrush
    May 26, 2016 at 11:28

15 Answers 15

24

There is a pretty massive list of given (first) names (~50,000), and it's carefully curated (not machine generated).

More details are available on another answer:

The best source of international human given (first) names comes from a German computer magazine. The text file has nearly 50k names that are classified by likely gender, and how popular in each country. It's carefully curated and has a friendly license (GNU Free Documentation License).

The file can be downloaded here : ftp://ftp.heise.de/pub/ct/listings/0717-182.zip (name_dict.txt contains the data).

(archive link: https://web.archive.org/web/20200414235453/ftp://ftp.heise.de/pub/ct/listings/0717-182.zip )

3
  • It is full of strange characters... Are you sure this is good and curated?
    – Lance
    Jan 13, 2022 at 8:24
  • it seems the original url is dead, but I've added an archive link. It's a zip file to download, not a single text file.
    – philshem
    Jan 13, 2022 at 8:56
  • @Lance, imagine there are more languages than English. They have their own way of representing different sounds. And some of them are used in personal names. All of the characters though fit in en.wikipedia.org/wiki/Extended_ASCII If you are looking for English only names then Multinational in the title should have warned.
    – hypers
    Jun 17, 2022 at 12:06
17

For the United States, the Census Bureau has lists of surnames from 1990 and 2000 censuses here. The US Census list for 2010 was, for a time, available on census.socrata.com but that site is no longer running. (You may be able to find it with this Wayback Machine link.) The Social Security Administration provides downloadable lists of first names by gender, year, and optionally by state, based on all Social Security registrations here.

2
  • I can't seem to find anything about what you are allowed to do with the data in the Social Security registrations link. Can anyone help with this? Can I use it for whatever I want? What about redistribution either in same or different format? Dec 7, 2013 at 22:56
  • 2
    I just found ssa.gov/websitepolicies.htm#a0=7 which suggests that it is free to use for whatever. Dec 7, 2013 at 23:28
11

Wikipedia has a category with lists of popular names linking to a handful of Wikipedia articles containing tables that should be helpful to you.

8

You can find a lot of valuable sources in wolframalpha about popular names. Bellow the table, there is an option "sources".

Here is the link

6

You can get such information from Wikidata (as mentioned by @sn3fru) with the Wikidata Query Service at https://query.wikidata.org and a formulation of a SPARQL query.

Here is a SPARQL query for number of citizens recorded with given name grouped wrt. country:

SELECT ?name ?nameLabel ?country ?countryLabel ?count
WITH {
  SELECT ?name ?country (count(?person) AS ?count) WHERE {
    ?person wdt:P735 ?name .  # First names
    ?person wdt:P27 ?country . 
  }
  GROUP BY ?name ?country
  ORDER BY DESC(?count)
  LIMIT 100
} AS %results
WHERE {
  INCLUDE %results
  SERVICE wikibase:label { bd:serviceParam wikibase:language     "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)

It shows that "John" is the most popular in the US (and globally) and Jean is the most popular given/first name in France.

An example with a query for most popular surnames in Denmark is:

SELECT ?name ?nameLabel ?count
WITH {
  SELECT ?name (count(?person) AS ?count) WHERE {
    ?person wdt:P734 ?name .  
    ?person wdt:P27 wd:Q35 . 
  }
  GROUP BY ?name
  ORDER BY DESC(?count)
  LIMIT 100
} AS %results
WHERE {
  INCLUDE %results
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)

In this case Hansen, Nielsen and Jensen show up on the top, see http://tinyurl.com/ybpgrk9v

2
  • because this is with people who have wikipedia articles, will it skew toward older, more males, etc?
    – philshem
    Feb 26, 2019 at 15:45
  • Yes. If you only want people from a certain generation or people of a certain gender then the query can be modified to only return such people. Adding ?person wdt:P21 wd:Q6581072 will get you women. This query tinyurl.com/y4zhlbqx gets Danish females born after 1990. Feb 26, 2019 at 17:17
5

There was an API, babynamemap, but as you can see it now redirects to the projects source on github and hasn't been maintained for two years GitHub page where the project's source used to be. Aside from that I suppose you could always scrape Wikipedia's pages. As far as the phone book idea goes it looks like there is an API for the White Pages, not sure if they accept international zip codes though. There is also the Bing PhoneBook API, here is an example of that.

5

I can't find the full data set, but here is a bit on the most common names in Denmark.

  • Pigenavne = Female first names.
  • Drengenavne = Male first names.
  • Efternavne = Surnames.
  • First first name and last surname is included. All middle names are omitted.
  • Surnames consisting of two hyphenated names are treated as one name.
4

For the purpose of generating a sample customer database, the Fake Name Generator can generate random personal details.

They have name sets from many different countries and can also generate other fake details (such as e-mail or phone number) based on a selected country (i.e. all phone numbers will have the correct length and country code).

On the order in bulk page you request a large set of fake names (and other user specified details) at once.

1
  • Russian names, surnames and their combinations are not very probable… Nov 16, 2017 at 8:12
3

Here is a dataset of first names and last names which I scraped from Wiktionary Names Appendix

https://github.com/solvenium/names-dataset

3

You can use leaked Facebook name dataset with 1.6M first names and 3.5M last names: https://github.com/philipperemy/name-dataset

1
  • This one is good indeed. It has gender and countries attributes. Though the figures seem not right. The current version has 728K first names and 984K last names. One should research more the legal aspect considering the source.
    – hypers
    Jun 17, 2022 at 12:51
2

In the Netherlands the Meertens Institute keeps an accurate record of all the names of Dutch citizens. You can enter a name and (if more than 100 people have that name) it will show you all kinds of statistics on the name.

The first name interface can be found here: https://www.meertens.knaw.nl/nvb/english/
The family name interface can be found here: http://www.cbgfamilienamen.nl/nfb/index.php?taal=eng

For example, the number of Peters born each year in the Netherlands:

The number of people with first name 'Peter' that were born in the Netherlands by year.

Note: the results are in Dutch, relevant translation key:
"is gelijk aan" = equals
"als eerste naam" = as first name
"als volgnaam" = as (one of the) middle name(s)
"verspreiding" = spread
"m/v" = male/female

2

You can use the random names generator of Namespedia to build your dataset http://namespedia.com/random-name-generator.php

1
  • Russian names, surnames and their combinations are very improbable. Nov 16, 2017 at 8:12
2

US Census has all surnames occurring more than 100 times, sorted by frequency of occurrence here: https://www.census.gov/topics/population/genealogy/data/2010_surnames.html

US Social Security Administration has popular first names available here: https://www.ssa.gov/oact/babynames/limits.html

2

I suggest Damegender as Python Tool for this taks. This software shares very good open datasets (USA, UK, Spain, Uruguay, ...) and it is giving support to machine learning features to guess gender in names if it doesn't appear in the dataset with good results.

For instance,

$ python3 main.py Susana --verbose

0 males for Susana from INE.es

95677 females for Susana from INE.es

15 males for Susana from Uruguay census

2689 females for Susana from Uruguay census

0 males for Susana from United Kingdom census

47 females for Susana from United Kingdom census

52 males for Susana from United States of America census

19669 females for Susana from United States of America census

Susana gender predicted with nltk is female

Susana gender predicted with sgd is female

Susana gender predicted with svc is female

Susana gender predicted with gaussianNB is female

Susana gender predicted with multinomialNB is female

Susana gender predicted with bernoulliNB is female

Susana gender predicted with forest is female

Susana gender predicted with tree is female

Susana gender predicted with mlp is female
0

A more interesting alternative might be to use the Wikipedia Data API and capture all the millions of people on the WikiData as well as their origin and date of birth. That way you will have a base of names from all over the world and already structured by the semantics of wikipedia.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.