4-(1H-pyrazol-3-yl)benzoic acid (0.30 g, 1.6 mmol) and iodomethane (0.34 g, 2.4 mmol) were used as raw materials, and the reaction was stirred for 1 h at room temperature with the addition of K2CO3 (0.66 g, 7.78 mmol) in DMF (8 mL) (the progress of the reaction was monitored by TLC, and the unfolding agent was 10% MeOH/CHCl3). . After completion of the reaction, the mixture was diluted with water (30 mL) and extracted with EtOAc (2 x 30 mL). The organic layers were combined, washed sequentially with water and brine, dried over anhydrous Na2SO4, filtered and concentrated under reduced pressure to afford methyl 4-(1H-pyrazol-3-yl)benzoate (0.31 g, 96% yield). The product was characterized by 1H NMR (DMSO-d6): δ 13.10 (br s, 1H), 7.98 (m, 4H), 7.80 (br s, 1H), 6.83 (d, J = 2.2 Hz, 1H), 3.86 (s, 3H).