{
  "openapi": "3.0.1",
  "info": {
    "title": "Italy IPA Directory – Public Bodies, PEC & Tax Codes",
    "description": "Search and export 23,000+ Italian public bodies from the official IPA registry (AgID): municipalities, regions, health authorities, schools, universities, agencies. Clean PEC, website, tax code, category, comune, province and region. Official CC BY 4.0 open data.",
    "version": "1.0",
    "x-build-id": "Da55L4SjVfHLeOvTw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nobler_zirconia~italy-pa-directory/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nobler_zirconia-italy-pa-directory",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nobler_zirconia~italy-pa-directory/runs": {
      "post": {
        "operationId": "runs-sync-nobler_zirconia-italy-pa-directory",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nobler_zirconia~italy-pa-directory/run-sync": {
      "post": {
        "operationId": "run-sync-nobler_zirconia-italy-pa-directory",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "search": {
            "title": "Name contains words",
            "type": "string",
            "description": "Every word must match the beginning of a word in the body's name or acronym (accent- and case-insensitive): \"asl\" matches \"ASL Asti\" but not \"Caslino\"; \"universit\" matches \"Università\". Leave empty to list everything matching the other filters."
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "IPA categories (e.g. L6 municipalities, L7 local health authorities, L33 state schools, L17 universities). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "C1",
                "C10",
                "C11",
                "C12",
                "C13",
                "C14",
                "C16",
                "C17",
                "C2",
                "C3",
                "C5",
                "C7",
                "C8",
                "L1",
                "L10",
                "L11",
                "L12",
                "L13",
                "L15",
                "L16",
                "L17",
                "L18",
                "L19",
                "L2",
                "L20",
                "L21",
                "L22",
                "L24",
                "L28",
                "L31",
                "L33",
                "L34",
                "L35",
                "L36",
                "L37",
                "L38",
                "L39",
                "L4",
                "L40",
                "L42",
                "L43",
                "L44",
                "L45",
                "L46",
                "L47",
                "L5",
                "L6",
                "L7",
                "L8",
                "S01",
                "S01G",
                "SA",
                "SAG"
              ],
              "enumTitles": [
                "C1 – Presidenza del Consiglio dei Ministri, Ministeri e Avvocatura dello Stato",
                "C10 – Agenzie Fiscali",
                "C11 – Forze di Polizia ad Ordinamento Civile e Militare per la Tutela dell'Ordine e della Sicurezza Pubblica",
                "C12 – Istituti Zooprofilattici Sperimentali",
                "C13 – Automobile Club Federati ACI",
                "C14 – Federazioni Nazionali, Ordini, Collegi e Consigli Professionali",
                "C16 – Enti di Previdenza ed Assistenza Sociale in Conto Economico Consolidato pubblici",
                "C17 – Enti di Previdenza ed Assistenza Sociale in Conto Economico Consolidato privati",
                "C2 – Organi Costituzionali e di Rilievo Costituzionale",
                "C3 – Enti Pubblici Non Economici",
                "C5 – Autorita' Amministrative Indipendenti",
                "C7 – Enti Pubblici Produttori di Servizi Assistenziali, Ricreativi e Culturali",
                "C8 – Enti e Istituzioni di Ricerca Pubblici",
                "L1 – Altri Enti Locali",
                "L10 – Agenzie ed Enti per il Turismo",
                "L11 – Autorita' Portuali",
                "L12 – Comunita' Montane e loro Consorzi e Associazioni",
                "L13 – Agenzie ed Enti Regionali di Sviluppo Agricolo",
                "L15 – Agenzie, Enti e Consorzi Pubblici per il Diritto allo Studio Universitario",
                "L16 – Fondazioni Lirico, Sinfoniche",
                "L17 – Universita' e Istituti di Istruzione Universitaria Pubblici",
                "L18 – Unioni di Comuni e loro Consorzi e Associazioni",
                "L19 – Agenzie ed Enti Regionali del Lavoro",
                "L2 – Agenzie ed Enti Regionali per la Formazione, la Ricerca e l'Ambiente",
                "L20 – Agenzie Regionali e Provinciale per la Rappresentanza Negoziale",
                "L21 – Agenzie Regionali per le Erogazioni in Agricoltura",
                "L22 – Agenzie Regionali Sanitarie",
                "L24 – Consorzi di Bacino Imbrifero Montano",
                "L28 – Consorzi Interuniversitari di Ricerca",
                "L31 – Teatri Stabili ad Iniziativa Pubblica",
                "L33 – Istituti di Istruzione Statale di Ogni Ordine e Grado",
                "L34 – Aziende Pubbliche di Servizi alla Persona",
                "L35 – Camere di Commercio, Industria, Artigianato e Agricoltura e loro Unioni Regionali",
                "L36 – Consorzi tra Amministrazioni Locali",
                "L37 – Gestori di Pubblici Servizi",
                "L38 – Parchi Nazionali, Consorzi e Enti Gestori di Parchi e Aree Naturali Protette",
                "L39 – Aziende e Consorzi Pubblici Territoriali per l'Edilizia Residenziale",
                "L4 – Regioni, Province Autonome e loro Consorzi e Associazioni",
                "L40 – Autorita' di Bacino",
                "L42 – Consorzi per l'Area di Sviluppo Industriale",
                "L43 – Istituzioni per l'Alta Formazione Artistica, Musicale e Coreutica - AFAM",
                "L44 – Enti di Regolazione dei Servizi Idrici e o dei Rifiuti",
                "L45 – Citta' Metropolitane",
                "L46 – Aziende ed Amministrazioni dello Stato ad Ordinamento Autonomo",
                "L47 – Commissari Straordinari Governativi",
                "L5 – Province e loro Consorzi e Associazioni",
                "L6 – Comuni e loro Consorzi e Associazioni",
                "L7 – Aziende Sanitarie Locali",
                "L8 – Aziende Ospedaliere, Aziende Ospedaliere Universitarie, Policlinici e Istituti di Ricovero e Cura a Carattere Scientifico Pubblici",
                "S01 – Societa' in Conto Economico Consolidato",
                "S01G – Gestori di Pubblici Servizi",
                "SA – Stazioni Appaltanti",
                "SAG – Stazioni Appaltanti Gestori di Pubblici Servizi"
              ]
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Empty = all of Italy.",
            "items": {
              "type": "string",
              "enum": [
                "Abruzzo",
                "Basilicata",
                "Calabria",
                "Campania",
                "Emilia-Romagna",
                "Friuli-Venezia Giulia",
                "Lazio",
                "Liguria",
                "Lombardia",
                "Marche",
                "Molise",
                "Piemonte",
                "Puglia",
                "Sardegna",
                "Sicilia",
                "Toscana",
                "Trentino-Alto Adige/Südtirol",
                "Umbria",
                "Valle d'Aosta/Vallée d'Aoste",
                "Veneto"
              ]
            }
          },
          "provinces": {
            "title": "Provinces (vehicle code)",
            "type": "array",
            "description": "Two-letter codes, e.g. MI, RM, BG.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          "comuni": {
            "title": "Municipalities (comuni)",
            "type": "array",
            "description": "Names, ISTAT codes (e.g. 015146) or cadastral codes (e.g. F205) of the municipality where the body is located.",
            "items": {
              "type": "string"
            }
          },
          "updatedSince": {
            "title": "Updated since",
            "type": "string",
            "description": "Only bodies whose IPA record was last updated on or after this date (YYYY-MM-DD). Handy for scheduled runs. Note: this selects by update date; it does not tell you which fields changed."
          },
          "fiscalCodes": {
            "title": "Tax codes (codice fiscale)",
            "type": "array",
            "description": "11-digit codice fiscale of the body (\"IT\" prefix and spaces are removed). When any tax or IPA code is given, the run is an exact lookup: search, category, geography and date filters are ignored. Every code gets a status row: FOUND, FOUND_NOT_RETURNED (cap reached), NOT_FOUND or INVALID_FORMAT_NOT_FOUND.",
            "items": {
              "type": "string"
            }
          },
          "ipaCodes": {
            "title": "IPA codes",
            "type": "array",
            "description": "e.g. c_f205 (Municipality of Milan), r_lazio.",
            "items": {
              "type": "string"
            }
          },
          "includeContractingStations": {
            "title": "Include contracting stations & public-service companies",
            "type": "boolean",
            "description": "IPA also lists companies registered only for e-invoicing or procurement (categories SA, SAG, S01, S01G, L37). Turn off to keep public administrations only. Search mode only.",
            "default": true
          },
          "includeInLiquidation": {
            "title": "Include bodies in liquidation",
            "type": "boolean",
            "description": "Search mode only.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of bodies returned and billed. Lookup status rows are free and not counted.",
            "default": 1000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}