Artisanal gold mining can lead to soil contamination with potentially toxic elements (PTEs), necessitating soil quality monitoring due to environmental and human health risks. However, determining PTE levels through acid digestion is time-consuming, generates chemical waste, and requires significant resources. As an alternative, portable X-ray fluorescence (pXRF) offers a faster, more cost-effective, and sustainable analysis. This study compared total As, Ba, Cr, Cu, Fe, Mn, Ni, Pb, Sr, Ti, V, and Zn obtained from pXRF with their pseudo-total contents obtained through acid digestion (USEPA method 3051A) in areas influenced by artisanal gold mining in the Eastern Amazon, Brazil. pXRF data and machine learning algorithms were used to predict extractable Cu, Fe, Mn, and Zn. Linear regression models were fitted to compare the two methods, and random forest and support vector machine techniques were used to predict extractable contents. The best regression model fits for the pseudo-total PTE contents were those for Cu, Fe, Mn and Pb in agricultural areas (R2 > 0.80); Fe and Mn in gold mining residue (R2 > 0.70); and Ba, Cu and Mn in urban areas (R2 > 0.80). The best models for predicting the extractable PTE contents were those for Cu (R2 = 0.72; RMSE = 2.58mgdm-3) and Zn (R2 = 0.71; RMSE = 1.44mgdm-3) in agricultural areas and for Zn (R2 = 0.72; RMSE = 0.43mgdm-3) in gold mining residue. The results demonstrated that pXRF can characterize and predict PTE contents in mining-impacted areas, offering a sustainable approach to soil quality analysis.