Reliable, developer-friendly access to Morocco's public open data.
MoroccoAPI is a community-driven, open-source project that turns reusable Moroccan public datasets into consistent, documented, and versioned APIs.
Public information is often distributed across spreadsheets, documents, portals, and incompatible schemas. MoroccoAPI aims to make approved open datasets easier to discover and use while preserving source attribution, licensing, provenance, and update history.
Website · API documentation · Releases
Requirements: Node.js 22 or newer and npm.
npm install
npm run devThe homepage starts at http://127.0.0.1:3000; interactive documentation is at http://127.0.0.1:3000/docs.
Before opening a pull request, run:
npm run check- Source first: every field must be traceable to an identified source.
- License before code: a dataset is not integrated until redistribution rights are documented.
- Stable contracts: breaking changes require a new API version.
- No personal-data lookup: MoroccoAPI will not expose CIN, phone, address, or citizen profile.
- Multilingual by design: Arabic, French, and English names are supported when reliable translations exist.
- Freshness is visible: responses identify the source and relevant update dates.
- Community governance: decisions and changes are discussed publicly.
Source code and data have separate licenses:
- Project code is available under the Apache License 2.0.
- Adapted databases derived from ODbL sources will be published under ODbL 1.0.
- Third-party datasets keep their original licenses and notices.
- Incompatible or unclear sources will not be merged into the public database.
MoroccoAPI is inspired by community public-data projects such as BrasilAPI. Inspiration does not imply affiliation.
