To ensure high safety level in crude oil and its distillates storage tanks, petrochemical industry needs responsive and reliable hydrocarbon vapor sensing devices. We propose here a cost-effective petroleum vapor sensor that could be used effectively in oil tanks. The fabricated device is based on silicon nanowires (SiNWs) and has a good response to petroleum vapor concentration fluctuations. The chemiresistive sensitive device is a layer of SiNWs elaborated on a Cz-Si wafer with top planar Ag-Al electrical contacts. Petroleum vapors are obtained by heating crude oil. Detection measurements are performed at temperatures ranging from the ambient (18 °C) to 70 °C and for vapor concentrations varying between the Lower Explosion Limit (LEL) ~ 10000 ppmv and the Upper Explosion Limit (UEL) ~ 60000 ppmv.By measuring the time-dependent electrical resistance of the device at a fixed temperature, multiple cycles of response-recovery are obtained. As a main finding, we report on how the response of SiNWs to carbon number (nC) of petroleum vapor could be modulated by varying the device temperature.Therefore, at room temperature, when the petroleum vapor is rich of light hydrocarbon molecules (nC ≤ 7), adsorption–desorption cycles are quasi-reversible. However, at higher temperature, when vapors substantially contain heavier hydrocarbon molecules (nC > 7), we obtain a time dependent pronounced increasing drift in the chemiresistance of the device. Interestingly we found that the carbon number of molecules in the petroleum vapor plays a key-role in the response of the sensor.