CDH17 nanobodies facilitate rapid imaging of gastric cancer and efficient delivery of immunotoxin. Here, CDH17 is linked to gastric cancer.