The primary aim of the study is to define the post-colonoscopy colorectal cancer (PCCRC) three-year rate and the post-endoscopy upper gastrointestinal cancer (PEUGIC) three-year rate across public hospitals in Aotearoa New Zealand. This retrospective cohort study will be conducted via the trainee-led STRATA Collaborative network. All public hospitals in Aotearoa New Zealand will be eligible to participate. Data will be collected on all adult patients who are diagnosed with colorectal adenocarcinoma within 6 to 48 months of a colonoscopy and all adult patients diagnosed with gastroesophageal cancer within 6 to 48 months of an upper gastrointestinal endoscopy. The study period will be from 2010 to 2022. The primary outcome is the PCCRC 3-year rate and the PEUGIC 3-year rate. Secondary aims are to define and characterize survival after PCCRC or PEUGIC, the cause of PCCRC as based on the World Endoscopy Organization System of Analysis definitions, trends over time, and centre level variation. This protocol describes the methodology for a nationwide retrospective cohort study on PCCRC and PEUGIC in Aotearoa New Zealand. These data will lay the foundation for future studies and quality improvement initiatives.