Police entered late on Thursday on the order of examining magistrate Pablo Ruz, searching for evidence of off-the-book payments linked to renovation work on the building from 2005 to 2011, a PP spokesman said.
The outcome of the raid on the central Madrid building was not known, a judicial source said. The search ended yesterday morning.
Speaking at a press conference, Mr Rajoy said he had given instructions to the party to collaborate fully with the investigation.
"We're waiting for their decision, though we're not worried," Mr Rajoy said.
Mr Ruz is looking into a slush fund that former PP treasurer Luis Barcenas says he ran to channel millions of euros of cash donations from construction magnates into the pockets of party leaders.
Mr Rajoy and other PP leaders have denied wrongdoing and are not direct targets of the investigation.
According to court documents, Mr Barcenas hid up to €48 million (£40m) in Swiss bank accounts. He is facing charges including money laundering and tax fraud in a separate case. He has also been charged in the slush fund case.