Former top officials of the Legal Services Corp. yesterday acknowledged lobbying and scrambling frantically to keep their agency afloat after President Reagan's election, but denied that the effort involved an illegal diversion of federal funds.

Testifying under heavy fire at a Senate hearing, former LSC president Dan Bradley said that he did everything he could "within the law as I interpreted it" to keep the agency's programs going despite the new administration's attempts to cut them to the bone.

He and three other former agency officials rejected suggestions by members of the Senate Labor and Human Resources Committee that they had tried to "stash away" unspent appropriations into hidden accounts for political purposes.

Sen. Jeremiah Denton (R-Ala.) and Orrin G. Hatch (R-Utah) said that they were basing their inquiries on a variety of documents compiled by committee investigators, including notes made by other LSC officials and outside organizations.

The witnesses contended, in turn, that they are being victimized by records being taken out of context.

"It's regurgitated crap," said Bradley, now a private attorney in Miami. "What has happened," he said, "is that some scalawags, some imbeciles who don't know what the hell is going on, who know nothing about managing a federal program" have reached unwarranted conclusions.

However, Bradley and Clint Lyons, who served as acting LSC president for several months in 1982, agreed that there had been missteps and excessive reactions at the agency in an effort to maintain "an aggressive legal services program."

That phrase was used several times in a series of December, 1980, memos by Alan Houseman, then director of the agency's research institute, who did not appear at the hearing. In several of them, Houseman said that the LSC had formed "a coalition" with outside groups, such as the National Clients Counsel and the National Legal Aid and Defenders Association, "to lobby and coordinate survival activities on behalf of the legal services community."

"It is essential to broaden the political base of local programs for short-term and long-term survival," one memo said. "Lobbying in Washington will only be successful if local programs have established credibility and a base in their communities and have developed allies who can and will assist them in persuading their congressmen and senators to support legal services."

The Houseman memos "should not have been written" Bradley testified. He said that "most LSC attorneys" never ran afoul of the law establishing the agency.

But he added, "I would be remiss if I did not say there have been violations: suits have been filed that should not have been filed; some clients were defended that should not have been defended; mistakes have been made at the lowest and highest levels, and there have been misjudgments."

But he and the other witnesses said that they always had the maintenance of legal services for poor clients uppermost in their minds.

"We were faced in 1981 with the hard, cold fact that LSC was going to be faced with a reduction of 25 percent," Bradley said. "There was a possibility that all these programs were going to be eliminated. . . . I, for one, am very very proud of what we did."

Hatch voiced concern about funds carried from one year to the next by LSC grant recipients, which he said leaves millions of dollars available for legal services over and above the agency's budget.

Bradley said that he is confident that the percentage of LSC funds spent on lobbying was "infinitesimally small."

But, Hatch said, "I think we've only scratched the tip of the iceberg."