An endoscope is a medical device consisting of a thin, flexible tube equipped with a light and camera. It is used to visualize the interior of a body cavity or organ. In pediatrics, endoscopes are adapted to suit the smaller anatomy of children and are used to diagnose and sometimes treat conditions affecting the gastrointestinal tract, respiratory system, and other internal organs.