The strategy of bandgap regulation is important for X-ray detection, but has not been reported for 1D Pb halide perovskite materials. In this work, three such materials, 1, 2 and 3, with a tunable bandgap, were fabricated for application in X-ray detection. 3 shows high sensitivity, far superior to commercial X-ray detectors.