A gas supply apparatus comprising: a gas supply conduit (142a, 64, 96) communicating with a gas supply source to supply a gas to a digestive tract inside a subject; pressure detecting means (126 to 129) adapted to detect a pressure in the digestive tract; flow regulating means (123, 154) adapted to regulate an amount of the gas supplied from the gas supply source to the digestive tract via the gas supply conduit (142a, 64, 96); first control means adapted to control the flow regulating means (123, 154) according to a result detected by the pressure detecting means (126 to 129) to supply the gas into the digestive tract so that the pressure inside the digestive tract becomes a set pressure; digestive tract capacity obtaining means (130, 128) adapted to estimate a capacity of the digestive tract on the basis of the pressure change between the pressure before supply in the digestive tract, which means pressure in the digestive tract before a fixed amount of gas is supplied to the inside of the digestive tract and the pressure after supply in the digestive tract, which means pressure in the digestive tract after a fixed amount of is supplied to the inside of the digestive tract; second control means adapted to control the flow regulating means (123, 154) according to a capacity of the digestive tract, which is estimated by the digestive tract capacity obtaining means, to supply the fixed amount of gas into the digestive tract; and gas supply mode switching means adapted to switch between a plurality of gas supply modes including a first gas supply mode for executing control by the first control means and a second gas supply mode for executing control by the second control means. a gas supply conduit (142a, 64, 96) communicating with a gas supply source to supply a gas to a digestive tract inside a subject; pressure detecting means (126 to 129) adapted to detect a pressure in the digestive tract; flow regulating means (123, 154) adapted to regulate an amount of the gas supplied from the gas supply source to the digestive tract via the gas supply conduit (142a, 64, 96); first control means adapted to control the flow regulating means (123, 154) according to a result detected by the pressure detecting means (126 to 129) to supply the gas into the digestive tract so that the pressure inside the digestive tract becomes a set pressure; digestive tract capacity obtaining means (130, 128) adapted to estimate a capacity of the digestive tract on the basis of the pressure change between the pressure before supply in the digestive tract, which means pressure in the digestive tract before a fixed amount of gas is supplied to the inside of the digestive tract and the pressure after supply in the digestive tract, which means pressure in the digestive tract after a fixed amount of is supplied to the inside of the digestive tract; second control means adapted to control the flow regulating means (123, 154) according to a capacity of the digestive tract, which is estimated by the digestive tract capacity obtaining means, to supply the fixed amount of gas into the digestive tract; and gas supply mode switching means adapted to switch between a plurality of gas supply modes including a first gas supply mode for executing control by the first control means and a second gas supply mode for executing control by the second control means.