placedb

Countries

🇲🇦 Morocco 12 administrative divisions

12 first-level administrative divisions (states, provinces, regions or counties, depending on the country) and 4,320 cities and towns, each with latitude and longitude. Public domain, free to download, no API key.

The country

ISO 3166-1
MA · MAR · 504
Capital
Rabat
Continent
Africa
Currency
MAD, Moroccan dirham
Calling code
+212
Internet domain
.ma
Divisions
12
Cities and towns
4,320

Divisions

The 12 divisions of Morocco

12 of them carry an ISO 3166-2 code. Counts are cities and towns inside each division.

Division ISO 3166-2 Cities and towns Population
Beni Mellal-Khenifra MA-05 185 2,525,801
Casablanca-Settat MA-06 277 7,688,967
Dakhla-Oued Ed-Dahab MA-12 77 219,965
Draa-Tafilalet MA-08 153 1,655,623
Fes-Meknes MA-03 282 4,467,911
Guelmim-Oued Noun MA-10 86 448,685
Laayoune-Sakia El Hamra MA-11 130 367,758
Marrakesh-Safi MA-07 303 4,520,569
Oriental MA-02 370 2,294,665
Rabat-Sale-Kenitra MA-04 210 5,132,639
Souss-Massa MA-09 222 3,020,431
Tangier-Tetouan-Al Hoceima MA-01 1,690 4,030,222

A further 335 places could not be matched to a division and are listed separately in the API as "unassigned": true.

Get it

Both files, in one request each

# every division of Morocco
curl -s https://api.placedb.org/v1/regions/MA.json

# the cities and towns of one division (id from the file above)
curl -s https://api.placedb.org/v1/cities/MA/<id>.json

No key, no account, no rate limit. The endpoints · try it live.