A miniaturized sensor was developed to determine the Young's modulus of tumors based on photoacoustic spectroscopy. The sensor had a chamber height of 5.3 mm and diameter of 5.8 mm; thus, this device is smaller than conventional endoscopes, the outer diameters of which are typically about 10 mm. A non-restrained methodology for determining the Young's modulus of tumors was proposed based on the resonance frequency of the photoacoustic signal. The proposed approach was applied to silicone rubbers with six different Young's moduli (30, 64, 123, 224, 396, and 574 kPa) and showed good resolution (±2 kPa) and high reproducibility. These results show that the photoacoustic technique can be applied to mechanically characterize soft tissue by diagnostic endoscopy.