A gastroscopy is an endoscopic examination of the esophagus, stomach, and first part of the small intestine using a thin, flexible endoscope inserted through the mouth. The endoscope contains a light and video camera, allowing the doctor to visually inspect the inner lining. Samples can be taken using instruments through a side channel. Gastroscopies are used to investigate symptoms like indigestion, examine abnormalities detected on other tests, and diagnose conditions like ulcers or cancer. The procedure is generally safe and well-tolerated, though sedation is often used.