Damon McCoy, who conducted the study with two fellow researchers, Laura Edelson and Shikhar Sakhuja, said they were not able to tally the total spending for Republicans and Democrats because their analysis was ongoing, though they planned to release those figures in the future.

As the midterms approach, political consultants have said that Democrats who are running for election are spending a smaller percentage of their ad budgets on digital ads than their rivals, sometimes as little as 10 percent versus more than 40 percent for Republicans. That has spurred volunteer efforts in Silicon Valley, which is widely regarded as liberal, to help bring Democratic campaigns into the digital age.

But the new study found a healthy amount of activity from what the researchers described as left-leaning politicians. Of the top 20 political candidates and PACs purchasing Facebook ads, 12 were identified as Democrats while eight were Republicans, according to data provided by the N.Y.U. researchers.

Facebook’s database worked well for identifying specific ads, Mr. McCoy said, but it did not give an overview of how a particular group or politician was advertising on Facebook. Some groups, he said, used multiple names to promote ads, such as the American Civil Liberties Union, which also had ads placed as the A.C.L.U.

The researchers said they also found 43,575 cases of ads with political content that did not name a sponsor, indicating that whoever purchased the ad did not go through Facebook’s verification process. They added that men and women between the ages of 25 to 34 were the most targeted for ads, while those under 17 or above 65 were the least targeted.

Facebook said it welcomed the new study and hoped others would begin delving into its data.

“This report is the exactly how we hoped the tool would be used — outside experts helping to analyze these ads on Facebook,” said Rob Leathern, Facebook’s director of product management. “It brings more transparency to the messages people see and increases accountability and responsibility over time, not just for us but advertisers as well.”