{
  "openapi": "3.0.1",
  "info": {
    "title": "Italy Public Administration Directory – PEC & e-Invoicing",
    "description": "Official directory of Italian public bodies from IndicePA (AgID): Comuni, ASL, schools, universities, ministries and their offices, with institutional PEC, website, fiscal code and Codice Univoco Ufficio for e-invoicing. No personal data.",
    "version": "0.1",
    "x-build-id": "QsgMSEFOMH2rmWkKi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/orchestrated_daffodil~italy-pa-directory/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-orchestrated_daffodil-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/orchestrated_daffodil~italy-pa-directory/runs": {
      "post": {
        "operationId": "runs-sync-orchestrated_daffodil-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/orchestrated_daffodil~italy-pa-directory/run-sync": {
      "post": {
        "operationId": "run-sync-orchestrated_daffodil-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": {
          "dataset": {
            "title": "What to return",
            "enum": [
              "entities",
              "offices",
              "einvoicing"
            ],
            "type": "string",
            "description": "entities = public bodies (one row per administration). offices = organisational units (departments/offices) of each body. einvoicing = offices that receive electronic invoices, with their Codice Univoco Ufficio (SDI code).",
            "default": "entities"
          },
          "search": {
            "title": "Name contains",
            "type": "string",
            "description": "Optional. Words that must appear in the body name (or office name for offices/e-invoicing), e.g. 'comune', 'ospedale', 'tributi', 'liceo'. Case-insensitive; all words must match."
          },
          "municipalities": {
            "title": "Municipalities (comuni)",
            "type": "array",
            "description": "Optional. Official Italian municipality names, e.g. Sanremo, Milano, Roma. Case and accents are ignored.",
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Optional. Province codes (MI, RM, IM, TO…) or names (Milano, Imperia…).",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Optional. Region names, e.g. Lombardia, Lazio, Liguria, Sicilia.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Optional. Official IndicePA categories (e.g. Comuni, ASL, schools, universities, stazioni appaltanti).",
            "items": {
              "type": "string",
              "enum": [
                "C10",
                "L22",
                "L20",
                "L21",
                "L19",
                "L13",
                "L2",
                "L10",
                "L15",
                "L1",
                "C13",
                "C5",
                "L11",
                "L40",
                "L8",
                "L34",
                "L7",
                "L39",
                "L46",
                "L35",
                "L45",
                "L47",
                "L6",
                "L12",
                "L28",
                "L24",
                "L42",
                "L36",
                "C3",
                "C7",
                "C17",
                "C16",
                "L44",
                "C8",
                "C14",
                "L16",
                "C11",
                "L37",
                "S01G",
                "C12",
                "L33",
                "L43",
                "C2",
                "L38",
                "C1",
                "L5",
                "L4",
                "S01",
                "SA",
                "SAG",
                "L31",
                "L18",
                "L17"
              ],
              "enumTitles": [
                "Agenzie Fiscali (C10)",
                "Agenzie Regionali Sanitarie (L22)",
                "Agenzie Regionali e Provinciale per la Rappresentanza Negoziale (L20)",
                "Agenzie Regionali per le Erogazioni in Agricoltura (L21)",
                "Agenzie ed Enti Regionali del Lavoro (L19)",
                "Agenzie ed Enti Regionali di Sviluppo Agricolo (L13)",
                "Agenzie ed Enti Regionali per la Formazione, la Ricerca e l'Ambiente (L2)",
                "Agenzie ed Enti per il Turismo (L10)",
                "Agenzie, Enti e Consorzi Pubblici per il Diritto allo Studio Universitario (L15)",
                "Altri Enti Locali (L1)",
                "Automobile Club Federati ACI (C13)",
                "Autorita' Amministrative Indipendenti (C5)",
                "Autorita' Portuali (L11)",
                "Autorita' di Bacino (L40)",
                "Aziende Ospedaliere, Aziende Ospedaliere Universitarie, Policlinici e Istituti di Ricovero e Cura a Carattere Scientifico Pubblici (L8)",
                "Aziende Pubbliche di Servizi alla Persona (L34)",
                "Aziende Sanitarie Locali (L7)",
                "Aziende e Consorzi Pubblici Territoriali per l'Edilizia Residenziale (L39)",
                "Aziende ed Amministrazioni dello Stato ad Ordinamento Autonomo (L46)",
                "Camere di Commercio, Industria, Artigianato e Agricoltura e loro Unioni Regionali (L35)",
                "Citta' Metropolitane (L45)",
                "Commissari Straordinari Governativi (L47)",
                "Comuni e loro Consorzi e Associazioni (L6)",
                "Comunita' Montane e loro Consorzi e Associazioni (L12)",
                "Consorzi Interuniversitari di Ricerca (L28)",
                "Consorzi di Bacino Imbrifero Montano (L24)",
                "Consorzi per l'Area di Sviluppo Industriale (L42)",
                "Consorzi tra Amministrazioni Locali (L36)",
                "Enti Pubblici Non Economici (C3)",
                "Enti Pubblici Produttori di Servizi Assistenziali, Ricreativi e Culturali (C7)",
                "Enti di Previdenza ed Assistenza Sociale in Conto Economico Consolidato privati (C17)",
                "Enti di Previdenza ed Assistenza Sociale in Conto Economico Consolidato pubblici (C16)",
                "Enti di Regolazione dei Servizi Idrici e o dei Rifiuti (L44)",
                "Enti e Istituzioni di Ricerca Pubblici (C8)",
                "Federazioni Nazionali, Ordini, Collegi e Consigli Professionali (C14)",
                "Fondazioni Lirico, Sinfoniche (L16)",
                "Forze di Polizia ad Ordinamento Civile e Militare per la Tutela dell'Ordine e della Sicurezza Pubblica (C11)",
                "Gestori di Pubblici Servizi (L37)",
                "Gestori di Pubblici Servizi (S01G)",
                "Istituti Zooprofilattici Sperimentali (C12)",
                "Istituti di Istruzione Statale di Ogni Ordine e Grado (L33)",
                "Istituzioni per l'Alta Formazione Artistica, Musicale e Coreutica - AFAM (L43)",
                "Organi Costituzionali e di Rilievo Costituzionale (C2)",
                "Parchi Nazionali, Consorzi e Enti Gestori di Parchi e Aree Naturali Protette (L38)",
                "Presidenza del Consiglio dei Ministri, Ministeri e Avvocatura dello Stato (C1)",
                "Province e loro Consorzi e Associazioni (L5)",
                "Regioni, Province Autonome e loro Consorzi e Associazioni (L4)",
                "Societa' in Conto Economico Consolidato (S01)",
                "Stazioni Appaltanti (SA)",
                "Stazioni Appaltanti Gestori di Pubblici Servizi (SAG)",
                "Teatri Stabili ad Iniziativa Pubblica (L31)",
                "Unioni di Comuni e loro Consorzi e Associazioni (L18)",
                "Universita' e Istituti di Istruzione Universitaria Pubblici (L17)"
              ]
            }
          },
          "fiscalCodes": {
            "title": "Fiscal codes (codice fiscale ente)",
            "type": "array",
            "description": "Optional. Look up specific bodies by their fiscal code / VAT number, e.g. 00253750087.",
            "items": {
              "type": "string"
            }
          },
          "ipaCodes": {
            "title": "IPA codes",
            "type": "array",
            "description": "Optional. IndicePA codes of the bodies, e.g. c_i138.",
            "items": {
              "type": "string"
            }
          },
          "officeCodes": {
            "title": "Office codes (Codice Univoco Ufficio)",
            "type": "array",
            "description": "Optional, offices/e-invoicing only. Six-character office codes, e.g. UFXXXX.",
            "items": {
              "type": "string"
            }
          },
          "excludeInLiquidation": {
            "title": "Exclude bodies in liquidation",
            "type": "boolean",
            "description": "Public bodies only: skip bodies flagged as in liquidation.",
            "default": true
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Maximum number of records to return (you are charged per record).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}