Mn and Co doped TiO2 thin films are prepared by rf magnetron sputtering technique. GIXRD measurements shows anatase phase for pure TiO2 and Mn doped TiO2, however mixed anatase and rutile phase for Co doped TiO2. XANES and EXAFS measurements at dopant and host site confirm the substitution of host site by dopant ions. O K edge measurements and EXAFS results at the dopant site confirms the presence of oxygen vacancies. Ferromagnetism obtained in the doped TiO2 thin films is attributed to the oxygen vacancy mediated interaction between the TM ions. © 2018 Author(s).