The report comes amid damaging disclosures that the National Security Agency can crack the encryption of online traffic -- email, medical records, online shopping and other Web activities -- of the world's biggest Internet companies, including Yahoo.
The disclosures in the Guardian, The New York Times and ProPublica were taken from documents from former intelligence contractor Edward Snowden and raise a fresh batch of concerns about the security of personal information stored online.
NSA spying appears to be taking a toll. Nearly 7 out of 10 Americans surveyed by Pew Research Center's Internet and American Life Project say current laws cannot shield their privacy online.
Internet companies have denied they give any direct access to intelligence officials. Google (GOOG), Microsoft, Facebook and other companies are pressing the Obama administration and congressional leaders to allow them to reveal more details about the requests they receive for users' personal information from intelligence agencies.
Yahoo has petitioned the Foreign Intelligence Surveillance Court in Washington to declassify documents from a classified case in 2008. The Department of Justice has said it will declassify the decision by Monday.
And Friday, Yahoo released a transparency report designed to assuage concerns.
"Our legal department demands that government data requests be made through lawful means and for lawful purposes. We regularly push back against improper requests for user data, including fighting requests that are unclear, improper, overbroad or unlawful," Yahoo General Counsel Ron Bell said.
The report shows that U.S. government agencies made more than 12,000 requests for information and more than 40,000 accounts in the first half of 2013. Yahoo said it responded with data such as email, Flickr photos and the like to more than 4,500 requests. It provided basic data such as name and location in fewer than 7,000 requests. It rejected 241 requests.
The next highest number of requests came from Germany, with 4,295; Italy, with 2,637; and Taiwan, with 1,942.
Like other technology companies, Yahoo's data show how rare the requests are: one-hundredth of 1 percent of Yahoo's global users were affected.
Yahoo said it would publish the transparency report every six months.
The report did not include data on Tumblr, which Yahoo bought in May for $1.1 billion. It plans to publish its own transparency reports.
Bloomberg News contributed to this report