SAN FRANCISCO (Reuters) - Facebook Inc FB.O announced a plan to increase transparency about its role in political advertising on Friday, ahead of congressional hearings next week on social media companies and Russia's meddling in last year's U.S. presidential election.

FILE PHOTO: Facebook logo is seen at a start-up companies gathering at Paris' Station F in Paris, France on January 17, 2017. REUTERS/Philippe Wojazer/File Photo

Rob Goldman, Facebook’s vice president for ads, said in a blog post that the company would launch a publicly searchable archive next year containing details about the advertisements it runs related to U.S. federal elections.

Details will include the size of spending and the demographics of the audience the ads reached, Goldman said. The archive, beginning with ads carried in 2018, will cover a rolling four-year period, he said.

Internet political ads have boomed in recent years as U.S. politicians looked for different ways to reach potential supporters, and as companies including Facebook have created tools to allow targeted marketing.

Online ads, though, are generally viewable only to the intended audience, raising concerns among transparency advocates, researchers and lawmakers about how to hold politicians accountable for what they say.

The planned archive reflects a change in corporate policy for the world’s largest social network, which had previously resisted the idea.

In June, Facebook told Reuters that it would go on treating political ads like all others and that creating an online repository would violate the confidentiality of those advertisers.

Since then, Facebook, Twitter Inc TWTR.N and Alphabet Inc's GOOGL.O Google have all said that Russia-based operatives bought ads and used fake names on their services to spread politically divisive messages in the months before and after the 2016 U.S. election.

Moscow has denied interfering in the election.

Next week, general counsels for Facebook, Google and Twitter will testify before public hearings of three U.S. congressional committees about the alleged interference and proposed legislation to require them to disclose election-related ads.

Goldman wrote in his post: “Transparency helps everyone, especially political watchdog groups and reporters, keep advertisers accountable for who they say they are and what they say to different groups.”

Facebook said its archive will eventually expand beyond the United States and show ads from elections in other countries and jurisdictions.

In the future, advertisers on Facebook will also be required to include a disclosure in election-related ads, to read: “Paid for by,” the company said.

The announcement fleshes out ideas that Facebook Chief Executive Mark Zuckerberg outlined in September, as criticism of California-based Facebook built inside the United States over the Russian ads.

The changes will test in Canada before being brought to the United States ahead of November 2018 elections, Facebook said.

Twitter took similar steps this week, saying it would add labels to election-related ads and say who is behind them, and it barred two Russian media outlets from running ads.