1. Datasets
  2. Countries
  3. Morocco

Morocco Countries API

The GeoNames country record for Morocco, with ISO codes, capital, currency, languages and neighbours, plus every other dataset we hold for Morocco.

GET /v1/countriesCC BY 4.0MA28 Nov 2026

Datasets for Morocco

Request and response

Add country filtering to the collection endpoint and you get Morocco records back. The response below is the example from our OpenAPI document, so it shows the exact shape you get, though the record itself may come from another country.

GET/v1/countries
curl 'https://api.apifor.dev/v1/countries' \
  -G -d country=MA \
  -H 'x-api-key: YOUR_API_KEY'
Example response · application/json
{
  "success": true,
  "data": [
    {
      "iso2": "AD",
      "iso3": "AND",
      "iso_numeric": "020",
      "fips": "AN",
      "name": "Andorra",
      "capital": "Andorra la Vella",
      "area_km2": 468,
      "population": 82904,
      "continent": "EU",
      "tld": ".ad",
      "currency_code": "EUR",
      "currency_name": "Euro",
      "postal_code_format": "AD###",
      "postal_code_regex": "^(?:AD)*(\\d{3})$",
      "languages": "ca",
      "geonameid": 3041565,
      "neighbours": "ES,FR",
      "updated_at": "2026-11-01 08:41:33"
    }
  ]
}

Fields

Each record in data has these fields. Types are read from the example values; a nullable field can hold null for some records.

FieldTypeExample
iso2string"AD"
iso3string"AND"
iso_numericstring"020"
fipsstring"AN"
namestring"Andorra"
capitalstring"Andorra la Vella"
area_km2integer468
populationinteger82904
continentstring"EU"
tldstring".ad"
currency_codestring"EUR"
currency_namestring"Euro"
postal_code_formatstring"AD###"
postal_code_regexstring"^(?:AD)*(\\d{3})$"
languagesstring"ca"
geonameidinteger3041565
neighboursstring"ES,FR"
updated_atstring"2026-11-01 08:41:33"

Filters and paging

Query parameters accepted by GET /v1/countries. Full detail, including the single-record route, is in the endpoint reference.

ParameterTypeRules
pageintegermin 1 · default 1
limitinteger1 to 200 · default 50
countrystringISO 3166-1 alpha-2
qstring2 to 100 chars