The invention relates to an endoscopic capsule comprising a biocompatible housing (2) which houses at least one sensor device for acquiring medically relevant data. The endoscopic capsule is characterized in that a sensor (3) is arranged on the outer surface of the housing (2), the sensor (3) having a first electrode (4) which is produced of an acid-fast noble metal, and a second electrode (5) which is produced of silver. An electrical voltage can be applied between the first electrode (4) and the second electrode (5) and a change in an electric variable can be measured between the first electrode (4) and the second electrode (5) when ammonia is present. The endoscopic capsule according to the invention allows the screening of the gastric acid and of the tissue of the stomach lining for Helicobacter pylori in a manner that is gentle on the patient.