In the present work the J + 1 <-- J rotational transitions, with J = 0 - 7, of (HCN)-N-15 and the J + 1 <-- J rotational transitions, with J = 0 - 7, 9, of (DCN)-N-15 have been investigated. The Lamb- dip technique has been employed in order to resolve the hyperfine structure due to deuterium and N-15. For (HCN)-N-15, the hyperfine parameters have been determined for the first time. With respect to (DCN)-N-15, only the spin rotation of N-15 have been determined for the first time but a more reliable spin rotation of D has been obtained. The experimental evaluation of the hyperfine constants has been aided by highly accurate ab initio computations. Furthermore, the rotational transitions observed allowed us to provide the most accurate ground state rotational parameters known at the moment for both (HCN)-N-15 and (DCN)-N-15.