The Moz Schools API is an API that provides access to detailed information about schools in Mozambique such as name, province, district, code, and latitude and longitude coordinates. It was developed to facilitate access to information about schools based on different criteria such as province, district, district post, locality, and school identification.
This API operates using the HTTP protocol and uses the GET method for all requests.
The base URL for this API is https://moz-schools-api.vercel.app/api/mz/schools
, which returns all the schools in Mozambique.
Response example:
[
{
"codigo": 3628,
"provincia": "Maputo",
"distrito": "Cidade da Matola",
"posto": "Machava",
"localidade": "Machava",
"nome": "Escola Secundaria de São Damaso",
"latitude": -25.884333333333334,
"longitude": 32.51711111111111
},
{
"codigo": 7745,
"provincia": "Sofala",
"distrito": "C. Beira",
"posto": "Urbano nº Manga Loforte",
"localidade": "Beira",
"nome": "Escola Primária Completa Josina Machel",
"latitude": -19.776916666666665,
"longitude": 34.889944444444446
},
{...}
]
To retrieve schools by province, use the following endpoint:
https://moz-schools-api.vercel.app/api/mz/schools/provincia/{provinceName}
-
Replace
{provinciaName}
with the name of the province you want to search for. -
Example:
https://moz-schools-api.vercel.app/api/mz/schools/province/Maputo
To retrieve schools by district, use the following endpoint:
https://moz-schools-api.vercel.app/api/mz/schools/distrito/{districtName}
-
Replace
{distritName}
with the name of the district you want to search for. -
Example:
https://moz-schools-api.vercel.app/api/mz/schools/distrito/Boane
To retrieve schools by locality, use the following endpoint:
https://moz-schools-api.vercel.app/api/mz/schools/localidade/{localityName}
-
Replace
{localityName}
with the name of the locality you want to search for. -
Example:
https://moz-schools-api.vercel.app/api/mz/schools/localidade/Manhiça
To retrieve schools by posto distrital, use the following endpoint:
https://moz-schools-api.vercel.app/api/mz/schools/posto/{postoName}
-
Replace
{postoName}
with the name of the posto you want to search for. -
Example:
https://moz-schools-api.vercel.app/api/mz/schools/posto/Namaacha
To retrieve schools by school code, use the following endpoint:
https://moz-schools-api.vercel.app/api/mz/schools/{code}
-
Replace
{code}
with the name of the code you want to search for. -
Example:
https://moz-schools-api.vercel.app/api/mz/schools/7800
We welcome contributions to this project. If you have suggestions, reports, or would like to contribute code feel free to open a pull request.
The dataset used in this project is provided by OCHA Mozambique, and i would like to express my gratitude for their valuable contribution to this research. Without their data, this api would not have been possible.
- Dataset Name: Mozambique Rede Escolar WiS School data
- Dataset Source: https://data.humdata.org/dataset/mozambique-school-data
- Dataset License: Creative Commons Attribution International
This project is licensed under the MIT License. You are free to use and distribute this code as long as you attribute the source and include the same license in your distribution.