Overwhelmed by traffic and the steady climb of housing costs, potential homebuyers in the Bay Area are setting their sights on other markets, especially Sacramento and Seattle.

Analyzing 75 housing markets across the U.S., a new report by Redfin finds that the San Francisco metropolitan area — defined to include San Jose and Oakland — tops the list for having the most online searchers considering a move away from the metro area where they live.

New York is second on the list, followed by Los Angeles and Washington, D.C., as ranked by the brokerage’s “Migration Report” for the second quarter. It indicates that homebuyers increasingly are looking to leave expensive coastal cities in search of affordability.

The report — based on a sampling of more than one million users of the Redfin website — adds data to the body of evidence indicating that many Bay Area residents have had enough. In March, the Bay Area Council released a poll showing that 40 percent of the region’s residents said they want to move away in the next few years, a jump up from the 33 percent who said they wanted to leave a year earlier.

Redfin reported that San Francisco house hunters — faced with a median sale price of $1.25 million — most commonly look to Sacramento, where the median has been climbing, but still feels like a bargain: $376,000. Add in job opportunities in government, the health care industry and at nearby UC Davis — not to mention the attraction of the city’s old residential neighborhoods, the growth of its downtown and Sacramento’s proximity to the Gold Country and Tahoe — and one can get a sense of why buyers would be interested.

In the age of the mega-commuter, Sacramento is seen as a place to live affordably while driving or taking public transportation to Bay Area jobs.

The most common out-of-state destination for Bay Area-based buyers is Seattle, where the median price has been rising at a double-digit year-over-year clip and now sits around $750,000. For the time being, that’s apparently cheap enough for some buyers from the San Francisco metro area. Seattle boasts major employers, including Amazon, Microsoft and Boeing. (Redfin is headquartered there, too). Its closeness to mountains and water, as well as its lively cultural assets and its renowned restaurant and cafe scene make it a magnet for millennials and out-of-town buyers, generally.

For more Bay Area housing affordability, home sales and other real estate news

follow us on Flipboard.

For homeowners in Los Angeles, Redfin reported, the most common destination is San Diego — or Las Vegas, for those looking to leave the state.

Conversely, San Diego registered the greatest “net inflow” of Redfin’s online users, with the largest concentration of searches launched there by potential buyers from Los Angeles. Second on the list for “net inflow” was Sacramento, with a preponderance of searches there launched by buyers now living in the Bay Area.

The Bay Area also is the top point of origin for searches by out-of-towners looking to live in Austin, Texas, a growing tech hub where home prices may be going up, but remain affordable — at least by Bay Area standards.

Taylor Marr, a data scientist who worked on the report, cited “strong buyer demand and competition in mid-tier cities” including Phoenix, Atlanta and Sacramento.

The report also noted that Chicago, Boston and Seattle have the highest share of residents looking to stay in their current metro areas.