An endoscopy is an examination in which we use a thin tube (endoscope) to view the inside of various organs through a natural opening (e.g., the mouth).
A liver biopsy is performed to diagnose liver disease. This involves inserting a thin needle through the skin into the liver to take a small amount of tissue for examination.