Chanting "Down With the Shah" and "U.S. Get Out of Iran," about 1,000 Iranian demonstrators yesterday marched in separate groups to the Capitol, the Iranian Embassy and CIA headquarters in nearby Langley to protest U.S. involvement in Iranian affairs.

The mostly student-age demonstrators, many wearing the now-familiar "Down With the Shah" masks, walked for five hours, in 90-degree heat, marking today's 25 anniversary of the coup that brought the shah to power.

Police, some of them in riot gear, were out in force but reported no arrests. A District police captain said he had had his men take away several sticks and clubs from the group at the embassy.

A spokesman for the demonstrators said that part of their route, along Massachusetts Avenue from the Iranian embassy to 11th Street NW, had been chosen "for maximum publicity" and it seemed to achieve that. Surprised noon hour shoppers and lunchgoers were handed leaflets by the protesters, who also blanketed parked cars with the handouts.

Along the route and at the Capitol steps, the group's leaders used a handcarried amplifier to shout their slogans. A police specialist following the route with a small noise measuring device insisted that the speaker was violating noise limits allowable under the District's recently enacted noise ordinance.

After repeated protests of police harassment and charges that police motorcycles were drowning the amplifier, the Iranians turned down the volume until it was barely audible.

Police, using a similar technique, towed a sound truck from the White House when Iranians demonstrated there in June.

The Iranians, from as far as away as Texas and Colorado, began to assemble at Lafayette Park between 7 and 9 p.m., according to U.S. Park Police. Shortly before 10 o'clock, the group of about 1,000 marched up 17th Street to DuPont Circle and along Massachusetts Avenue to the Islamic Center near the Iranian Embassy.

They were stopped there by police barricades at the bridge over Rock Creek Park.

After chants of "U.S. police helping the shah, down with the shah," a group of 200, waving banners and flags, started for the Capitol.

There, they circled for about 15 minutes around banner-holders while a spokesman read a position statement denouncing the shah, U.S. imperialism, President Carter's position on human rights and the FBI.

Meanwhile, a splinter group of about 500 began the long trek to the CIA, marching along Canal Road to Chain Bridge and up Dolley Madison Boulevard in McLean.

Traffic across the bridge was reduced briefly to one-lane each way, with delays for motorists of about 10 minutes.

Near the entrance to the CIA, the marchers were met by about 125 Virginia state policemen and Fairfax County police, all equipped with riot sticks and visored helmets.

As a police cordon circled the group, the demonstrators raised their fists and shouted for an end to the shah and to "U.S. imperialism." Traffic through the CIA entrance gate was noticeably absent.

The demonstrators departed in vans shortly before 4 p.m.

March organizers said that the cost of the day's activities, which they set at about $200,000 for pamphlets, transportation, food and lodging, were paid by the Iranian Student Association.

At the head of yesterday's column marching to the CIA was an American woman from the National Lawyers Guild who said she was there as a "legal adviser." Each time a police helicopter passed overhead, she jotted down the number that was painted across its belly.