Context. Because of inherent difficulties involved in observations and numerical simulations of the formation of massive stars, an understanding of the early evolutionary phases of these objects remains elusive. In particular, observationally probing circumstellar material at distances < ∼ 100 AU from the central star is exceedingly difficult, as such objects are rare (and thus, on average, far away) and typically deeply embedded. Long-baseline mid-infrared interferometry provides one way of obtaining the necessary spatial resolution at appropriate wavelengths for studying this class of objects; however, interpreting such observations is often difficult due to sparse spatial-frequency coverage. Aims. We aim to characterize the distribution and composition of circumstellar material around young massive stars and to investigate exactly which physical structures in these objects are probed by long-baseline mid-infrared interferometric observations. Methods. We used the two-telescope interferometric instrument MIDI of the Very Large Telescope Interferometer of the European Southern Observatory to observe a sample of 24 intermediate-and high-mass young stellar objects in the N band (8-13 μm). We had successful fringe detections for 20 objects and present spectrally-resolved correlated fluxes and visibility levels for projected baselines of up to 128 m. We fit the visibilities with geometric models to derive the sizes of the emitting regions, as well as the orientation and elongation of the circumstellar material. Fourteen objects in the sample show the 10 μm silicate feature in absorption in the total and correlated flux spectra. For 13 of these objects, we were able to fit the correlated flux spectra with a simple absorption model, allowing us to constrain the composition and absorptive properties of the circumstellar material. Results. Nearly all of the massive young stellar objects observed show significant deviations from spherical symmetry at mid-infrared wavelengths. In general, the mid-infrared emission can trace both disks and outflows, and in many cases it may be difficult to disentangle these components on the basis of interferometric data alone, because of the sparse spatial frequency coverage normally provided by current long-baseline interferometers. For the majority of the objects in this sample, the absorption occurs on spatial scales larger than those probed by MIDI. Finally, the physical extent of the mid-infrared emission around these sources is correlated with the total luminosity, albeit with significant scatter. Conclusions. Circumstellar material is ubiquitous at distances < ∼ 100 AU around young massive stars. Long-baseline mid-infrared interferometry provides the resolving power necessary for observing this material directly. However, in particular for deeply-embedded sources, caution must be used when attempting to attribute mid-infrared emission to specific physical structures, such as a circumstellar disk or an outflow.