Comet composition provides critical information on the chemical and physical processes that took place during the formation of the Solar system. We report here on millimetre spectroscopic observations of the long-period bright comet C/2014 Q2 (Lovejoy) using the Atacama Pathfinder Experiment (APEX) band 1 receiver between 2015 January UT 16.948 and 18.120, when the comet was at heliocentric distance of 1.30 au and geocentric distance of 0.53 au. Bright comets allow for sensitive observations of gaseous volatiles that sublimate in their coma. These observations allowed us to detect HCN, CH 3 OH (multiple transitions), H 2 CO and CO, and to measure precise molecular production rates. Additionally, sensitive upper limits were derived on the complex molecules acetaldehyde (CH 3 CHO) and formamide (NH 2 CHO) based on the average of the strongest lines in the targeted spectral range to improve the signal-to-noise ratio. Gas production rates are derived using a non-LTE molecular excitation calculation involving collisions with H 2 O and radiative pumping that becomes important in the outer coma due to solar radiation. We find a depletion of CO in C/2014 Q2 (Lovejoy) with a production rate relative to water of 2.0 %, and relatively low abundances of Q(HCN)/Q(H 2 O), 0.1 %, and Q(H 2 CO)/Q(H 2 O), 0.2 %. In contrast the CH 3 OH relative abundance Q(CH 3 OH)/Q(H 2 O), 2.2 %, is close to the mean value observed in other comets. The measured production rates are consistent with values derived for this object from other facilities at similar wavelengths taking into account the difference in the fields of view. Based on the observed mixing ratios of organic molecules in four bright comets including C/2014 Q2, we find some support for atom addition reactions on cold dust being the origin of some of the molecules.