Context.One of the goals of astrochemistry is to understand the degree of chemical complexity that can be reached in star-forming regions, along with the identification of precursors of the building blocks of life in the interstellar medium. To answer such questions, unbiased spectral surveys with large bandwidth and high spectral resolution are needed, in particular, to resolve line blending in chemically rich sources and identify each molecule (especially for complex organic molecules). These kinds of observations have already been successfully carried out, primarily towards the Galactic Center, a region that shows peculiar environmental conditions.Aims.We present an unbiased spectral survey of one of the most chemically rich hot molecular cores located outside the Galactic Center, in the high-mass star-forming region G31.41+0.31. The aim of this 3mm spectral survey is to identify and characterize the physical parameters of the gas emission in different molecular species, focusing on complex organic molecules. In this first paper, we present the survey and discuss the detection and relative abundances of the three isomers of C2H4O2: methyl formate, glycolaldehyde, and acetic acid.Methods.Observations were carried out with the ALMA interferometer, covering all of band 3 from 84 to 116 GHz (~32 GHz bandwidth) with an angular resolution of 1.2′′ × 1.2′′ (~ 4400 au × 4400 au) and a spectral resolution of ~0.488 MHz (~1.3−1.7 km s−1). The transitions of the three molecules have been analyzed with the software XCLASS to determine the physical parameters of the emitted gas.Results.All three isomers were detected with abundances of (2 ± 0.6) × 10−7, (4.3−8) × 10−8, and (5.0 ± 1.4) × 10−9for methyl formate, acetic acid, and glycolaldehyde, respectively. Methyl formate and acetic acid abundances are the highest detected up to now, if compared to sources in the literature. The size of the emission varies among the three isomers with acetic acid showing the most compact emission while methyl formate exhibits the most extended emission. Different chemical pathways, involving both grain-surface chemistry and cold or hot gas-phase reactions, have been proposed for the formation of these molecules, but the small number of detections, especially of acetic acid and glycolaldehyde, have made it very difficult to confirm or discard the predictions of the models. The comparison with chemical models in literature suggests the necessity of grain-surface routes for the formation of methyl formate in G31, while for glycolaldehyde both scenarios could be feasible. The proposed grain-surface reaction for acetic acid is not capable of reproducing the observed abundance in this work, while the gas-phase scenario should be further tested, given the large uncertainties involved.