A comprehensive web application for searching and retrieving case details from Indian High Courts and District Courts through official eCourts portals.
Watch the explanation video to see how the scraper works:
✅ Multi-Court Support
- All Indian High Courts (25+ courts)
- All District & Taluka Courts across India
✅ Complete Case Information
- Case details (Filing date, registration number, CNR)
- Party information (Petitioners & Respondents)
- Case status and next hearing dates
- Order/Judgment details
- Complete hearing history
✅ Database Storage
- Automatic storage of all queries and results in SQLite database
- Query history tracking
- Raw response preservation for future analysis
✅ User-Friendly Interface
- Clean, modern, responsive design
- Dynamic dropdowns for easy navigation
- Real-time captcha solving
- Detailed result display
webapp/
├── backend/
│ ├── app.py # Flask application with API routes
│ ├── high_court_scraper.py # High Court scraper module
│ └── district_court_scraper.py # District Court scraper module
├── frontend/
│ └── index.html # Single-page web interface
├── database/
│ └── court_cases.db # SQLite database (auto-created)
├── requirements.txt # Python dependencies
└── README.md # This file
- Python 3.8 or higher
- pip (Python package manager)
-
Navigate to the webapp directory
cd CourtScraper
-
Install dependencies
pip install -r requirements.txt
-
Start the Flask server
cd backend python app.py
The server will start on
http://localhost:5000 -
Access the web interface Open your browser and go to:
http://localhost:5000
- Select High Court tab
- Choose a High Court from the dropdown (e.g. Delhi Highcourt)
- Select the Case Type (e.g., W.P.(C), Civil Appeal)
- Enter Case Number (e.g., 16516)
- Enter Year (e.g., 2022)
- Click Search Case
- Solve the captcha when prompted
- View detailed case information
- Select District Court tab
- Choose State from dropdown (e.g. Maharashtra)
- Select District (e.g. Mumbai City Civil Court)
- Choose Court Complex (e.g. Mumbai City Sessions Court
- Select Case Type (CRI APPEAL)
- Enter Case Number (e.g., 100591)
- Enter Year (e.g., 2016)
- Click Search Case
- Solve the captcha when prompted
- View detailed case information
GET /api/high-court/courts- Get all High CourtsPOST /api/high-court/case-types- Get case types for selected courtPOST /api/high-court/search- Initiate case search (returns captcha)POST /api/high-court/verify-captcha- Verify captcha and get case details
GET /api/district-court/states- Get all statesPOST /api/district-court/districts- Get districts for statePOST /api/district-court/court-complexes- Get court complexes for districtPOST /api/district-court/case-types- Get case types for court complexPOST /api/district-court/search- Initiate case search (returns captcha)POST /api/district-court/verify-captcha- Verify captcha and get case details
GET /api/history- Get search history (last 50 queries)
id- Primary keycourt_type- 'high_court' or 'district_court'query_params- JSON of search parameterstimestamp- Query timestamp
id- Primary keyquery_id- Foreign key to queries tablecase_data- JSON of parsed case dataraw_response- JSON of raw API responsetimestamp- Result timestamp
- RESTful API architecture
- Session management for court portals
- Captcha handling with base64 encoding
- Database integration with SQLite
- CORS enabled for development
- Vanilla JavaScript (no frameworks)
- Responsive design
- Dynamic form generation
- Real-time API communication
- Clean, modern UI with gradient design
- High Court Scraper: Interfaces with
https://hcservices.ecourts.gov.in - District Court Scraper: Interfaces with
https://services.ecourts.gov.in - Session management and cookie handling
- Captcha image extraction and display
- HTML parsing with BeautifulSoup4
- Comprehensive error handling
✅ Court selection dropdowns (dynamic) ✅ Case type dropdowns (auto-populated) ✅ Interactive captcha solving ✅ Real-time case search ✅ Detailed result display ✅ Database storage of queries and results ✅ Error handling and user feedback ✅ Responsive design for mobile/desktop ✅ Loading indicators ✅ Alert notifications
This web app differs from the original CLI scrapers in the following ways:
- No Batch Mode: Only interactive single-case search (as requested)
- Simplified Interface: Web-based UI instead of command-line prompts
- RESTful API: Backend provides API endpoints for frontend consumption
- Database Integration: Automatic storage of all searches
- Captcha Display: Visual captcha display instead of file saving
- Session Management: Backend handles all session/cookie management
- Streamlined Code: Removed CLI-specific features and batch processing
If port 5000 is already in use, modify app.py:
app.run(debug=True, host='0.0.0.0', port=5001) # Change portThe database is automatically created. If you encounter issues:
rm database/court_cases.db # Delete and restart appIf captcha doesn't load:
- Check internet connection
- Verify the court portal is accessible
- Try refreshing the page
Ensure all dependencies are installed:
pip install -r requirements.txt- PDF download functionality for judgments/orders
- Cause list scraping feature
- Advanced search filters
- Export results to PDF/Excel
- User authentication
- Search history management
- Batch import from CSV
- Automated notifications for case updates
Built for Internshala assignment - Indian Court Case Scraper Project
This project is for educational purposes only. Please respect the terms of service of the eCourts portals.
For issues or questions, refer to the source code comments or create an issue in the repository.