A simple, zero-dependency Node.js package providing structured and typed data about universities and higher-education institutions in Morocco.
npm install higher-edu-morocco
Or via yarn/pnpm:
yarn add higher-edu-morocco
pnpm add higher-edu-morocco
import {
getAllInstitutions,
filterInstitutionsByType,
filterInstitutionsByCity,
searchInstitutions,
} from "higher-edu-morocco";
// List all institutions
console.log(getAllInstitutions());
// Filter by type
console.log(filterInstitutionsByType("engineering_school"));
// Find by city
console.log(filterInstitutionsByCity("Rabat"));
// Find by state recognition
console.log(filterInstitutionsByRecognition(true));
// Fuzzy search
console.log(searchInstitutions("ENSA"));
Run commands directly using npx:
npx higher-edu-ma list
npx higher-edu-ma list --type engineering_school
npx higher-edu-ma list --city Casablanca
npx higher-edu-ma search ENSA
Returns an array of all Moroccan higher-education institutions.
Fetches a single institution by its unique id
.
Returns institutions filtered by type (public_university
, private_university
, engineering_school
, etc.).
Returns institutions located in a specified city.
Returns institutions with a specified state recognition status (true
, false
, or undefined
).
Fuzzy searches institutions by name or city.
Each institution has:
interface Institution {
id: string; // Unique slug identifier
name: string; // Official institution name
city: string; // Main campus city
type: InstitutionType;
website: string; // Official website URL
phone: string; // Phone number
recognized_by_state: boolean | undefined; // State recognition status
address: string; // Street address
lat: number; // Latitude
lng: number; // Longitude
}
Commands:
higher-edu-ma list # Lists all institutions
higher-edu-ma search <term> # Searches institutions by name or city
Options:
--type, -t
: Filter by institution type.--city, -c
: Filter by city.--json, -j
: Output as JSON.
Example:
higher-edu-ma list --type public_university
higher-edu-ma search Rabat --json
Report issues or contribute on GitHub:
MIT © Anas Behhari