Here a developed one-dimensional (1D) topological photonic crystal (PC) heterostructure for gas sensing is proposed by replacing air layers with the sensing material (gas) layers. Two promising sensing devices are proposed in the present study. In the first device, all air layers are replaced with gas layers, while only the interface layer is replaced in the second device. Accordingly, these two detection mechanisms make the proposed sensor a novel detector for low and high-refractive index gases. The proposed structure achieves numerically high values of all features sensor parameters, eg, high sensitivity of 888.285 n m/R I U and 806.658 n m/R I U of two modes, respectively, high-quality factor values reached 10 5. The figure of merit is higher than 10 5 R I U− 1 with a perfect value of detection limit around 10− 6 R I U. The proposed sensor supplies a potential platform to push the current technology's ability to …