Context : Aims : We aim to investigate the physical and chemical properties of the molecular envelope of the oxygen-rich AGB star IK Tau . Methods : We carried out a millimeter wavelength line survey between \sim 79 and 356 GHz with the IRAM-30 m telescope . We analysed the molecular lines detected in IK Tau using the population diagram technique to derive rotational temperatures and column densities . We conducted a radiative transfer analysis of the SO _ { 2 } lines , which also helped us to verify the validity of the approximated method of the population diagram for the rest of the molecules . Results : For the first time in this source we detected rotational lines in the ground vibrational state of HCO ^ { + } , NS , NO , and H _ { 2 } CO , as well as several isotopologues of molecules previously identified , namely , C ^ { 18 } O , Si ^ { 17 } O , Si ^ { 18 } O , ^ { 29 } SiS , ^ { 30 } SiS , Si ^ { 34 } S , H ^ { 13 } CN , ^ { 13 } CS , C ^ { 34 } S , H _ { 2 } ^ { 34 } S , ^ { 34 } SO , and ^ { 34 } SO _ { 2 } . We also detected several rotational lines in vibrationally excited states of SiS and SiO isotopologues , as well as rotational lines of H _ { 2 } O in the vibrationally excited state \nu _ { \mathrm { 2 } } =2 . We have also increased the number of rotational lines detected of molecules that were previously identified toward IK Tau , including vibrationally excited states , enabling a detailed study of the molecular abundances and excitation temperatures . In particular , we highlight the detection of NS and H _ { 2 } CO with fractional abundances of f ( NS ) \sim 10 ^ { -8 } and f ( H _ { 2 } CO ) \sim [ 10 ^ { -7 } –10 ^ { -8 } ] . Most of the molecules display rotational temperatures between 15 and 40 K. NaCl and SiS isotopologues display rotational temperatures higher than the average ( \sim 65 K ) . In the case of SO _ { 2 } a warm component with T _ { \mathrm { rot } } \sim 290 K is also detected . Conclusions : With a total of \sim 350 lines detected of 34 different molecular species ( including different isotopologues ) , IK Tau displays a rich chemistry for an oxygen-rich circumstellar envelope . The detection of carbon bearing molecules like H _ { 2 } CO , as well as the discrepancies found between our derived abundances and the predictions from chemical models for some molecules , highlight the need for a revision of standard chemical models . We were able to identify at least two different emission components in terms of rotational temperatures . The warm component , which is mainly traced out by SO _ { 2 } , is probably arising from the inner regions of the envelope ( at \lesssim 8 R _ { * } ) where SO _ { 2 } has a fractional abundance of f ( SO _ { 2 } ) \sim 10 ^ { -6 } . This result should be considered for future investigation of the main formation channels of this , and other , parent species in the inner winds of O-rich AGB stars , which at present are not well reproduced by current chemistry models .