Endoscopy is used to diagnose and, sometimes, treat conditions that affect the upper part of the digestive system, including the esophagus, stomach and beginning of the small intestine (duodenum).Your doctor may recommend an endoscopy procedure to:Investigate causes of digestive signs and symptoms. Endoscopy may help your doctor determine what’s causing signs and symptoms, such as nausea, vomiting, abdominal pain, difficulty swallowing and gastrointestinal bleeding.

Endoscopy is sometimes combined with other procedures, such as ultrasound. An ultrasound probe may be attached to the endoscope to create specialized images of the wall of your esophagus or stomach. An endoscopic ultrasound may also help to create images of hard-to-reach organs, such as your pancreas.