Childhood leukemia is a prevalent form of pediatric cancer, with acute lymphoblastic leukemia (ALL) and acute myeloid leukemia (AML) being the primary manifestations. Timely treatment has significantly enhanced survival rates for children with acute leukemia. This study aimed to develop an early and comprehensive predictor for hematologic malignancies in children by analyzing nutritional biomarkers, key leukemia indicators, and granulocytes in their blood. Using a machine learning algorithm and ten indices, the blood samples of 826 children with ALL and 255 children with AML were compared to a control group of 200 healthy children. The study revealed notable differences, including higher indicators in boys compared to girls and significant variations in most biochemical indicators between leukemia patients and healthy children. Employing a random forest model resulted in an area under the curve (AUC) of 0.950 for predicting leukemia subtypes and an AUC of 0.909 for forecasting AML. This research introduces an efficient diagnostic tool for early screening of childhood blood cancers and underscores the potential of artificial intelligence in modern healthcare.