Context. A survey of mid-infrared gas-phase emission lines of H 2 , H 2 O and various atoms toward a sample of 43 embedded low-mass young stars in nearby star-forming regions is presented. The sources are selected from the Spitzer "Cores to Disks" (c2d) legacy program. Aims. The environment of embedded protostars is complex both in its physical structure (envelopes, outflows, jets, protostellar disks) and the physical processes (accretion, irradiation by UV and/or X-rays, excitation through slow and fast shocks) which take place. The mid-IR spectral range hosts a suite of diagnostic lines which can distinguish them. A key point is to spatially resolve the emission in the Spitzer-IRS spectra to separate extended PDR and shock emission from compact source emission associated with the circumstellar disk and jets.Methods. An optimal extraction method is used to separate both spatially unresolved (compact, up to a few hundred AU) and spatially resolved (extended, thousand AU or more) emission from the IRS spectra. The results are compared with the c2d disk sample and literature PDR and shock models to address the physical nature of the sources. Conclusions. The observed emission on ≥1000 AU scales is characteristic of PDR emission and likely originates in the outflow cavities in the remnant envelope created by the stellar wind and jets from the embedded young stars. Weak shocks along the outflow wall can also contribute. The compact emission is likely of mixed origin, comprised of optically thick circumstellar disk and/or jet/outflow emission from the protostellar object.