MAAfrica · North Africa

Morocco Address Validation API

Validate and standardise Morocco addresses in real time. Get a matched address, geocoordinates, confidence score, and Code postal data via a single API call.

NNNNN
Code postal
OpenStreetMap
Data Source
Arabic / French
Languages
HIGH
Max Confidence

Morocco Address Validation Demo

Confidence:HIGH
POST /enrich — ResponseSample
{
  "_note": "Sample response — enter any address and click Validate for live data",
  "valid": true,
  "canonical_address": "Boulevard Mohammed V, 10020 Rabat",
  "confidence": "HIGH",
  "delivery_risk": "low",
  "matched_address": {
    "line1": "Boulevard Mohammed V",
    "city": "Boulevard Mohammed",
    "postal_code": "10020 Rabat",
    "country": "Morocco",
    "iso2": "MA"
  },
  "geocode": {
    "lat": 33.9716,
    "lng": -6.8498
  },
  "data_source": "OpenStreetMap",
  "issues": []
}

Morocco Address Format

Moroccan addresses include building/apartment number, street name, neighbourhood, city, and 5-digit postal code. Addresses may appear in French or Arabic (or both). Casablanca uses 20xxx; Rabat uses 10xxx.

Postal Code Name
Code postal
Format
NNNNN
Official Languages
Arabic, French, Berber
Sample address:
Boulevard Mohammed V, 10020 Rabat
Major cities:
CasablancaRabatFesMarrakeshAgadirTangierMeknes

Integration Code

curl -X POST https://agent.apitier.com/v1/enrich \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"address": "Boulevard Mohammed V, 10020 Rabat"}'

Frequently Asked Questions

What address format does Morocco use?
Moroccan addresses include building/apartment number, street name, neighbourhood, city, and 5-digit postal code. Addresses may appear in French or Arabic (or both). Casablanca uses 20xxx; Rabat uses 10xxx.
What is a Code postal in Morocco?
Morocco uses a Code postal with the format NNNNN to identify delivery areas. The APITier Address Agent API validates and standardises addresses including the Code postal as part of the response.
How do I validate a Morocco address via API?
Send a POST request to https://agent.apitier.com/v1/enrich with your address string in the request body and your API key in the x-api-key header. The response includes the standardised Morocco address, geocoordinates (lat/lng), a confidence score (HIGH/MEDIUM/LOW), and data source information.

More Africa Countries

Ready to validate Morocco addresses at scale?

The APITier Address Agent API handles address validation across 120+ countries. Free trial — 20 requests, no credit card required.