{"id":25255487,"url":"https://github.com/matt0550/miur-opendata-rest-api","last_synced_at":"2026-02-02T23:43:07.208Z","repository":{"id":260048681,"uuid":"864626038","full_name":"Matt0550/MIUR-OpenData-rest-api","owner":"Matt0550","description":"An unofficial REST API for the MIUR/MIM Open-Data. Using FastAPI and SPARQL. Italian Schools REST API","archived":false,"fork":false,"pushed_at":"2025-01-20T22:50:56.000Z","size":172,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T01:38:52.332Z","etag":null,"topics":["fastapi","miur","rest-api","schools","sparql"],"latest_commit_sha":null,"homepage":"https://miur-api.cloud.matteosillitti.it/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Matt0550.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Matt0550","patreon":null,"open_collective":null,"ko_fi":"matt05","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"matt0550","thanks_dev":null,"custom":["paypal.me/sillittimatteo"]}},"created_at":"2024-09-28T18:08:03.000Z","updated_at":"2025-01-20T22:50:59.000Z","dependencies_parsed_at":"2025-01-20T23:34:54.538Z","dependency_job_id":null,"html_url":"https://github.com/Matt0550/MIUR-OpenData-rest-api","commit_stats":null,"previous_names":["matt0550/miur-opendata-rest-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Matt0550/MIUR-OpenData-rest-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matt0550%2FMIUR-OpenData-rest-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matt0550%2FMIUR-OpenData-rest-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matt0550%2FMIUR-OpenData-rest-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matt0550%2FMIUR-OpenData-rest-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Matt0550","download_url":"https://codeload.github.com/Matt0550/MIUR-OpenData-rest-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matt0550%2FMIUR-OpenData-rest-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29024005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T22:20:39.141Z","status":"ssl_error","status_checked_at":"2026-02-02T22:20:37.621Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","miur","rest-api","schools","sparql"],"created_at":"2025-02-12T05:56:21.721Z","updated_at":"2026-02-02T23:43:07.153Z","avatar_url":"https://github.com/Matt0550.png","language":"Python","funding_links":["https://github.com/sponsors/Matt0550","https://ko-fi.com/matt05","https://buymeacoffee.com/matt0550","paypal.me/sillittimatteo","https://www.buymeacoffee.com/Matt0550","https://paypal.me/sillittimatteo"],"categories":[],"sub_categories":[],"readme":"[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![Discord][discord-shield]][discord-url]\n[![Docker Pulls][docker-shield]][docker-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Matt0550/MIUR-OpenData-rest-api\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/Matt0550/public-gaac/main/uploads/logo-MIM-schools-rest-api-2.png\" alt=\"Logo\" height=\"200\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eMIUR/MIM Open-Data REST API\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    An unofficial REST API for the MIUR/MIM Open-Data. Using FastAPI and SPARQL.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/Matt0550/MIUR-OpenData-rest-api/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/Matt0550/MIUR-OpenData-rest-api/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\nAll the data used in this project is owned by the respective owners and is used for educational purposes only. The data is taken from the official [MIUR/MIM Open-Data website](https://dati.istruzione.it/opendata/).\n\n\n## Features\n\n- Get and query all the data about the schools in Italy\n- Cache the data to reduce the number of requests to the MIUR/MIM Open-Data website\n\n\n## API Endpoints\n\u003e [!TIP]\n\u003e The API is self-documented. You can access the Swagger UI at `/docs` and the ReDoc UI at `/redoc`.\n\n### Base URL\n```\n  https://miur-api.cloud.matteosillitti.it/v1/\n```\n\n### Schools\n- `/schools` - Get all the schools or filter them by SchoolBase model.\n\n#### Query parameters\n- `limit` - Limit the number of results (default: 50, max: 1500)\n- `exclude_par` - Exclude private schools (default: false)\n- `exclude_aut` - Exclude autonomous schools like Aosta, Trento e Bolzano (default: false)\n\n##### Body (SchoolBase model)\n```json\n{\n  \"school_year\": 202425,\n  \"geographic_area\": \"string\",\n  \"region\": \"string\",\n  \"province\": \"string\",\n  \"school_code\": \"string\",\n  \"school_name\": \"string\",\n  \"school_address\": \"string\",\n  \"school_postal_code\": \"string\",\n  \"school_city_code\": \"string\",\n  \"city_description\": \"string\",\n  \"education_type_description\": \"string\",\n  \"school_email_address\": \"string\",\n  \"school_certified_email_address\": \"string\",\n  \"school_website\": \"string\",\n}\n```\n\n#### Response\n```json\n{\n    \"details\": {\n        \"schools\": [\n            {\n                \"school_year\": 202425,\n                \"geographic_area\": \"ISOLE\",\n                \"region\": \"SICILIA\",\n                \"province\": \"CALTANISSETTA\",\n                \"school_code\": \"CLTD090005\",\n                \"school_name\": \"\\\"M. RAPISARDI\\\" - CALTANISSETT\",\n                \"school_address\": \"VIALE REGINA MARGHERITA\",\n                \"school_postal_code\": \"93100\",\n                \"school_city_code\": \"B429\",\n                \"city_description\": \"CALTANISSETTA\",\n                \"education_type_description\": \"ISTITUTO TECNICO COMMERCIALE\",\n                \"school_email_address\": \"CLTD090005@istruzione.it\",\n                \"school_certified_email_address\": \"Non Disponibile\",\n                \"school_website\": \"\"\n            }\n        ],\n        \"total\": \n    },\n    \"success\": true,\n    \"status_code\": 200\n}\n```\n\n## Cache\nThe API uses a cache system to reduce the number of requests to the MIUR/MIM Open-Data website. The cache expiration time is set to 1 hour by default. You can change it using the `CACHE_EXPIRE` environment variable. The cache is stored in memory and is not persistent. Soon I will add the possibility to use Redis as a cache.\n\n## Public instance of the API\nAn instance of the API is available at https://miur-api.cloud.matteosillitti.it/\n\nLimited to 20 requests per day (2 requests per minute). If you need more requests, contact me.\n\n## Environment Variables\n| Variable | Description | Default |\n| :--- | :--- | :--- |\n| `PUID` | User ID (docker) | `1000` |\n| `PGID` | Group ID (docker) | `1000` |\n| `DOMAIN` | Domain of the API | `localhost` |\n| `PORT` | Port of the API | `5000` |\n| `CACHE_EXPIRE` | Cache expiration time in seconds | `3600` (1 hour) |\n\n## Installation - Using Docker Compose (recommended)\nClone the project\n\n```yml\nversion: '3'\n\nservices:\n  miur_opendata_rest_api:\n    image: matt0550/miur-opendata-rest-api\n    environment:\n      - PUID=1000\n      - PGID=1000\n    ports:\n      - 5000:5000\n    restart: unless-stopped\n```\n\nRun the container with `docker-compose up -d`\n\n## Installation - Using Docker Run\nPull the image\n\n```bash\n  docker run -d -p 5000:5000 -e PUID=1000 -e PGID=1000 matt0550/miur-opendata-rest-api\n```\n\n## Installation - Self-Host or docker build\n\nClone the project\n\n```bash\n  git clone https://github.com/Matt0550/MIUR-OpenData-rest-api\n```\n\nGo to the project directory\n\n```bash\n  cd MIUR-OpenData-rest-api-master\n```\n\nOPTIONAL: use docker to build the image\n\n```bash\n  docker build -t MIUR-OpenData-rest-api .\n```\n\nIf you don't want to use docker, skip this step.\nElse, change the `image` in `docker-compose.yml` with the image name you used.\nRun the container with `docker-compose up -d`\n\nInstall dependencies\n\n```bash\n  poetry install\n```\n\nStart the REST API (after setting the environment variables)\n\n```bash\n  cd app\n  uvicorn main:app\n```\n\n## Help - feedback\nYou can contact me on:\n\nDiscord: https://matt05.it/discord\n\nTelegram: https://matt05.it/telegram\n\nMail: \u003ca href=\"mailto:mail@matteosillitti.com\"\u003email@matteosillitti.com\u003c/a\u003e\n\n## License\n\n[GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0/)\n\n## Support me\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/matt05)\n\n[![buy-me-a-coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/Matt0550)\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/sillittimatteo)\n\n[contributors-shield]: https://img.shields.io/github/contributors/Matt0550/MIUR-OpenData-rest-api.svg?style=for-the-badge\n[contributors-url]: https://github.com/Matt0550/MIUR-OpenData-rest-api/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/Matt0550/MIUR-OpenData-rest-api.svg?style=for-the-badge\n[forks-url]: https://github.com/Matt0550/MIUR-OpenData-rest-api/network/members\n[stars-shield]: https://img.shields.io/github/stars/Matt0550/MIUR-OpenData-rest-api.svg?style=for-the-badge\n[stars-url]: https://github.com/Matt0550/MIUR-OpenData-rest-api/stargazers\n[issues-shield]: https://img.shields.io/github/issues/Matt0550/MIUR-OpenData-rest-api.svg?style=for-the-badge\n[issues-url]: https://github.com/Matt0550/MIUR-OpenData-rest-api/issues\n[license-shield]: https://img.shields.io/github/license/Matt0550/MIUR-OpenData-rest-api.svg?style=for-the-badge\n[license-url]: https://github.com/Matt0550/MIUR-OpenData-rest-api/blob/master/LICENSE\n[discord-shield]: https://img.shields.io/discord/828990499507404820?style=for-the-badge\n[discord-url]: https://matt05.it/discord\n[docker-shield]: https://img.shields.io/docker/pulls/matt0550/miur-opendata-rest-api?style=for-the-badge\n[docker-url]: https://hub.docker.com/r/matt0550/miur-opendata-rest-api\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatt0550%2Fmiur-opendata-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatt0550%2Fmiur-opendata-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatt0550%2Fmiur-opendata-rest-api/lists"}