(Eric Miller/Reuters)

Hundreds of local police departments across the United States have collectively spent about $4.75 million on software tools that can monitor the locations of activists at protests or social media hashtags used by suspects, according to new research.

The research, by the Brennan Center for Justice, a nonprofit organization focusing on criminal justice issues, aims to take a comprehensive look at the fast-growing phenomenon of social media-monitoring by law enforcement. Using public records, the Brennan Center tracked spending by 151 local law enforcement agencies that have contracted with start-ups that siphon data from Facebook, Instagram, Twitter and other sites, largely out of the public eye.

“The numbers we have are massively understated,” said Faiza Patel, co-director of the organization’s liberty and national security program, pointing out that agencies don’t always have any obligation to report their use of the software. “But it gives an indication of a phenomenon that is growing rapidly and flying under the radar.”

Top spenders were the City of Los Angeles, the Texas Department of Public Safety, the County of Sacramento, the Florida Department of Law Enforcement and the County of Macomb, which is a large county in Michigan. Each spent roughly $70,000 over the past three years, Brennan found.

In recent years, a crop of start-ups — with names like Geofeedia, SnapTrends and Dataminr — has sprung up to analyze data posted publicly on popular social media sites. These start-ups buy information from the social sites and analyze the data to look for trends or monitor events taking place at a certain location. Corporations buy the analysis, along with nonprofits, financial firms and, increasingly, law enforcement. The law enforcement trend has exploded in the past two years, Patel said.

Law enforcement officials say the tools can be useful because sometimes people who commit crimes brag about them on social media. Witnesses also may offer up clues, such as posting that they heard gunshots or posting video of events.

But advocates worry that the tools are being increasingly used to monitor protests and other public gatherings, and to target individual activists. The Oregon Department of Justice, for example, used software called Digital Stakeout to monitor people who used more than 30 hashtags on social media including #BlackLivesMatter, according to the American Civil Liberties Union and a lawsuit filed by one of the people who claimed to have been monitored.

Last month, thousands of people used a location-based tool called "Facebook Check-In" at a protest against an oil pipeline at the Standing Rock Sioux Reservation in North Dakota. Many who “checked-in” on Facebook were not physically at Standing Rock but wanted to thwart police who were reportedly monitoring people who were there. Police have denied using such tools at Standing Rock.

Brennan and other advocates say they fear that tracking could increase under President-elect Donald Trump. “Today the main way protesters organize is online,” Patel said. “This is a new administration that has been frankly threatening to the act of political protest.”

Brennan’s data, which tracked local law enforcement and did not examine the much larger spending by federal agencies such as the Federal Bureau of Investigation, was largely obtained from public records requests. The International Association of Police Chiefs has reported that at least 550 law enforcement agencies across 44 states use such tools to gather intelligence.

The rise of social media for law enforcement has become an increasingly perilous issue for technology companies. The companies do not bar law enforcement agencies from buying their data. The companies prohibit its misuse but don’t aggressively track how third parties use it. Last month, Facebook, Instagram and Twitter cut ties with Geofeedia, a software company whose tools have been used by law enforcement to track racially charged protests in Baltimore and in Ferguson, Mo.