Cancer of unknown primary (CUP) is difficult to diagnose because modern treatments depend on knowing the tumor’s site of origin, and genomic tests are not always available, especially in low-resource settings. The authors developed a deep-learning model called TOAD that uses routine histology whole-slide images to determine whether a tumor is primary or metastatic and to predict its site of origin, achieving high top-1 and top-3 accuracies on internal and external test sets. When applied to 317 CUP cases, TOAD showed substantial agreement with expert differential diagnoses, suggesting it could serve as an assistive or alternative diagnostic tool to reduce unresolved CUP cases.