This cross-sectional study characterizes opioid analgesic prescribing trends in the US among commercially insured and Medicare Advantage patients by prescriber specialty, analyzing short-term and long-term opioid use episodes separately.