Misuse of prescription opioids is a leading cause of premature death in the United States. We use state government administrative data and machine learning methods to examine whether the risk of future opioid dependence, abuse, or poisoning can be predicted in advance of an initial opioid prescription. Our models accurately predict these outcomes and identify particular prior non opioid prescriptions, medical history, incarceration, and demographics as strong predictors. Using our estimates, we simulate a hypothetical policy which restricts new opioid prescriptions to only those with low predicted risk. The policy’s potential bene?ts likely outweigh costs across demographic subgroups, even for lenient de?nitions of “high risk.” Our ?ndings suggest new avenues for prevention using state administrative data, which could aid providers in making better, data-informed decisions when weighing the medical bene?ts of opioid therapy against the risks.