The surge in internet usage has sparked new demands. Historically, specialized web crawlers were devised to retrieve pages pertaining to specific subjects. However, contemporary needs such as event identification and extraction have gained significance. Conventional web crawlers prove inadequate for these tasks, necessitating exploration of novel techniques for event identification, extraction, and utilization. This study presents an innovative approach for detecting and extracting events using the Whale Optimization Algorithm (WOA) for feature extraction and classification. By integrating this method with machine learning algorithms, the proposed technique exhibits improvements in experiments, including decreased execution time and enhancements in metrics such as Root Mean Square Error (RMSE) and accuracy score. Comparative analysis reveals that the proposed method outperformed alternative models. Nevertheless, when tested across various data models and datasets, the WOA model consistently demonstrated superior performance, albeit exhibiting reduced evaluation metrics for Wikipedia text data.