The response of patients with biliary tract carcinoma (BTC) to immunotherapy varies widely, and there is an urgent need for biological indicators. The predictive value of inflammation based score (IBS) for the efficacy of immunotherapy in patients with BTC remains unclear, as the evidence is inconsistent. This study aimed to comprehensively examine the predictive value of IBS in peripheral blood on the survival of BTC patients receiving immunotherapy. We retrospectively assessed 118 patients with advanced BTC who received anti-PD-1 therapy in the first or second line in two medical centers. The Kaplan-Meier, time-dependent ROC, and Harrell's concordance index (C-index) were applied to analyze the predictive value of 13 reported peripheral blood IBS. All 13 IBS were identified as significant prognostic factors for OS in univariate analysis. Pan-immune-inflammation value (PIV) (p=0.005), PILE (composed of PIV, lactate dehydrogenase and Eastern Cooperative Oncology Group performance status) (p=0.033), neutrophil-to-lymphocyte ratio (NLR) (p=0.003), platelet-to-lymphocyte ratio (PLR) (p<0.001), lymphocyte-to-monocyte ratio (LMR) (p=0.006), systemic immune inflammation index (SII) (p=0.039), CRP-to-albumin ratio (CAR) (p=0.025), and Albumin-NLR (p=0.008) were identified as independent prognostic factors for OS in multivariate analysis. PIV and PILE scores were superior to other scores, according to time-dependent ROC curves, and their superiority became more pronounced after the 12-month time point. C-index analysis showed PIV (C-index 0.62, 95% CI: 0.55, 0.68) and PILE (C-index 0.62, 95% CI: 0.55, 0.70), both superior to other IBS. PIV and PILE scores are independent predictors of OS in patients with BTC after immunotherapy and are superior to other IBS. PIV and PILE may be able to help screen out patients with advanced BTC who are less likely to benefit from anti-PD-1 monotherapy. Due to the retrospective nature of this analysis, the predictive value of PIV and PILE require validation in further prospective studies.