5,000 cities in Morocco, ranked by population, as a single downloadable JSON file. No API key, no rate limit, no sign-up — just a static file you can fetch, cache, or commit straight into your own project.
Data updated: 2026-07-14
The first few records, largest by population, as they appear in the file:
| City | Region | Population |
|---|---|---|
| Casablanca | Casablanca-Settat | 3,215,935 |
| Tangier | Tangier-Tetouan-Al Hoceima | 1,275,428 |
| Fez | Fès-Meknès | 1,167,842 |
| Marrakesh | Marrakesh-Safi | 1,002,697 |
| Salé | Rabat-Salé-Kénitra | 945,101 |
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Geomelon city ID |
name | string | City name |
population | number | Population |
latitude | number | Latitude |
longitude | number | Longitude |
region | string | null | Region/state name |
A flat, population-ranked file like this is a good fit for offline builds, seed data for a database, a country/city dropdown that doesn't need live search, or a quick lookup table in a script or notebook. It's a static snapshot, not a live feed — there's no search index, no translations, and no guarantee it reflects changes made to Morocco's administrative boundaries after 2026-07-14.
For prefix search, autocomplete, multilingual names, or coordinate-based queries — anything that needs to stay current or searchable — use the API instead of the static file:
curl --request GET \
--url 'https://geomelon.p.rapidapi.com/cities/search?countryCode=ma&sort=population_desc&limit=10' \
--header 'x-rapidapi-host: geomelon.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_API_KEY'This dataset is licensed under CC BY 4.0. You're free to use it for any purpose, including commercially, as long as you credit Geomelon with a link back to this page.