The swift detection of allergenic protein and other nutritional indicators in pea protein is crucial for food and breeding efforts, facilitating the targeted selection of specific pea varieties and the advancement and processing of healthful foods. Using near-infrared (NIR) spectroscopy, spectral data for different pea varieties in the range of 908-1676 nm were collected, which were subsequently integrated with chemical values obtained by conventional methods. Multivariate statistical analysis was employed to optimize, develop, and validate the model for the spectral data. The correlation coefficients of the calibration set based on partial least squares regression (PLSR) models ranged from 0.74 to 0.99, while those of the validation set ranged from 0.20 to 0.99. This study offers a precise and straightforward approach for evaluating the levels of several nutritional indicators, including allergenic proteins in peas, and for classifying different types.