Tunisian Municipality API
Access comprehensive Tunisian municipality data with powerful filtering options. Built for developers, by developers.
Base URL
https://tn-municipality-api.vercel.app/api/municipalitiesFree and open source. No API key required.
/api/municipalities?postalCode=2058[
{
"Name": "ARIANA",
"NameAr": "أريانة",
"Value": "ARIANA",
"Delegations": [
{
"Name": "ARIANA VILLE (Residence Kortoba)",
"NameAr": "أريانة المدينة (إقامة قرطبة)",
"Value": "ARIANA VILLE",
"PostalCode": "2058",
"Latitude": 36.866011,
"Longitude": 10.193923
},Powerful Filtering
Filter by governorate, delegation, postal code, and more
Rich Data
Complete municipality data with coordinates and Arabic names
Fast & Reliable
Lightning-fast responses with 99.9% uptime guarantee
How the data is structured
Three levels, from the governorate down to the locality, each with Arabic and English names.
- Governorates
- 24
- Delegations
- 261
- Localities
- 4,788
- Postal codes
- 958
/api/municipalities?name=ariana- ARIANA VILLEأريانة المدينةDelegation
- Residence Kortobaإقامة قرطبة
2058Locality - Cite El Intissar 1حي الإنتصار 1
2091 33 more localities
- SIDI THABETسيدي ثابت
5 more delegations
API Playground
Test the API with real data.
Send a request to see the JSON response here.
Use it with your AI assistant
Copy a prompt that already explains the endpoints, parameters and response shape, then paste it into ChatGPT, Claude, Cursor or Copilot.
API Documentation
Endpoints
/api/municipalities/api/municipalities/nearBase URLhttps://tn-municipality-api.vercel.app
Query parameters
Use these parameters to filter the municipality data. All parameters are optional and can be combined.
searchstringSearches governorates first, then delegations when nothing matches. Accepts English or Arabic names.
/api/municipalities?search=ariananamestringFilter by governorate name (e.g., Ariana, Tunis, Sfax)
/api/municipalities?name=arianadelegationstringFilter by delegation name within a governorate
/api/municipalities?delegation=villepostalCodestringFilter by exact postal code (4 digits)
/api/municipalities?postalCode=2058sortname | nameArSort governorates by name or nameAr
/api/municipalities?sort=nameArorderasc | descSort direction, asc (default) or desc. Use together with sort.
/api/municipalities?sort=name&order=desclat, lng, radiusnumberGet municipalities near a specific location within a radius (in km)
/api/municipalities/near?lat=36.8065&lng=10.1815&radius=5
Examples
curl "https://tn-municipality-api.vercel.app/api/municipalities?name=ariana"Example response
[
{
"Name": "ARIANA",
"NameAr": "أريانة",
"Value": "ARIANA",
"Delegations": [
{
"Name": "ARIANA VILLE (Residence Kortoba)",
"NameAr": "أريانة المدينة (إقامة قرطبة)",
"Value": "ARIANA VILLE",
"PostalCode": "2058",
"Latitude": 36.866011,
"Longitude": 10.193923
}
]
}
]