Rep. John B. Anderson extended his campaign for the U.S. presidency to the Arab world today and was greeted by hostile editorials in the semi-official Egyptian press accusing him of taking Israel's side on an electoral "hunting trip."

The criticism reflected official irritation in Egypt at Anderson's strong support of Israeli positions during his four-day visit to the Jewish state. His stay was capped this morning by a tour of East Jerusalem, captured by Israel in the 1967 Arab-Israeli war.

Particularly troubling, Egyptians said, were his call for U.S. recongnition of Jerusalem as the capital of Israel in the final stage of the Arab-Israeli peace process and his attack on the Carter administration for its public condemnation of Israeli Prime Minister Menachem Begin's settlements policy on the West Bank.

Both issues are regarded here as major obstacles to progress in the Egyptian-Israeli talks aimed at setting up self-rule in the occupied territories of the West Bank of the Jordan River and Gaza. Israeli actions on Jerusalem and the settlements prompted Egyptian President Anwar Sadat to suspend the talks in May. They are scheduled to resume next month. s

Despite the press criticism, however, Sadat went ahead with plans to receive Anderson Saturday at the presidential summer palace at Maamoura, near Alexandria on the Mediterranean Sea. Foreign Minister Kamal Hassan Ali also is scheduled to be present at Maamoura and parliament speaker Sufi Abu Taleb has organized a reception for the independent candidate Saturday evening.

The editorials thus were seen as reflections of displeasure among middle-level Egyptian officials, particularly in the Foreign Ministry where diplomats often hold less flexible views than the president and his immediate aides.

In an editorial entitled "Anderson on Hunting Trip," the prestigious Al Ahram wrote: "From his views we can realize how the American candidate, who has been a member of the Congress for 20 years, has nevertheless missed the real significance of the Jerusalem problems."

Editor Musa Sabri wrote in a frontpage editorial in the Newspaper Al Akhbar: "Even the man who is called the saint looks at the Jerusalem question with two separate eyes, one on Jewish voters who could be attracted by a pledge to make it the capital of Israel, while the other eye expresses observations designed to make things seem balanced, such as saying the recognition would come after achieving a comprehensive peace."

"Saint Senator Anderson," the editorial went on, apparently confusing Rep. Anderson's status, "do not play with words to deny the legitimate rights of people. This is the work of politicians who seek the support of voters through any means."

Anderson emphasized throughout his stay in Jerusalem his long record of support for Israel in Congress and sought to distinguish his positions from those of the Carter administration as more favorable to Israel. In particular, he criticized Carter for "singling out" the West Bank settlements as an obstacle to the autonomy negotiations.

This was particularly well received in the Begin government, where officials have expressed irritation at the U.S. statements and concern lest President Carter, if reelected, increase pressure on Israel once he is freed from he need to retain the loyalty of U.S. Jewish voters.

Begin, in a last-minute reversal, received Anderson for 40 minutes at Hadassah Hospital on the outskirts of Jerusalem, just before the candidate departed for Cairo. Observers speculated that Begin may have taken Anderson's speeches into account in the decision to see him.

On arriving in Cairo, Anderson said Begin had given him a message for Sadat. He refused to disclose it until meeting with the Egyptian president. s

Anderson seemed to be laying groundwork for his two-day stay in Cairo with a departure statement that for the first time since he arrived in the Middle East included a gesture toward the West Bank Palestinians whose future is the main subject of the Israeli-Egyptian negotiations. After four days in Israel, during which he saw no Palestinian leaders, Anderson said, "Peace in this country will endure only when the rights of the Palestinians as well as Jews are respected and advanced."

Then in a bow toward Sadat's insistence that the Camp David talks are the best avenue for advancing the Palestinian cause, Anderson added: "It is my conclusion that the rights of the Palestinians can best be served by their direct involvement in those negotiatins, as well as that of the government of Jordan."