Olfaction is one of the evolutionarily oldest senses and plays a fundamental role in foraging as well as social interactions across mammals. In primates, however, its role has long been underappreciated, leading to a scarcity of studies on the role of olfaction for primate lives, particularly in Old World monkeys and apes. We therefore observed the sniffing behaviour of semi-free ranging Barbary macaques, Macaca sylvanus, at Affenberg Salem, Germany, to assess how frequently macaques use olfaction in which contexts, and how sniffing behaviour is affected by individual attributes such as sex and age. Focal observations of 24 males and 24 females aged 1 to 25 years showed that Barbary macaques sniffed, on average, 5.3 times per hour, with more than 80% of sniffs directed at edible items. Irrespective of the context, younger individuals used olfaction more often than older ones. Females sniffed more often at edible items than males did, while males used olfaction more often in a social context than females did. Sniffs at conspecifics primarily occurred in a sexual context, with 70% of social sniffs directed at female anogenital swellings. Of the 176 anogenital inspections recorded during focal follows and ad libitum, 51 involved sniffing the swelling. Notably, olfactory inspections of anogenital swellings were followed by a copulation significantly less often than merely visual inspections, suggesting that anogenital odours provided additional information guiding male mating decisions. In sum, results show that Barbary macaques routinely use olfaction during foraging, but also in a social context. Our study further suggests that odours may guide mating decision, but the role of olfaction in Barbary macaque sexual interactions warrants further investigations.