An endoscopic device of the capsular type that is mobile and that can be oriented inside a body cavity, such as the gastrointestinal tract, through a magnetic coupling of the inner magnetic means (1 1 ) inside said body and means for generating a magnetic field (13) external to the patient, and a system for blowing (4, 5, 6) a gaseous fluid and sucking said fluid and/or material present in the body cavity. The device is designed to avoid both the drawbacks of the conventional flexible endoscopes, by reducing the invasiveness and the pain, thus increasing the patients compliance, and the drawbacks of the capsular endoscopes, by improving their ability to control the movement and keeping the dimensions small. The endoscopic device further allows to carry out local therapeutic and/or surgical treatments of areas of the inspected gastrointestinal tract.