Even before Senator Josh Hawley, Republican of Missouri, was sworn in at the beginning of the year, the tech companies reached out to him. Mr. Hawley had investigated Google as his state’s attorney general, and the industry saw him as a threat.

Facebook called, as did Twitter and Google. This winter, in Mr. Hawley’s windowless temporary office, the lobbyists for the companies came to meet with Mr. Hawley’s aides, arguing that their companies contributed to Missouri’s economy and were innovative businesses that did more good than harm for consumers, according to a person familiar with the meetings.

“There is a burgeoning awareness that there is a big problem with the dominance of big tech,” Mr. Hawley said in a recent interview. “Big tech may be more socially powerful than the trusts of the Roosevelt era, and yet they still operate like a black box.”

The internet giants have learned from the hard lessons of Microsoft, which was caught flat-footed with a sparse lobbying presence in the 1990s when federal antitrust officials called for a breakup of the software giant. Google has especially been forced to deal with regulatory issues, both in Europe, where it has been hit with three multibillion-dollar penalties, and in the United States, where it escaped an Obama administration-era Federal Trade Commission investigation without any action being taken.

The companies have separately argued that they have not violated antitrust laws. Google and Facebook say that their services are free and do not harm competitors and that consumers can turn to alternative search and social networking apps. Amazon has said it has a large share of online commerce but only a small fraction of the overall retail market. And Apple argues that the majority of apps in its store are free and that the company rejects only apps that violate its policies on hate speech and pornography, for instance, or try to take too much data from users.

“We have seen these tech companies escape accountability for years,” said Lisa Gilbert, the vice president of legislative affairs for the government watchdog group Public Citizen. The group, which has called for more user data protections and for breaking up Facebook, published a study last month showing that in the last two decades, 59 percent of top Federal Trade Commission officials who left the agency entered financial relationships with technology interests regulated by it.