Optomechanical crystal cavities have rich perspectives for detecting and indirectly analysing biological particles, such as proteins, bacteria and viruses. In this work we demonstrate the working principle of an optomechanical crystal cavity operating under ambient conditions as a sensor of submicrometer analytes by optically monitoring the frequency shift of thermally activated mechanical modes. The resonator has been specifically designed so that the cavity region supports a particular family of low modal-volume mechanical modes, commonly known as -pinch modes-. These involve the oscillation of only a couple of adjacent cavity cells that are relatively insensitive to perturbations in other parts of the resonator. The eigenfrequency of these modes decreases as the deformation is localized closer to the centre of the resonator. Thus, by identifying specific modes that undergo a frequency shift that amply exceeds the mechanical linewidth, it is possible to infer if there are particles deposited on the resonator, how many are there and their approximate position within the cavity region.