The opioid epidemic affects thousands of communities across the US. Recently, the Drug Enforcement Administration (DEA) launched an aggressive effort to monitor drug diversion. Our objective in this research is to assist the DEA’s effort to stop opioid shipments from reaching those at risk. We propose an anomaly detection algorithm to identify suspicious retail buyers of opioids. We implement our algorithm on the ARCOS database -- which tracks all opioid drug shipments across the US from 2006 to 2012. Our algorithm effectively identifies suspicious retail pharmacies and practitioners involved in drug diversion. It achieves 100 % precision and 100 % sensitivity, resulting in 100 % F-1 score for retail pharmacies. For practitioners, while precision remains at 100 %, sensitivity is 30 %, leading to 46 % F-1 score. By applying our algorithm, the DEA gains a powerful tool for promptly detecting suspicious retail buyers. This enables prevention of large opioid shipments by identifying potentially negligent or criminal drug retailers early. By doing so, we can safeguard vulnerable communities and save lives by ensuring that dangerous drugs do not easily reach them.