The use of opioids to treat pain in pediatric patients has been viewed as necessary; however, this practice has raised concerns regarding opioid abuse and the effects of opioid use. To effectively adjust policy regarding opioids in the pediatric population, prescribing patterns must be better understood. To evaluate opioid prescribing patterns in US pediatric patients and factors associated with opioid prescribing. This cross-sectional study used publicly available data from the National Hospital Ambulatory Medical Care Survey from January 1, 2006, to December 31, 2015. Analysis included the use of bivariate and multivariate models to evaluate factors associated with opioid prescribing. Practitioners from emergency departments throughout the United States were surveyed, and data were collected using a representative sample of visits to hospital emergency departments. The study analyzed all emergency department visits included in the National Hospital Ambulatory Medical Care Survey for patients younger than 18 years. All statistical analysis was completed in June of 2018 and updated upon receiving reviewer feedback in October of 2018. Information regarding participants' medications was collected at time of visit. Participants who reported taking 1 or more opioids were identified. Evaluation of opioid prescribing patterns across demographic factors and pain diagnoses. A total of 69 152 visits with patients younger than 18 years (32 727 female) were included, which were extrapolated by the National Hospital Ambulatory Medical Care Survey to represent 293 528 632 visits nationwide, with opioid use representing 21 276 831 (7.25%) of the extrapolated visits. Factors including geographic region, race, age, and payment method were associated with statistically significant differences in opioid prescribing. The Northeast reported an opioid prescribing rate of 4.69% (95% CI, 3.69%-5.70%) vs 8.84% (95% CI, 6.82%-10.86%) in the West (P = .004). White individuals were prescribed an opioid at 8.11% (95% CI, 7.23%-8.99%) of visits vs 5.31% (95% CI, 4.31%-6.32%) for nonwhite individuals (P < .001). Those aged 13 to 17 years were significantly more likely to receive opioid prescriptions (16.20%; 95% CI, 14.29%-18.12%) than those aged 3 to 12 years (6.59%; 95% CI, 5.75%-7.43%) or 0 to 2 years (1.70%; 95% CI, 1.42%-1.98%). Patients using Medicaid for payment were less likely to receive an opioid than those using private insurance (5.47%; 95% CI, 4.79%-6.15% vs 9.73%; 95% CI, 8.56%-10.90%). There was no significant difference in opioid prescription across sexes. Opioid prescribing rates decreased when comparing 2006 to 2010 with 2011 to 2015 (8.23% [95% CI, 6.75%-9.70%] vs 6.30% [95% CI, 5.44%-7.17%]; P < .001); however, opioid prescribing rates remained unchanged in specific pain diagnoses, including pelvic and back pain. This research demonstrated an overall reduction in opioid use among pediatric patients from 2011 to 2015 compared with the previous 5 years; however, there appear to be variations in factors associated with opioid prescribing. The association of location, race, payment method, and pain diagnoses with rates of prescribing of opioids suggests areas of potential quality improvement and further research.