Alecrim-do-campo (Baccharis dracunculifolia) is a species of agroindustrial and medicinal relevance that has attracted increasing interest in recent years due to its distinctive chemical profile rich in bioactive compounds. In this context, the present study evaluated the efficiency of different extraction conditions for volatile compounds in alecrim-do-campo, aiming to contribute to the traceability of products that use this species as a source of metabolites. A 2³ factorial design was employed to assess the best conditions for extracting volatiles by headspace solid-phase microextraction (HS‑SPME), using three different semipolar fibers (PDMS/DVB, DVB/CAR/PDMS and CAR/PDMS). Regarding the effect of the variation factors to which the samples were subjected, only the extraction time (min) had a significant effect on compound extraction using the CAR/PDMS fiber. In total, 79 volatile compounds were detected using the three fibers, with CAR/PDMS (43 compounds) and DVB/CAR/PDMS (44 compounds) showing the highest diversity. The nature of this study is important for the industry because it optimizes the search for quality parameters in plant-derived products.