Uncovering and explaining how our digital world is changing — and changing us.

Amazon, Apple and Google each spent record sums lobbying President Donald Trump and the rest of Washington, D.C., over the past three months, new federal records show, shelling out a combined $10 million to shape federal policy on everything from privacy to immigration reform.

It’s the most expensive quarter ever for these tech giants, many of which found themselves face to face with Trump in June as the White House commenced a new effort to modernize the inner-workings of the U.S. government and tackle regulations around drones and other emerging technologies.

Apple, for one, spent $2.2 million between April 1 and June 30, 2017 — about double from the same three-month period in 2016 — to lobby on issues like tax and surveillance reforms. The iPhone giant, like other businesses, had to disclose its lobbying activities from the second quarter of the year to the U.S. government by midnight.

In its filing, Apple explicitly called attention to its work around immigration — an issue that mattered so much to Apple CEO Tim Cook that he confronted Trump directly about it during a private reception at the White House in June.

But the biggest spender is still Google, which spent nearly $5.4 million to lobby Washington in the second quarter of 2017, its report shows.

As usual, the search-and-advertising giant focused its lobbying efforts on shaping self-driving car regulation, pushing for surveillance reforms and addressing potential competition concerns in the nation’s capital.

New to its agenda, however, is “government funding of science,” an item that appears on its lobbying disclosure months after Trump proposed a budget for the U.S. government that slashed federal science and research spending.

Apple declined to comment on its lobbying activities, while a spokeswoman for Google did not immediately respond to an email Friday.

If anything, these companies’ blossoming federal lobbying bills reflect the high stakes for the entire tech industry in Trump’s Washington. Some have warred openly with Trump — from the halls of Congress to U.S. courtrooms — around efforts to restrict immigration and rethink the U.S. government’s approach to climate change. Others have fought the administration as it prepares to unravel the government’s net neutrality rules.

For all their differences, however, Silicon Valley’s top executives see some space for potential compromise with Trump’s White House, including over tax and infrastructure reforms. The likes of Apple and Google long have sought to bring back billions of dollars in cash kept overseas without incurring a stiff tax penalty, an idea the president’s team has publicly supported.

To that end, Amazon spent a record $3.2 million in the second quarter of the year, according to its lobbying disclosure. It’s part of Amazon’s fast-paced growth spurt in Washington, D.C., where it even hired a top fundraiser for Trump from the 2016 presidential campaign as one of its lobbyists — perhaps hoping the president would stop slamming the company and its chief executive, Jeff Bezos.

Amazon’s political efforts also come as the company begins its work to sell a proposed $14 billion merger with Whole Foods to the U.S. government — a deal that already has drawn some early criticism on Capitol Hill. The company did not immediately respond to an email seeking comment.

Other big Beltway spenders include Facebook, which like some of its web company counterparts focused some of its $2.3 million in spending between April 1 and June 30 on fighting a proposal in Congress that seeks to impose new limits on how tech companies tap users’ data to sell ads.

The so-called Browser Act, unveiled by Republican Rep. Marsha Blackburn, has drawn immense opposition from groups like the Internet Association, which represents Amazon, Facebook, Google and others. The group previously told Recode the bill “has the potential to upend the consumer experience online and stifle innovation.”

Facebook also did not immediately respond to an email seeking comment.

Sign up for the newsletter Recode Daily Email (required) By signing up, you agree to our Privacy Notice and European users agree to the data transfer policy. Subscribe