Gastroenterology is the branch of medicine where the digestive system and its disorders are studied.
A gastroenterologist specializes in the diagnosis and treatment of diseases of the stomach, intestines, and related structures such as the esophagus, liver, gallbladder, and pancreas.
Endoscopy means looking inside and typically refers to looking inside the body for medical reasons using an instrument called an endoscope.
Endoscopy is a minimally invasive diagnostic medical procedure that is used to assess the interior surfaces of an organ by inserting a tube into the body. The instrument may have a rigid or flexible tube and not only provide an image for visual inspection and photography, but also enable taking biopsies and retrieval of foreign objects.