Cholangiocarcinoma is a type of cancer that arises from the cells of bile ducts. It is also known as bile duct cancer and is a rare cancer that can affect both the intrahepatic (within the liver) and extrahepatic (outside the liver) bile ducts. Bile ducts are involved in the production and transport of bile, a yellowish-green substance composed of bile salts, cholesterol, and other components that help the body digest fat. Cholangiocarcinoma can be classified as either primary or secondary. Primary cholangiocarcinoma originates from the bile ducts, while secondary cholangiocarcinoma is caused by cancer that has spread to the bile ducts from other parts of the body. The risk factors for cholangiocarcinoma include chronic biliary diseases such as primary sclerosing cholangitis (PSC) and primary biliary cirrhosis (PBC). Other risk factors include smoking, excessive alcohol intake, and certain genetic disorders. There may also be a link between cholangiocarcinoma and certain infections or toxins.