Our prices
Price list for single API calls
- Search Municipalities € 0,00 + vat
FREE first 86400 calls/day
All ISTAT codes of Italian cities always updated and free of charge.
Access the ISTAT codes of all municipalities in real time and via API.
The Search Municipalities service belongs to the API ZIP Codes and allows to verify, obtain and update ISTAT city codes and their associated municipalities.
The ISTAT code is a numerical identifier assigned by the Italian National Institute of Statistics to every existing or new municipality and is used for statistical purposes.
It is an alphanumeric code consisting of six digits: the first three digits of the code identify the province to which the municipality belongs, while the next three identify the municipality within its province.
The Search Municipalities is identified by the endpoint: GET https://cap.openapi.it/cerca_comuni
This service is completely free and allows obtaining the ISTAT code based on a series of parameters such as:
In the same request, one or more parameters can be combined.
The name field (city) allows for textual search and will present in the results all cities that contain that name. For example, if the search parameter for city name is 'Rome', other cities that include "rome" will be returned, such as Campagnano di Roma or Trevignano Romano. It is possible to refine the search using other parameters such as province, region, and ZIP code.
This is an example request in which we have chosen the city of Firenze (Florence) as the parameter:
https://cap.openapi.it/cerca_comuni?comune=Firenze
The response may include one or more cities, based on the parameters used, with the following information:
This is an example of response:
{
"data": {
"istat": "48017",
"comune": "Firenze",
"suppressed":false
}
],
"suppressed": []
},
"success": true,
"message": "",
"error": null
}
In case of suppression, the six-character alphanumeric code that identified it at the time of suppression remains assigned to the suppressed municipality and is not reassigned. In case of a change in the name, the code remains unchanged and remains assigned to the new name.
The obtained ISTAT code can then be used to obtain further information about the municipalities through other endpoints, such as Municipalities Basic or Advanced.