Systems and methods for performing robotic endoscopic surgical procedures, according to a surgical plan prepared on a preoperative set of three dimensional images. The system comprises a surgical robot whose coordinate system is related to that of fluoroscope images generated intraoperatively, by using a three dimensional target having radio-opaque markers, attached in a predetermined manner to the robot or to another element to which the robot is attached, such as the spinal bridge or an attachment clamp. The robot is mounted directly or indirectly on a bone of the patient, thereby nullifying movement of the bone, or a bone tracking system may be utilized. The coordinate system of the intraoperative fluoroscope images may be related to the preoperative images, by comparing anatomical features between both image sets. This system and method enables the endoscope to be directed by the robot along the exact planned path, as determined by the surgeon.