Morocco Postal Code API

Look up code postals in Morocco with PostalDataPI — sub-10ms responses, one API key for 70+ countries.

Country Code

MA

Format

NNNNN

Example

10000

About Morocco code postals

Morocco uses 5-digit postal codes managed by Barid Al-Maghrib. Casablanca codes start with 20.

Local term: code postal | Regex pattern: ^\d{5}$

API Usage Examples

cURL

curl -X POST https://postaldatapi.com/api/lookup \
  -H "Content-Type: application/json" \
  -d '{"zipcode": "10000", "country": "MA", "apiKey": "YOUR_API_KEY"}'

Python

from postaldatapi import PostalDataPI

client = PostalDataPI(api_key="YOUR_API_KEY")
result = client.lookup("10000", country="MA")
print(result.place_name, result.latitude, result.longitude)

Node.js

import { PostalDataPI } from 'postaldatapi';

const client = new PostalDataPI({ apiKey: 'YOUR_API_KEY' });
const result = await client.lookup('10000', { country: 'MA' });
console.log(result.placeName, result.latitude, result.longitude);

$0.000028 per query

Same price for Morocco and all 70+ countries. No tiers, no per-country pricing.

Morocco Postal Code API | PostalDataPI