It is no secret that millennials flock to trendy, low-cost cities. But bargains may not be the sole factor driving millennial homeownership, according to a new study that identified U.S. cities with the highest percentage of prospective millennial homebuyers.

The allure of Silicon Valley lives even among the younger generation, as millennials take over pricey San Jose real estate. After Minneapolis and Buffalo, N.Y., San Jose was the third most popular location for millennial homebuyers. Some 55.8% of the city’s home loan applications came from applicants ages 23 to 38, according to a LendingTree study of purchase mortgage requests in the U.S.’s top 50 metro areas from January 2019 to November 2019.

“There is a narrative that in the least affordable cities, like cities in California and New York City, that millennials are priced out. This study suggests this is not the case,” said Tendayi Kapfidze, chief economist at LendingTree.

Most and least popular cities for millennial homebuyers, according to a new LendingTree study. Graphic by: David Foster. More

A down payment for a home in San Jose averaged $148,098 compared to only $31,812 in Minneapolis and $20,777 in Buffalo, N.Y. — the two most popular cities among millennials, according to the study. Requested loan amounts in San Jose exceeded $647,000; compared to $219,590 in Minneapolis and $137,739 in Buffalo.

Millennials in San Jose are more likely able to afford to buy houses because of their high credit scores and salaries, said Kapfidze. Millennials in the Silicon Valley city have an average 720 credit score, the study said. According to 2019 U.S. Census data, householders 25 to 44 had an annual median income of $132,609, roughly double the $65,879 median income for that age group in the U.S.

Down payment is key

With a trendy downtown feel and cheap home prices, Minneapolis was the unsurprising top hub for millennial homebuyers. In Minneapolis, 56.2% of home loan applicants were millennials, the study found.

But it’s not just the trendy, active, urban feel of the city that attracts young homebuyers. Part of that comes from a low barrier to entry in home prices. The average down payment is $31,812; and the average loan is $219,590.

Buffalo, the second largest city in the state of New York, ranked No. 2 on the LendingTree study with 56.1% millennial homebuyers because it is also a low-cost option. The average down payment for a home in Buffalo is $20,777 and the average loan requested amount is $137,739.

“The key requirement [for buying a house] is to have that down payment. The larger that down payment, the longer it’s going to take to save up and have it ready,” said Kapfidze.

Meanwhile, the smallest percentage of millennial homebuyers, about 40% to 43%, are in Phoenix, Jacksonville, Fla., Tampa, Fla., Las Vegas, and Miami. Most of those markets are retirement destinations which predominantly attract Baby Boomers and Gen Xers, said Kapfidze.

Sarah Paynter is a reporter at Yahoo Finance. Follow her on Twitter @sarahapaynter

Read the latest financial and business news from Yahoo Finance

Follow Yahoo Finance on Twitter, Facebook, Instagram, Flipboard, SmartNews, LinkedIn, YouTube, and reddit.

More from Sarah:

Rich millennials are like their older cohorts: study

The ZIP codes where you can find the cheapest rent in the US

This new startup claims it will help you buy a home without a mortgage