Toutes les données actualisées sur les codes postaux, les municipalités, les provinces et les régions
Vérifiez et obtenez des informations en temps réel sur les codes postaux, les codes Istat et les municipalités correspondantes. Source officielle Poste Italiane.
Toutes les connaissances dont vous avez besoin
Vous trouverez ici quelques conseils à prendre en compte pour aborder cette API. Si vous préférez, nous fournissons des exemples de code, la documentation OAS3, la possibilité d'essayer l'API en direct via Swagger UI ou d'importer l'intégralité de la collection dans Postman. Nous proposons également un environnement Sandbox où vous pouvez expérimenter toutes sortes de requêtes de manière totalement gratuite.
Obtenir le Token dans la section appropriée avant de commencer.
- Oas file url https://console.openapi.com/oas/fr/cap.openapi.json
- Fork or import with Postman
- Production domain cap.openapi.it
- Sandbox domain test.cap.openapi.it
- Production Scopes 8
-
Sandbox Scopes 8
- GET test.cap.openapi.it/cerca_comuni
- GET test.cap.openapi.it/cap
- GET test.cap.openapi.it/comuni_base
- GET test.cap.openapi.it/comuni_advance
- GET test.cap.openapi.it/regioni
- GET test.cap.openapi.it/province
- GET test.cap.openapi.it/citta_metropolitane
- GET test.cap.openapi.it/comuni_soppressi
Cap (1.0.0)
Ce service vous permet de rechercher des villes italiennes et d'obtenir leurs codes istat et cap.
Test
Veuillez noter que l'environnement sandbox est chargé avec un ensemble de données limité et est destiné à être utilisé à des fins de test. Certains paramètres de recherche peuvent ne pas fonctionner ou renvoyer toujours les mêmes données.Recherche de villes par nom, région et/ou province
Cette méthode vous permet de rechercher des villes italiennes et d'obtenir leur code istat.
Authorizations:
query Parameters
comune | string Nom de la ville |
cap | string Casquette de la ville |
istat | string Code Istat de la ville |
codice_catasto | string Code du cadastre de la ville |
regione | string Région de la ville |
provincia | string Province de la ville |
Responses
Response Schema: application/json
Array of objects | |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://cap.openapi.it/cerca_comuni?comune=SOME_STRING_VALUE&cap=SOME_STRING_VALUE&istat=SOME_STRING_VALUE&codice_catasto=SOME_STRING_VALUE®ione=SOME_STRING_VALUE&provincia=SOME_STRING_VALUE"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": [
- {
- "istat": "70006",
- "comune": "Campobasso",
- "suppressed": false
- {
- "istat": "70078",
- "comune": "Termoli",
- "suppressed": false
- {
- "istat": "94023",
- "comune": "Isernia",
- "suppressed": false
- {
- "istat": "94052",
- "comune": "Venafro",
- "suppressed": false
- "success": true,
- "message": "",
- "error": null
Obtenir des informations de base sur une ville
Des données supplémentaires peuvent être demandées avec /advanced
Authorizations:
path Parameters
istat_code required | string Code Istat de la ville, vous pouvez le trouver dans les résultats de la recherche. |
Responses
Response Schema: application/json
object | |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://cap.openapi.it/comuni_base/%7Bistat_code%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": {
- "istat": "70006",
- "comune": "Campobasso",
- "regione": "Molise",
- "provincia": "Campobasso",
- "cap": [
- "86100"
- "success": true,
- "message": "",
- "error": null
Obtenir plus d'informations sur une ville
Des données supplémentaires peuvent être demandées avec /advanced
Authorizations:
path Parameters
istat_code required | string Code Istat de la ville, vous pouvez le trouver dans les résultats de la recherche. |
Responses
Response Schema: application/json
object | |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://cap.openapi.it/comuni_advance/%7Bistat_code%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": {
- "istat": "58091",
- "comune": "Roma",
- "regione": "Lazio",
- "provincia": "Roma",
- "prefisso": "06",
- "cod_fisco": "H501",
- "superficie": 1308,
- "num_residenti": 2770226,
- "nome_abitanti": "Romani",
- "patrono": {
- "nome": "SS. Pietro e Paolo",
- "data": "29 giugno"
- "municipio": {
- "municipio": "Via del Campidoglio"
- "istat_old": null,
- "sigla_provincia": "RM",
- "tel": "+39 06/67102001",
- "fax": "+39 06/67103590",
- "frazioni": [
- "Borgo Lotti",
- ".."
- "cap": [
- "00118",
- "..."
- "success": true,
- "message": "",
- "error": null
Obtenir une liste des municipalités supprimées
Authorizations:
query Parameters
sigla_provincia | string Example: sigla_provincia=AG The province code, like RM, MI, TO etc... |
Responses
Response Schema: application/json
Array of objects | |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://cap.openapi.it/comuni_soppressi?sigla_provincia=SOME_STRING_VALUE"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": [
- {
- "istat": "24011",
- "comune": "Barbarano Vicentino",
- "cod_fisco": "A627",
- "sigla_provincia": "VI",
- "regione": "Veneto",
- "provincia": "Vicenza"
- {
- "...": "..."
- "success": true,
- "message": "",
- "error": null
Obtenir une liste des villes métropolitaines italiennes
Authorizations:
Responses
Response Schema: application/json
Array of objects | |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://cap.openapi.it/citta_metropolitane"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": [
- {
- "denominazione": "MESSINA",
- "capoluogo": "Messina",
- "popolazione": 631297,
- "superficie": 3266,
- "densita": 193,
- "num_comuni": 108
- {
- "...": "..."
- "success": true,
- "message": "",
- "error": null
Obtenir une liste de villes correspondant à un plafond
Authorizations:
path Parameters
cap required | string Un code de capuchon |
Responses
Response Schema: application/json
object | |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://cap.openapi.it/cap/%7Bcap%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": {
- "comuni": [
- {
- "istat": "1016",
- "comune": "Balangero",
- "frazione": null,
- "comune_istat": "1016"
- {
- "istat": "1019",
- "comune": "Balme",
- "frazione": null,
- "comune_istat": "1019"
- {
- "istat": "1021",
- "comune": "Barbania",
- "frazione": null,
- "comune_istat": "1021"
- {
- "istat": "4701210002",
- "comune": "Pescia",
- "frazione": "Castelvecchio",
- "comune_istat": "47012"
- "provincia": "Torino",
- "sigla_provincia": "TO",
- "regione": "Piemonte"
- "success": true,
- "message": "",
- "error": null
Obtenir la liste des régions italiennes
Authorizations:
Responses
Response Schema: application/json
Array of objects | |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://cap.openapi.it/regioni"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": [
- {
- "regione": "Abruzzo",
- "capoluogo": "L'Aquila",
- "superficie": 10831.84,
- "num_residenti": 1305770,
- "num_comuni": 305,
- "presidente": "Marco Marsilio",
- "cod_fiscale": "80003170661",
- "piva": "",
- "sito": "www.regione.abruzzo.it",
- "sede": "Regione Abruzzo / Palazzo Silone - Via Leonardo da Vinci 6, 67100 L'Aquila",
- "istat": "13",
- "num_province": 4
- {
- "...": "..."
- "success": true,
- "message": "",
- "error": null
Obtenir la liste des provinces italiennes
Authorizations:
Responses
Response Schema: application/json
Array of objects | |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://cap.openapi.it/province"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": [
- {
- "sigla": "AG",
- "provincia": "Agrigento",
- "superficie": 3052.59,
- "residenti": 446081,
- "num_comuni": 43,
- "istat": "084",
- "regione": "Sicilia"
- {
- "...": "..."
- "success": true,
- "message": "",
- "error": null
Obtenir une province italienne
Authorizations:
path Parameters
code required | string Example: AG The province code, like RM, MI, TO etc... |
Responses
Response Schema: application/json
object | |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://cap.openapi.it/province/AG"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": {
- "sigla": "AG",
- "provincia": "Agrigento",
- "superficie": 3052.59,
- "residenti": 446081,
- "num_comuni": 43,
- "istat": "084",
- "regione": "Sicilia"
- "success": true,
- "message": "",
- "error": null