The U.S. Circuit Court of Appeals for the District of Columbia yesterday refused, 5 to 4, to reconsider an earlier ruling that upheld President Carter's authority to search for Iranian students illegally in this country.

In December, a three-judge appeals panel reversed a decision by a U.S. District Court judge saying that the administration's crackdown on Iranian students was unconstitutional because it focused on a single group.

The appeals courts said Carter's action was a legitimate exercise of the president's power to conduct foreign affairs without judicial interference.

Yesterday, in separate actions, the original appeals panel and the full court said it would not reconsider that decision. David Carliner, an attorney who represented Iranian students in the federal court, said he will now take the case to the U.S. Supreme Court.

Four members of the Appeals court, including Chief Judge J. Skelly Wright, said they wanted to rehear the Iranian students cases because they raise "grave constitutional issues." Wright was joined by Judges Spottswood W. Robinson, Patricia M. Wald and Abner J. Mikva.

Voting against a rehearing were Judges Edward A. Tamm, George E.MacKinnon and Roger Robb, who sat on the original panel, and Judges Malcolm R. Wilkey and Carl McGowan.

A spokesman for the Immigration and Naturalization Service said that of the 56,694 Iranian students who complied with a six-week reporting program ordered by Carter last November, 6,871 were found to be in violation of visa requirements and subject to deportation.

The spokesman said 18 Iranians have been deported, 55 left the country voluntarily and 1,350 others have agreed to leave voluntarily. Thousands of other students are arguing their cases at deportation hearings.