ImportanceLong-term trend analyses of overall endophthalmitis rates and treatment patterns are scarce. It is also unknown if the deviation from the recommendations of the Endophthalmitis Vitrectomy Study toward decreased utilization of vitrectomy is associated with different vision outcomes.ObjectiveTo determine whether the rate of endophthalmitis after intraocular procedures or the primary treatment (prompt vitrectomy vs tap and inject) for endophthalmitis has changed over the past 20 years.Design, Setting, and ParticipantsThis cohort study examined data for cohorts created by querying for different intraocular procedures, including intravitreal injections and surgeries for cataract removal, glaucoma, retinal conditions, and corneal transplants from 2000 to 2022. The data source was a US administrative medical claims database comprising commercial and Medicare Advantage insurance plans. Any intraocular procedure with at least 6 months of data available before and 6 weeks after the procedure was eligible. Exclusion criteria consisted of any previous diagnosis of endophthalmitis or another intraocular procedure during the follow-up period.Main Outcome MeasureThe main outcomes were rate of postprocedure endophthalmitis and relative rate of prompt vitrectomy (vs tap and inject) as the primary method of treatment.ResultsAmong 2 124 964 patients, the mean (SD) age was 71.4 (10.2) years; 1 230 320 were female and 894 414 male. Over 22 years, 5 827 809 intraocular procedures were analyzed with 4305 cases of endophthalmitis found for an overall endophthalmitis rate of 0.07%. The yearly rate of endophthalmitis varied but generally declined from a high of 7 cases per 3502 procedures (0.20%) in 2000 to a low of 163 cases per 332 159 procedures (0.05%) in 2022. The percentage of cases treated with prompt vitrectomy also varied but generally declined over time with a high of 17 of 35 (48.6%) in 2003 and a low of 60 of 515 (11.6%) in 2021. Multivariable analysis of the endophthalmitis incidence rate ratio (IRR) showed a per-year decrease of 2.7% (IRR, 0.97; 95% CI, 0.97-0.98; P < .001) over the study period. A similar analysis also showed that the incidence rate of prompt surgical treatment decreased by 3.8% per year throughout the study period (IRR, 0.96; 95% CI, 0.95-0.97; P < .001).Conclusions and RelevanceThis study found that the incidence of endophthalmitis following intraocular procedures appears to have decreased substantially over the past 20 years while prompt vitrectomy is being used less frequently as primary treatment than in the past.