Esophagogastroduodenoscopy (EGD) is a test that lets a doctor look inside your esophagus, stomach, and duodenum. (The duodenum is the first part of your intestines.) During an EGD, the doctor puts a thin, lighted tube called an endoscope down your throat. The endoscope has a camera on the end that takes pictures. The pictures can help the doctor find any problems. The doctor can also take samples of tissue for testing. EGD is a safe, common procedure that usually takes about 10 to 20 minutes.