Oxyfluoride glass-ceramic containing KTb2F7 nanocrystals can convert UV light into visible light, and then the visible light is absorbed by Si-APD to produce a photocurrent. This UV detector has a large dynamic linear response range, fast response speed and high sensitivity.