Chip-scale optical spectrometers have been drawing more and more research interests for its increasing applications in various lab-on-a-chip systems, e.g. medical diagnostics, biochemical sensing, and environmental monitoring, etc. It is also desirable in optical networks as a compact wavemeter. Significant progress has been made and chip-scale spectrometers have been demonstrated with various configurations, such as superprism or arrayed waveguide grating [1,2], Fabry-Perot filter array [3], micro-resonator array [4], etc. However, there is a fundamental tradeoff between the resolution and footprint on these dispersive components or resonance array. Tunable Fabry-Perot filter, on the other hand, turns the spectrum splitting from the spatial domain into temporal domain. It requires only one photodetector, and can achieve high resolution and small footprint at the same time [5]. To further reduce the footprint of the whole system, here we monolithically integrate the tunable Fabry-Perot filter with the photodetector into one single device, herein referred as a swept-wavelength detector. It employs quantum well structures in a Fabry-Perot cavity, with a high contrast grating (HCG) [6] as a microelectromechanical actuable top reflector and a distributed Bragg reflector (DBR) as the bottom reflector, shown in Figure 1. The ultrahigh reflectivity and light-weight of the HCG ensures a high finesse and a high tuning speed. A total bandwidth of 33.5 nm at 1550 nm and an operation speed of 200 kHz are experimentally demonstrated.