In order to provide a temperature sensor or a temperature measuring apparatus having a temperature sensor, which enables direct temperature measurement, in particular even during treatment, in particular even with HF surgical devices, it is proposed that the temperature sensor includes a sensor element with a medium which can be excited to luminescence, in particular fluorescence, and an optical waveguide which is optically connected to the sensor element and is intended to supply light to the medium at an excitation wavelength and/or to pick up and conduct light at a luminescence wavelength of the medium which can be excited to luminescence.