Need another reminder of how much drugmakers spend to discover what doctors are prescribing? Look no further than new documents from the leading keeper of such data.

IMS Health Holdings Inc. says it pulled in nearly $2 billion in the first nine months of 2013, much of it from sweeping up data from pharmacies and selling it to pharmaceutical and biotech companies. The firm’s revenues in 2012 reached $2.4 billion, about 60 percent of it from selling such information.

The numbers became public because IMS, currently in private hands, recently filed to make a public stock offering. The company’s prospectus gives fresh insight into the huge dollars – and huge volumes of data – flowing through a little-watched industry.

IMS and its competitors are known as prescription drug information intermediaries. Drug company sales representatives, using data these companies supply, can know before entering a doctor’s office if he or she favors their products or those of a competitor. The industry is controversial, with some doctors and patient groups saying it threatens the privacy of private medical information.

The data maintained by the industry is huge. IMS, based in Danbury, Conn., says its collection includes “over 85 percent of the world’s prescriptions by sales revenue,” as well as comprehensive, anonymous medical records for 400 million patients.

All of this adds up to 10 petabytes worth of material — or about 10 million gigabytes, a figure roughly equal to all of the websites and online books, movies, music and TV shows that have been stored by the nonprofit Internet Archive.

IMS Health says it processes and brings order to more than 45 billion health care transactions each year from more than 780,000 different feeds around the world. “All of the top 100 global pharmaceutical and biotechnology companies are clients” of its products, the firm’s prospectus says.

Dr. Randall Stafford, a Stanford University professor who has used IMS data for his research, said the company has grown markedly in recent years through acquisitions of competitors and other companies that host and analyze data. As the pharmaceutical industry has consolidated, he says, IMS has evolved by offering more services and expanding in China and India.

“They’ve been trying to beef up their competitiveness in some areas by making all of these acquisitions,” he said.

IMS has especially expanded its database of anonymous patient records, which can match patients’ diagnoses with their prescriptions and track changes over time, Stafford said.

IMS sells two types of products: information offerings and technology services. The information products allow pharmaceutical companies to get national snapshots of prescribing trends in more than 70 countries and data about individual prescribers in 50 countries.

IMS’s prospectus offers examples of the questions companies are able to answer with its data, including which providers generate the highest return on a sales rep’s visit, whether a rep drives appropriate prescribing and how much reps should be paid.

IMS Health’s data collection and sales have been controversial.

Several years ago, three states passed laws limiting the ability of IMS and companies like it to collect data on doctors’ prescriptions and sell it to drugmakers for marketing purposes. Their intent was to protect physician and patient privacy and to reduce health care costs by reducing marketing of brand-name drugs. Once a drug loses patent protection and becomes generic, promotion essentially ceases.

IMS and other companies sued, and the U.S. Supreme Court ultimately ruled in their favor, finding a First Amendment right to collect and sell the information. (ProPublica and a group of media companies filed a legal brief supporting IMS on First Amendment grounds.)

ProPublica has sought to purchase data on individual providers from IMS and some of its competitors but was told by each that it could not buy the information at any price.

Instead, reporters obtained data from Medicare on providers in its taxpayer-subsidized drug program, known as Part D, which fills more than one in every four prescriptions nationally. The data is now on Prescriber Checkup, where anyone can look up individual doctors and compare their prescriptions to peers in their specialty and state.

ProPublica has found that in Part D, some of the top prescribers of heavily marketed drugs received speaking fees from the companies that made them.

Physicians and privacy advocates have argued that prescription records could be used to glean information about specific patients’ conditions without their permission. In addition, physicians have argued that they have a right to privacy about the way they choose drugs — but aren’t asked before pharmacies sell information about them.

Stafford said those concerns have parallels to recent revelations about mass surveillance by the National Security Agency.

“It’s part of a larger dialogue, which things like the NSA scandal have brought up,” he said. “There’s a lot of data out there that people don’t necessarily know about. ... We’re living in a time where people can accept some loss of privacy, but they at least want to know how their privacy is being compromised.”

In its prospectus, IMS cited several challenges to its growth, including data-protection laws, security breaches and increased competition from other data collectors. The filing notes that the United Kingdom’s National Health Service in 2011 started releasing large volumes of data on doctor prescribing “at little or no charge, reducing the demand for our information services derived from similar data.”

Until 2010, IMS Health was a publicly traded company. At that point, it was acquired for $5.2 billion, including debt, by private-equity groups and the Canadian pension board.

Bloomberg News, citing confidential sources, reported last fall that IMS’s owners may seek to value the company at $8 billion or more.

IMS Health declined to comment for this story, citing the regulatory quiet period before the public offering takes place. No date has been set.