Preclinical evaluation of EpCAM-binding designed ankyrin repeat proteins (DARPins) as targeting moieties for bimodal near-infrared fluorescence and photoacoustic imaging of cancer. Here, EPCAM is linked to cancer.