A comprehensive data collection and API system for Moroccan education data, providing clean, validated educational content for developers and educators.
- Data Collection: Automated scraping from Moroccan education websites
- Data Validation: Comprehensive validation and quality monitoring
- Data Cleaning: Removal of broken links and unnecessary content
- REST API: Complete v1 API with all endpoints
- Quality Assurance: 100% validated data with quality reports
- Education Levels: 12 levels (Primary, College, High School)
- Subjects: 96 subjects across all levels
- Content Items: 89 verified educational content items
- Languages: French and Arabic support
- Quality Score: 100% validated and cleaned
GET /api/v1/levels- Get all education levelsGET /api/v1/subjects- Get all subjectsGET /api/v1/courses- Get all educational contentGET /api/v1/search- Search across all dataGET /api/v1/stats- Get API statistics
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc - Health Check:
http://localhost:8000/health
- Python 3.10+
- pip
# Clone the repository
git clone https://github.com/K11E3R/moroccan-education-API.git
cd moroccan-education-API
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Generate data (optional - data is included)
python collectors/generate_quality_data.py
# Run the API
cd api
uvicorn main:app --reload --host 0.0.0.0 --port 8000moroccan-education-data-collector/
├── api/
│ ├── main.py # FastAPI application
│ ├── data.json # Education data
│ └── requirements.txt
├── collectors/
│ ├── moroccan_edu_scraper.py # Web scraper
│ └── generate_quality_data.py # Data generator
├── data/
│ └── moroccan_education_data.json
├── Dockerfile
├── railway.toml
├── Procfile
└── requirements.txt
- Fork this repository
- Create a new project on Railway
- Connect your GitHub repository
- Deploy!
# Build the image
docker build -t moroccan-education-api .
# Run the container
docker run -p 8000:8000 moroccan-education-apiheroku create your-app-name
git push heroku mainAll endpoints return responses in this format:
{
"success": true,
"count": 10,
"total": 100,
"data": [...]
}| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Landing page with API overview |
| GET | /api/v1/levels |
Get all education levels |
| GET | /api/v1/levels/{id} |
Get specific level |
| GET | /api/v1/subjects |
Get all subjects |
| GET | /api/v1/subjects/{id} |
Get specific subject |
| GET | /api/v1/content |
Get educational content |
| GET | /api/v1/content/{id} |
Get specific content |
| GET | /api/v1/search |
Search across all resources |
| GET | /api/v1/stats |
Get API statistics |
| GET | /health |
Health check |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Email: prs.online.00@gmail.com
- Issues: GitHub Issues
This project is licensed under the MIT License - see the LICENSE file for details.
- Email: prs.online.00@gmail.com
- GitHub: K11E3R/moroccan-education-API
PRODUCTION READY ✅
The Moroccan Education API v1 is ready for public use with:
- Complete v1 endpoints
- 100% validated data
- Sub-second response times
- Comprehensive error handling
- Real-time monitoring
- Complete documentation
Made with ❤️ for the Moroccan Developer Community 🇲🇦