An endoscopy requires that you have an empty stomach before the procedure. Do not eat any solid food for 8 hours before the procedure. You may drink clear liquids up until 4 hours before the procedure.