A novel ultra-compact one dimensional (1D) photonic crystal (PC) nanobeam integrated sensor (1D PC NIS) is presented in this work, which is formed by series-connected 1D PC nanobeam bandstop filter (1D PC NBF) and 1D PC nanobeam cavity sensor (1D PC NCS). 1D PC NBF is based on an array of the same rectangular grating, with the photonics bandgap (PBG) range for 1538nm~1763nm. 1D PC NCS consists of a 1D PC nanobeam cavity, with the circle air-hole radius parabolically decreasing. By connecting these two parts above, the resonance within the stop band of 1D PC NBF will be filtered out, only the goal resonance used for refractive index sensing is left. Resonance wavelength position of the goal resonance remains the same basically. A high Q-factor of above 1.43×10<sup>3</sup> and a high sensitivity of 127.07nm/RIU can be obtained simultaneously, which agrees well with the 122.07nm/RIU obtained above without filter. Moreover, benefiting from the ultra-compact size (0.7μm×11μm), 1D PC NIS proposed in the paper is promising to be used for sensors array and multiplexed sensing.