The ligand 3-(2-pyridyl)pyrazol-1-yl acetic acid (HL) has been prepared and the complexes [Ni(L)(N3)]
n
and [Cu(L‘)2(H2O)2]
n
[HL‘ = 3-(2-pyridyl)pyrazole] have been synthesised by reaction of HL and NaN3 with NiCl2·6H2O and CuCl2·2H2O under hydrothermal condition. Single-crystal X-ray diffraction analysis shows that [Ni(L)(N3)]
n
possesses a 1D infinite chain structure, which further forms a 2D supramolecular framework connected by π···π weak interactions, and [Cu(L‘)2(H2O)2]
n
is linked to form a 1D chain by π···π weak interactions, then to a 2D supramolecular structure by weak C–H···O interactions.