The function of Ensembl gene identifier ENSG00000167910 (CYP7A1, cytochrome P450 family 7 subfamily A member 1) is as follows. A cytochrome P450 monooxygenase involved in the metabolism of endogenous cholesterol and its oxygenated derivatives (oxysterols) (PubMed:11013305, PubMed:12077124, PubMed:19965590, PubMed:21813643, PubMed:2384150). Mechanistically, uses molecular oxygen inserting one oxygen atom into a substrate, and reducing the second into a water molecule, with two electrons provided by NADPH via cytochrome P450 reductase (CPR; NADPH-ferrihemoprotein reductase) (PubMed:11013305, PubMed:12077124, PubMed:19965590, PubMed:21813643, PubMed:2384150). Functions as a critical regulatory enzyme of bile acid biosynthesis and cholesterol homeostasis. Catalyzes the hydroxylation of carbon hydrogen bond at 7-alpha position of cholesterol, a rate-limiting step in cholesterol catabolism and bile acid biosynthesis (PubMed:12077124, PubMed:19965590, PubMed:2384150). 7-alpha hydroxylates several oxysterols, including 4beta-hydroxycholesterol and 24- hydroxycholesterol (PubMed:11013305, PubMed:12077124). Catalyzes the oxidation of the 7,8 double bond of 7-dehydrocholesterol and lathosterol with direct and predominant formation of the 7-keto derivatives (PubMed:21813643). {ECO:0000269|PubMed:11013305, ECO:0000269|PubMed:12077124, ECO:0000269|PubMed:19965590, ECO:0000269|PubMed:21813643, ECO:0000269|PubMed:2384150}.