Tunisian Municipality API
Access comprehensive Tunisian municipality data with powerful filtering options. Built for developers, by developers.
📊
Rich Data
Complete municipality data with coordinates and Arabic names
🔍
Powerful Filtering
Filter by governorate, delegation, postal code, and more
🚀
Fast & Reliable
Lightning-fast responses with 99.9% uptime guarantee
Data Overview
24
Governorates
264
Delegations
API Playground
Test the API with real data.
// Your API response will appear here
API Documentation
🔗 API Endpoints
GET /api/municipalities
GET /api/municipalities/near
Base URL: https://tn-municipality-api.vercel.app
🔍 Query Parameters
Use these parameters to filter the municipality data. All parameters are optional and can be combined.
name
stringFilter by governorate name (e.g., Ariana, Tunis, Sfax)
Example:
GET /api/municipalities?name=ariana
delegation
stringFilter by delegation name within a governorate
Example:
GET /api/municipalities?delegation=ville
postalCode
stringFilter by postal code (5-digit format)
Example:
GET /api/municipalities?postalCode=2058
lat, lng, radius
[number, number, number]Get municipalities near a specific location within a radius (in km)
Example:
GET /api/municipalities/near?lat=36.8065&lng=10.1815&radius=5000
💡 Usage Examples
Get all municipalities
fetch('/api/municipalities') .then(response => response.json()) .then(data => console.log(data));
Filter by governorate
fetch('/api/municipalities?name=ariana') .then(response => response.json()) .then(data => console.log(data));
Filter by delegation
fetch('/api/municipalities?delegation=ville') .then(response => response.json()) .then(data => console.log(data));
Filter by postal code
fetch('/api/municipalities?postalCode=2058') .then(response => response.json()) .then(data => console.log(data));
Combine multiple filters
fetch('/api/municipalities?name=ariana&delegation=ville') .then(response => response.json()) .then(data => console.log(data));
📄 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 } ] } ]
Built with ❤️ for the Tunisian developer community