A high-speed wavelength-tunable optical filter is a key device for selecting different wavelength optical packets on a packet-by-packet basis in a photonic packet switching system. In this paper, we describe a high-speed tunable filter using apodized sampled gratings which can achieve the required filter characteristics at low cost. A sampled grating structure that exhibits a comb-like filter response is adopted to obtain a wide tuning range, implemented in InGaAsP-InP deep-ridge waveguides with vertical-groove surface gratings. In addition, apodization is applied to the sampled grating to achieve a high extinction ratio. We fabricate the filter by integrating the sampled gratings within Mach-Zehnder interferometers. The filter exhibits a tuning range of 16 nm, an extinction ratio of 20 dB, a 3-dB transmission bandwidth of 32 GHz, and a switching time of less than 8 ns.