The invention provides a temperature sensing optical cable for a pipeline. The temperature sensing optical cable comprises a leather sheath and a cable core, the cable core is arranged in the leather sheath, pressure-bearing balls are annularly distributed outside the leather sheath, retention pipes are fixed outside the pressure-bearing balls, reinforcing mechanisms are arranged outside the retention pipes, positioning grooves are formed outside the retention pipes, elastic positioning balls are installed in inner cavities of the positioning grooves, assembling rods are fixed outside the positioning balls, an annular closed pipe is fixed at one end of each assembling rod, a shaping block is fixed at the head end of each closed pipe, and a shaping groove matching the shaping block is formed in the tail end of the closed pipe; an adjustable length telescopic tube is arranged on the side of the leather sheath in each closed pipe, a supporting rod is fixed to the surface of each closed pipe, a reset spring is installed at one end of each supporting rod, and an elastic block is installed at the end, located on the side face of a reset spring, of the supporting rod. The optical cable has the advantages that the cable core is not exposed after being cut, shielding protection can be performed, the service life is long, the cable is not easy to pull out, the use effect is good, integral compression resistance can be performed, and the compression of the cable core is small.