DEVELOPMENT OF WEB CRAWLER FOR AGGREGATION AND ANALYSIS OF LEGAL DOCUMENTS: A CASE STUDY OF OIL AND GAS SECTOR REGULATIONS
- Received
- April 27, 2026
- Published
- November 26, 2026
Abstract
Regulatory documents in the field of Oil and Gas (Migas) sector in Indonesia are scattered among multiple official websites operated by various branches of the government. The structure of these sites varies significantly, which makes the collection of such documents highly tedious, time-consuming, and inefficient. This study aims to solve the problem of fragmented data in the field by creating an automated web information system using web crawling and machine learning methods for regulatory document analysis. The project involved creating an asynchronous web crawler based on the Crawl4AI package for collecting documents from the BPK Regulatory Portal. Job tracking, retry logic, and Azure Blob Storage PDF upload have been implemented utilizing a MongoDB database. Machine learning classification used TF-IDF features together with Logistic Regression model aiming to reach an F1-score above 85% of regulatory documents related to the Migas sector. Classified documents have been stored within a MongoDB database with complete metadata provided, exposing its API using FastAPI framework. An interactive front-end application built upon React framework allows triggering crawling with parameterized settings, monitoring of job execution, searching, filtering, and analysis of documents via statistical charts. Expected improvements include reducing the time required to collect documents in the field by 80%, creating a consolidated database consisting of 1,500 – 2,000 documents, and providing an analytical-ready structured dataset as an output.
Keywords
Web Crawler; Legal Documents; Oil and Gas Sector; Machine Learning Classification; TF-IDF; Logistic Regression; Crawl4AI; MongoDB; REST API; React