About 450 staff members of the United Nations Secretariat from the Soviet Union and five other countries, many of them accused by Washington of being spies, will be restricted in their travels outside the New York City area starting Sunday, the United States announced today.

Secretary General Javier Perez de Cuellar denounced the restrictions as improper, "unduly onerous" and incompatible with American treaty obligations under the U.N. Charter and other agreements. In a note to the U.S. Mission to the United Nations, released today, he refused an American request that he help ensure compliance with the new rule.

The travel code, which now will require the Secretariat workers involved to seek U.S. approval of any trips beyond a 25-mile radius from Columbus Circle in midtown Manhattan, has long applied to diplomats, journalists and other government officials from the six countries.

In addition to the Soviet Union, which has about 300 U.N. staff members in New York, the countries involved are Afghanistan, with 20 U.N. employes, Cuba (with 30), Iran (50), Libya (40) and Vietnam (15).

The action taken by the State Department was mandated under an amendment to the department's budget authorization bill, adopted in July and sponsored by Sen. William V. Roth Jr. (R-Del.). But the administration, in its note informing the United Nations of the restrictions, accepted the mandate as necessary to curb espionage activities.

"It is a response to a serious concern over clandestine activities by employes of the Secretariat from the U.S.S.R. and certain other countries," said Irene Payne, a spokeswoman for the U.S. Mission. "Such activities are inconsistent with the status of these persons as international civil servants, and they pose a threat to the security of the United States."

Since the United Nations took up residence in New York 40 years ago, more than a dozen Soviet staff members have been arrested and deported on spying charges. But Perez de Cuellar noted that during his four years as secretary general, the United States had never brought to his attention any such charges against any Secretariat member. Were it to do so, he said, he would "take quick and effective action" against any staff member "shown to have engaged in any improper activities against the security of the host state."

But he rejected "any blanket, unsubstantiated accusation."

In a recent book, Soviet defector Arkady Shevchenko, who was once the top-ranking Soviet on the U.N. staff, confirmed that nine of 12 Soviet nationals working under him "were intelligence professionals" and added that "it is probably no exaggeration to count more than half of the more than 700 Soviets in New York city as . . . full-time spies."

Unlike Soviet diplomats, the U.N. staff members have been able until now to travel freely across the United States.

But, starting on Sunday, they and the other U.N. employes under the interdiction must submit requests for travel outside the 25-mile zone to the State Department's Foreign Missions Service Bureau in mid-Manhattan.

If their travel is on official U.N. business, the U.S. office would book their flights and hotel arrangements outside the zone. The office also considers personal requests for recreational travel on a case-by-case basis, U.S. officials said.

The secretary general challenged the right of the United States to determine whether travel by U.N. employes is official. Other U.N. officials noted that any cooperation with the processing of travel requests would constitute acceptance of the American rules.

Perez de Cuellar appealed to the United States to reconsider the imposition of the restrictions, but was told last night by U.S. officials that they would go into effect as scheduled.

Privately, U.N. officials conceded that the travel code does not violate any specific provisions of the U.N. Charter or the 1946 headquarters agreement regulating the U.N. presence in New York. Instead, they said, it runs counter to the essential character of the international civil service, which should be free from influence by one government.

Ironically, the way the rules are framed, they would apply to many nationals of Cuba, Libya, Iran and Afghanistan who are on the U.N. staff because they are alienated from the present governments of those countries and cannot safely return home.

One high-ranking U.N. executive from Iran, who did not wish to be identified by name, noted that at his home in New Jersey, "My bedroom is inside the 25-mile limit, so I can sleep, but unfortunately my bathroom is outside the zone." Others, who live in New York's Westchester County, are also beyond the limit. American officials indicated that these staffers could obtain exemptions upon application and suggested that those perceived as being no threat to the United States could obtain permanent exemptions for personal travel.

But another Iranian in exile, Zohreh Tabatabai, bristled at the requirement of applying to the State Department for permission to keep her U.N. speaking engagements in Seattle and Boulder, Colo., or asking leave to spend a weekend in the Hamptons on Long Island.

"I refuse to take another nationality, and I refuse to go to them -- it is outrageous," she said. "The U.N. will have to post me somewhere else. Many of us can't go home. We've already cut links with a country that was dear to us, and now the U.S. wants to intern us as it did to the Japanese" during World War II.