ABSTRACT: Importance:Nonfatal gunshot injuries are the most common firearm injury, but where they frequently occur remains unclear owing to data limitations. Natural language processing can be applied to medical text narratives of gunshot injury records to classify injury location and inform prevention efforts. Objective:To examine the performance of natural language processing (NLP) and machine learning models to predict nonfatal gunshot injury locations and generate new national estimates of the locations in which these injuries occur. Design, Setting, and Participants:Cross-sectional study of data from the National Electronic Injury Surveillance System Firearm Injury Surveillance Study on nonfatal gunshot injuries that occurred in the US between January 1, 1993, and December 31, 2015. The unweighted sample included 59?025 gunshot injuries that were initially treated at emergency departments. Data were analyzed from June 1, 2019 to July 24, 2020. Main Outcomes and Measures:The primary outcomes were classification of injury location and subsequent estimation of nonfatal gunshot injury location. The NLP was used to generate 6 sets of predictors, and 4 machine learning models were trained to classify the missing locations: multinomial support vector machines, lasso regression, XgBoost gradient descent, and feed-forward neural networks. For each of the 6 sets of NLP predictors, 70% of records with locations were randomly sampled to form the training set and the remaining 30% of records composed the test set. The best-performing model was validated by comparing the predicted locations were with those from existing national estimates of nonfatal gunshot injuries stratified by location and intent. Results:The unweighted sample included 59?025 nonfatal gunshot injuries; patients with these injuries were predominantly male (n?=?52?630, [89.2%]), of Black race/ethnicity (n?=?29?304 [49.6%]), and young (15-24 years; n?=?27?037 [45.8%]). In total, 54?089 nonfatal gunshot injuries that were weighted to approximate national estimates were included in the analysis. Existing national estimates suggest that the most prevalent nonfatal gunshot injury location is the home (n?=?14?764 [23.4%]), followed by the street or highway (n?=?14?402 [22.9%]), and other public places (n?=?7276 [11.6%]). After implementation of NLP classification, the most frequent gunshot injury location was the street or highway (n?=?27?200 [46.1%]), followed by the home (n?=?23?738 [37.7%]), and other public places (n?=?10?439 [15.1%]). Conclusions and Relevance:The findings of this study suggest that NLP and machine learning models may be useful for classifying gunshot injury location and that most nonfatal gunshot injuries occur in the street or highway rather than in the home; these findings can inform future firearm injury prevention efforts.