Upper endoscopy, also known as EGD, is a procedure in which a thin scope with a light and camera at its tip is used to look inside the upper digestive tract — the esophagus, stomach, and first part of the small intestine, called the duodenum.