Cholangiocarcinoma (CCA) is a serious health problem worldwide. The gut and bile microbiota have not been clearly characterized in patients with CCA, and better noninvasive diagnostic approaches for CCA need to be established. The aim of this study was to investigate the characteristics of the gut and bile microbiota in CCA patients. Forty-two CCA patients and 16 healthy normal controls (HNCs) were enrolled. DNA was extracted from fecal and bile samples and subjected to 16S rRNA gene analysis. We found that there were significant differences in the species diversity, structure, and composition of the microbial communities between the CCA group and the HNC grouAt the phylum level, compared with that in the HNC group, the relative abundance of Firmicutes and Actinobacteriota was significantly decreased in the CCA group, whereas Proteobacteria and Bacteroidota were significantly enriched. The Firmicutes/Bacteroidota (F/B) ratio significantly decreased in the CCA group compared to the HNC grouThe relative abundance of Klebsiella in the CCA group was significantly higher than that in the HNC group, while the relative abundance of Bifidobacterium was significantly decreased. The Bifidobacterium/Klebsiella (B/K) ratio was established as a novel biomarker and was found to be significantly decreased in the CCA group compared with the HNC grouOur findings provide evidence supporting the use of Klebsiella and Bifidobacterium as noninvasive intestinal microbiomarkers for improving the diagnosis of CCA.