Ms. Edelson wrote software to get around some problems, such as “infinite loops” — that is, when the library gets stuck returning the same results over and over again. Many of her other fixes were jury-rigged bits of code to handle specific technical problems, she said.
Extracting all the data from the library, she said, “is probably impossible if you are following all the rules.”
Reporters from The Times tried to use data from the library to analyze political advertising ahead of last year’s midterm elections. But their work was thwarted by bugs and technical limits imposed by Facebook on how information could be searched and retrieved.
The Mozilla analysts and French officials, who also provided their research to The Times, reported a slew of similar problems. They found that identical searches often returned different results, and that the library became unreliable and often crashed when they tried to extract large amounts of information. The bugs and technical limits made it functionally impossible to track political advertising in some places, the French reported, citing the United States as an example.
In late May, Facebook reported there were 3.8 million ads in the American library. With each search limited to 2,000 results, the researchers needed to do 1,900 searches to collect all the data, “which we found impossible to achieve in the two weeks we tried,” they said.
The French officials also found that Facebook sometimes removed ads without explanation. They said 31 percent of the ads in the French library were removed in the week before the European elections, including at least 11 that violated French electoral law.
The company later told the researchers that the deletions were the result of a labeling problem. But Matti Schneider, the French foreign ministry official who oversaw the research, said it was important to see all the ads, even those that did not comply with Facebook’s labeling rules.
The deletions raise questions about “the trust one can put in research based on such shaky ground,” he said.