In the present study, we identified two nanobodies specifically bound to CDH17 and E8 nanobody was extensively explored for gastric cancer imaging and targeted therapy due to its relatively higher affinity (~ 70 nM). Here, CDH17 is linked to gastric cancer.