This is the first comprehensive study to optimize PD-L1 assessment in gastric cancer using endoscopically available tissue. Here, CD274 is linked to gastric cancer.