{
  "openapi": "3.0.1",
  "info": {
    "title": "Italian Administrative Case Law - Consiglio di Stato and TAR",
    "description": "Search judgments of the Italian Consiglio di Stato, CGA Sicilia and the 29 TAR (official OpenGA open data) with outcome, operative part and reporting judge.",
    "version": "0.1",
    "x-build-id": "eddLhkXKcF5fehBvL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/legaltech~giustizia-amministrativa/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-legaltech-giustizia-amministrativa",
        "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/legaltech~giustizia-amministrativa/runs": {
      "post": {
        "operationId": "runs-sync-legaltech-giustizia-amministrativa",
        "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/legaltech~giustizia-amministrativa/run-sync": {
      "post": {
        "operationId": "run-sync-legaltech-giustizia-amministrativa",
        "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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Italian terms. Syntax: AND / OR / NOT, \"exact phrase\", * wildcard (appalt*), parentheses and -word. In full-text mode they are searched in the whole text of the decisions; in subject mode, in the subject of the appeal (oggetto del ricorso).",
            "items": {
              "type": "string"
            }
          },
          "searchIn": {
            "title": "Search in",
            "enum": [
              "fulltext",
              "subject"
            ],
            "type": "string",
            "description": "Full text uses the official search engine of giustizia-amministrativa.it over all decisions (judgments, orders, opinions), newest first, with year-level date filtering. Subject searches the OpenGA metadata (oggetto del ricorso) of judgments and is the only mode that supports outcome, appeal number, exact dates and relevance sorting; it is used automatically when those filters are set. Codes are opaque: do NOT guess them; choose by reading the title (enumTitle) of each option.",
            "default": "fulltext"
          },
          "courts": {
            "title": "Courts",
            "type": "array",
            "description": "Consiglio di Stato, CGA Sicilia and the regional administrative courts (TAR). Empty = all (slower). Codes are opaque: do NOT guess them; choose by reading the title (enumTitle) of each option.",
            "items": {
              "type": "string",
              "enum": [
                "cds",
                "cga",
                "tar_aq",
                "tar_pe",
                "tar_pz",
                "tar_cz",
                "tar_rc",
                "tar_na",
                "tar_sa",
                "tar_bo",
                "tar_pr",
                "tar_ts",
                "tar_lt",
                "tar_rm",
                "tar_ge",
                "tar_bs",
                "tar_mi",
                "tar_an",
                "tar_cb",
                "tar_to",
                "tar_ba",
                "tar_le",
                "tar_ca",
                "tar_ct",
                "tar_pa",
                "tar_fi",
                "tar_pg",
                "tar_ao",
                "tar_ve",
                "trga_bz",
                "trga_tn"
              ],
              "enumTitles": [
                "Consiglio di Stato",
                "CGA Regione Siciliana",
                "TAR Abruzzo - L'Aquila",
                "TAR Abruzzo - Pescara",
                "TAR Basilicata",
                "TAR Calabria - Catanzaro",
                "TAR Calabria - Reggio Calabria",
                "TAR Campania - Napoli",
                "TAR Campania - Salerno",
                "TAR Emilia-Romagna - Bologna",
                "TAR Emilia-Romagna - Parma",
                "TAR Friuli Venezia Giulia",
                "TAR Lazio - Latina",
                "TAR Lazio - Roma",
                "TAR Liguria",
                "TAR Lombardia - Brescia",
                "TAR Lombardia - Milano",
                "TAR Marche",
                "TAR Molise",
                "TAR Piemonte",
                "TAR Puglia - Bari",
                "TAR Puglia - Lecce",
                "TAR Sardegna",
                "TAR Sicilia - Catania",
                "TAR Sicilia - Palermo",
                "TAR Toscana",
                "TAR Umbria",
                "TAR Valle d'Aosta",
                "TAR Veneto",
                "TRGA Bolzano",
                "TRGA Trento"
              ]
            },
            "default": [
              "cds"
            ]
          },
          "dateFrom": {
            "title": "Publication date from",
            "type": "string",
            "description": "YYYY-MM-DD. Open data starts in 2017."
          },
          "dateTo": {
            "title": "Publication date to",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "outcome": {
            "title": "Outcome (esito)",
            "type": "string",
            "description": "Text contained in the outcome, e.g. \"ACCOGLIE\", \"RESPINGE\", \"IRRICEVIBILE\", \"INAMMISSIBILE\". Subject mode only (switches to it automatically)."
          },
          "section": {
            "title": "Chamber",
            "type": "string",
            "description": "Chamber (contains), e.g. \"SEZIONE V\"."
          },
          "appealNumbers": {
            "title": "Appeal numbers (NRG)",
            "type": "array",
            "description": "Only judgments in these appeals: \"2394/2024\" or \"202402394\". Subject mode only (switches to it automatically).",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "relevance"
            ],
            "type": "string",
            "description": "Subject mode only: publication date or relevance. Full-text results come newest first, as in the portal.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of decisions returned per search term.",
            "default": 20
          },
          "includeText": {
            "title": "Read the judgment",
            "type": "boolean",
            "description": "Opens each judgment on the official portal to extract the reporting judge, operative part (P.Q.M.) and relevant passages. Disable for metadata only (much faster).",
            "default": true
          },
          "onlyWithText": {
            "title": "Only judgments with text",
            "type": "boolean",
            "description": "Skip judgments whose text is not yet published on the official portal (frequent for camera di consiglio rulings and the most recent weeks); the actor keeps reading candidates until it reaches maxResults. Requires Read the judgment.",
            "default": false
          },
          "passages": {
            "title": "Relevant passages",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Paragraphs of the judgment containing the search terms (requires \"Read the judgment\").",
            "default": 3
          },
          "includeFullText": {
            "title": "Include full text",
            "type": "boolean",
            "description": "Adds the `text` field with the full decision. Greatly increases output size; enable only if needed.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. The source usually works without a proxy. If it blocks, use Apify RESIDENTIAL (IT) or your own proxyUrls; requests then use sticky sessions, IP rotation and a Chrome TLS fingerprint.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}