Flush with Republican pride after a visit to the Reagan Presidential Library in California, Mayor Rudolph W. Giuliani endorsed Gov. George W. Bush of Texas for President yesterday, saying he could restore the ''sense of unified purpose'' that Americans had during the Republican administrations of the 1980's.

Mr. Giuliani made the announcement at an early-morning news conference at City Hall, where he spoke with Mr. Bush by telephone, their conversation broadcast for reporters over a loudspeaker. Officials said the endorsement was timed to drum up attention for a visit by Mr. Bush to New York State, which will begin Monday night in Buffalo and end Wednesday in New York City.

''I am here this morning, just having returned from the Reagan Library on the red-eye, so I think this is a very appropriate time to do this,'' Mr. Giuliani said in the Blue Room at City Hall, where he was joined by a fellow Republican, Borough President Guy V. Molinari of Staten Island. ''I believe that Governor Bush is the best candidate, Republican, Democrat, Independent or anything else, to be our next President.''

The unusual step of making the endorsement in a telephone call rather than at a more traditional joint appearance also seemed intended to insure that all of the formalities were out of the way, and that Mr. Giuliani had joined the crowded bandwagon of Republicans already supporting Mr. Bush, before the Texas Governor arrived.