A battalion of United Auto Workers invaded Capitol Hill yesterday in an effort to check the movement of Japanese cars into the U.S. auto market.

Led by their commander-in-chief, Douglas A. Fraser, the estimated 800 union members trooped into offices, showed up at luncheons and pumped many a political hand in an effort to convince lawmakers that American workers are being done in by the onslaught of Japanese imports.

Fraser launched the attack with a vow that his heretofore "free trade" union will petition the International Trade Commission "to restrict the imports of foreign cars and trucks."

"The UAW has decided to file with the ITC because the Japanese auto companies refuse to show any restraint at a time when more than 250,000 U.S. auto workers have been laid off," Fraser told his men (and some women) at a hotel briefing before they moved on the Hill.

"We cannot afford in America to have depression-level unemployment for three or four years" while the domestic auto industry adjusts to meet consumer demand for smaller cars, Fraser said.

He added: "The auto industry here is in danger of losing up to one-third of the U.S. market permanently if action is not taken rapidly."

The actions sought by Fraser include higher tariffs on imported cars and trucks, creation of import quotas, and "mandatory orderly marketing agreements" -- as opposed to the current voluntary trade agreements which have been roundly criticized by the UAW and others.

Fraser didn't say when his union would file with the ITC. But one of his close associates said it could come within the next two months.

"This is not the preferred route, but it's the only way left to go if nothing constructive happens within the next 30 to 60 days," said the associate, speaking on background. He said yesterday's activity "was just another followup to Doug's speech in January" (13th) in which Fraser first announced his union's intention to move to a trade protectionist stance in defense of jobs.

The new UAW trade position ran into opposition yesterday from a source it presumably needs as an ally -- Thomas A. Murphy, chairman of General Motors Corp, the domestic auto industry leader.

Speaking before the Securities Industry Association in White Sulphur Springs, W.Va., Murphy said GM opposes "protection in any form.

"We believe that the adoption of protectionist policies is counterproductive and harmful to the long-term best interests of the country, the consumer and the auto industry," said the chairman of GM, which yesterday announced it was closing four more of its U.S. car assembly plants and laying off an additional 10,000 hourly workers.

Murphy said his company has "never been able to prove dumping" against the Japanese automakers, whom Fraser accuses of deliberately flooding the U.S. market with their cars and trucks.

"But the combination of their ability to come here while keeping their home market pretty much to themselves" is vexing, Murphy said of the Japanese.

The Carter administration, while sympathizing with jobless U.S. autoworkers, said again yesterday that it opposes attempts by the UAW and others to restrict imports of automibles.

In stating the administration's policy, a spokesman for Ambassador Reuben O'D Askew, the U.S. trade representative, referred a reporter to Askew's testimony last March 18 before a House trade subcommittee. The testimony said, in part:

"The imposition of import restrictions would cause us to lose the benefits of the competition which currently is stimulating the much-needed conversion of domestic production to smaller cars with higher gasoline mileage."

However, the Askew spokesman said that if UAW leaders "feel they can prove they have suffered serious injury" from allegedly unfair foreign competition, "They have the right to seek remedies under the Trade Act of 1974."

That act empowers the ITC to investigate and within six months after completion of an inquiry to recommend relief in cases where increased imports have harmed U.S. employment seriously. Any recommendation goes to the president for further action.

Strong support for the UAW position came yesterday from House Speaker Thomas P. "Tip" O'Neil (D-Mass.), who told cheering autoworkers that Japanese car firms are inviting "retaliatory action" by refusing to build in America more of the cars they sell to Americans.

"We must impose restrictions," O'Neill said, "Let this go as a warning. We must defend the domestic auto industry and its employes." he said.

In Detroit, Philip Caldwell, chairman of the financially slumping Ford Motor Co., expressed similar sentiments.

Caldwell said the Japanese automakers aren't as guilty of unfair competition in grabbing 21 percent of the U.S. auto market as they are of stinginess in sharing the goodies with U.S. workers and taxpayers.

"For them to come in and not pay taxes, or hire people, or contribute to our general economic health seems to me to be somewhat out of balance," Caldwell said of his Japanese competitors.

Back in Tokyo, the Japanese were trying to defuse that kind of criticism. Government sources there said Japan has worked out a plan to boost its imports of U.S. auto parts to $120 million annually from a current figure of $36 million.