An upper endoscopy—called endoscopic gastroduodenoscopy (EGD)—is a procedure that helps find most stomach cancers. During this test, a doctor looks inside your stomach with a thin, lighted tube called an endoscope. The doctor guides it through your throat and down into your stomach. You are sedated during this test. An upper endoscopy also checks your esophagus and part of your duodenum, which is the first section of your small intestine. If the doctor sees tissue that is abnormal, he or she takes a small sample to be checked for cancer cells. This sample is called a biopsy. A pathologist looks at the sample under a microscope.
In addition to checking for stomach cancer, this biopsy can also tell whether H. pylori bacteria infection—a noncancerous disease—or another type of cancer called a lymphoma is present. Your doctor may do upper endoscopy along with an endoscopic ultrasound (EUS) exam. The EUS uses sound waves to make a better picture of your stomach, nearby tissues, and lymph nodes.