International audienceContext. Complex (iso-)nitrile molecules, such as CH3CN and HC3N, are relatively easily detected in our Galaxy and in other galaxies. Aims: We aim at constraining their chemistry through observations of two positions in the Horsehead edge: the photo-dissociation region (PDR) and the dense, cold, and UV-shielded core just behind it. Methods: We systematically searched for lines of CH3CN, HC3N, C3N, and some of their isomers in our sensitive unbiased line survey at 3, 2, and 1 mm. We stacked the lines of C3N to improve the detectability of this species. We derived column densities and abundances through Bayesian analysis using a large velocity gradient radiative transfer model. Results: We report the first clear detectio...