The spatial distribution of surface electromagnetic waves on a one-dimensional photonic crystal with a polymeric grating on top is mapped using a multiheterodyne scanning near-field optical microscope. The grating opens a bandgap. At the band edges, a stationary field formed by two surface waves with opposite propagation constants and almost identical amplitudes is produced. Field intensity maxima are localized to the grating peaks or grooves, depending on the wavelength. Far from the bandgap, we identify surface waves coupled via either the 0 or the −1 order of the grating. The corresponding phase profiles indicate that these waves propagate in opposite directions. © 2008 American Institute of Physics.