The title compounds, C17H14N2O4 (I) and C15H12N2O4S (II), possess very similar molecular geometries. In both molecules, the central 1,3,5-trisubstituted dihydropyrazole ring adopts an envelope conformation. The oxobutenoic acid fragment has an almost planar Z conformation [r.m.s. deviations of 0.049 and 0.022 Å, respectively, for (I) and (II)] which is determined by the both bond conjugation and the strong intramolecular O - H⋯O hydrogen bond. The substituents in positions 1 and 3 of the dihydropyrazole ring [oxobutenoic acid and phenyl in (I) and oxobutenoic acid and thienyl in (II)] are nearly coplanar with its basal plane [the corresponding dihedral angles are 6.14 (9) and 2.22 (11)° in (I) and 6.27 (12) and 3.91 (11)° in (II)]. The furyl ring plane is twisted relative to the basal plane of the dihydropyrazole ring by 85.51 (8) and 88.30 (7)° in (I) and (II), respectively. In the crystal of (I), molecules form zigzag hydrogen-bonded chains along [001] by C - H⋯O hydrogen bonds, which are further packed in stacks along [100]. Unlike (I), the crystal of (II) contains centrosymmetric hydrogen-bonded dimers formed by pairs of C - H⋯S hydrogen bonds, which are further linked by weak C - H⋯O hydrogen bonds into a three-dimensional framework.