In this paper we present two compact, quantum cascade laser absorption spectroscopy based, sensors developed for trace substance detection in gases and liquids. The gas sensor, in its most integrated version, represents the first system combining a quantum cascade laser and a quantum cascade detector. Furthermore, it uses a toroidal mirror cell with a volume of only 40 cm(3) for a path length of up to 4 m. The analytical performance is assessed by the measurements of isotope ratios of CO2 at ambient abundance. For the (13)CO2/(12)CO2 isotope ratio, a measurement precision of 0.2‰ is demonstrated after an integration time of 600 s. For the liquid sensor, a microfluidic system is used to extract cocaine from saliva into a solvent (PCE) transparent in the mid-infrared. This system is bonded on top of a Si/Ge waveguide and the concentration of cocaine in PCE is measured through the interaction of the evanescent part of the waveguide optical mode and the solvent flowing on top. A detection limit of <100 μg mL(-1) was achieved with this system and down to 10 μg mL(-1) with a simplified, but improved system.