# Italy Administrative Court Rulings Scraper — OpenGA (`promptica/italy-administrative-court-rulings-openga`) Actor

Official Italian administrative court CSV metadata: Consiglio di Stato, CGARS and TAR, licensed CC BY 4.0, filters and persistent monitoring.

- **URL**: https://apify.com/promptica/italy-administrative-court-rulings-openga.md
- **Developed by:** [Lorenzo Talamucci](https://apify.com/promptica) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Italy Administrative Court Rulings Scraper — OpenGA

Get official Italian administrative court **metadata** from OpenGA's downloadable CSV datasets. Filter Consiglio di Stato (CDS), CGARS and regional TAR rulings by seat, publication year, outcome and subject. Monitor new or changed records in a named Apify key-value store.

Useful for legal research discovery, legaltech case indexes, procurement litigation monitoring and compliance statistics. Subject metadata can support RAG/LLM discovery; this Actor does **not** supply judgment text, legal advice, parties, ECLI or document links.

### Input

```json
{"organo":"CDS","anno":2026,"tipo":"sentenze","maxResults":5}
```

```json
{"organo":"TAR","sede":"tar-toscana","anno":2026,"tipo":"sentenze","esito":"ACCOGLIE","testoOggetto":"appalto","maxResults":100,"soloNuove":true,"monitorNome":"toscana-appalti"}
```

| Field | Meaning |
|---|---|
| organo | CDS (default), CGARS, TAR (includes TRGA), ALL |
| sede | Optional exact slug below; must belong to organo |
| anno | Publication year, 2017–current UTC year; current year by default |
| tipo | sentenze (default), ordinanze, decreti |
| esito | Case-insensitive outcome substring |
| testoOggetto | Case-insensitive subject substring |
| maxResults | Matching window size, 1–100000; default 10, prefill 5 |
| soloNuove | Emit only new/changed records; default false |
| monitorNome | Named persistent store, 1–63 letters/digits/hyphens |

Sede slugs:

```text
cds
cga-sicilia
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
```

### Coverage and ordering

The HTML catalogs publish annual files and historical bundles. The Actor discovers links from HTML, checks **each resource's own CC BY 4.0 license**, and downloads only its CSV. It never calls the disallowed OpenGA `/api/` or the separate judgment-text portal.

Live source checks on 28 September 2026: CDS judgments 2026 contained 4,404 records (2 January–4 September); CGARS 529 (5 January–4 September); TAR Toscana 1,677 (5 January–5 September). These are observations, not promised future totals. Updates are monthly. Other seats/types are discovered and checked at runtime; they are not all live-tested. A missing/unlicensed resource produces explicit diagnostics, never inferred permission.

Within each CSV records are ordered by publication date, ruling number and appeal number descending. Seats are visited in the order listed above; ALL is **not a globally sorted cross-court feed**. `maxResults` bounds the first matching window, including unchanged records. A repeated monitor with identical filters/window yields zero if unchanged. Increase the window to cover more records; no automatic historical backfill cursor is maintained. Use a specific seat for reliable scheduled coverage.

### Output and monitoring

The common Italy legal fields are `court`, `type`, `number`, `year`, `decisionDate`, `depositDate`, `subject`, `summary`, `fullText`, `ecli`, `sourceUrl`, `license`, `attribution`. Unsupported values are null, not fabricated.

`number` preserves the original identifier, including its year prefix. `publicationDate` is the ruling's publication date. **`appealDepositDate` is the appeal filing date, not the judgment deposit date**; `depositDate` remains null. Also includes seat/section codes, appeal number/type, outcome, hearing type, defining flag, download URL and license URL. One record represents a ruling/appeal association; distinct appeals for the same ruling are preserved. `sourceUrl` points to the CSV resource sheet, not a judgment document.

Monitor identities include seat code, ruling type/number and appeal number. Content changes are detected by fingerprint. State is saved only after successful dataset delivery. Recovery can replay an already delivered row after an interrupted state write; consumers should deduplicate by `id`. Avoid concurrent runs against the same monitor. Changing filters creates a separate namespace in that store. No deletion inference is performed.

### Limits and diagnostics

Default memory: 1 GB. Requests are sequential, spaced by at least 10 seconds (or a longer robots delay), with up to three attempts for temporary failures and fresh proxy sessions in cloud. Local runs use no paid proxy. No captcha/login bypass. Redirects and non-OpenGA hosts are refused.

The internal deadline is exclusively the platform `timeoutAt` minus 30 seconds (default platform timeout: 3600 seconds). There is no fixed duration cap; local runs without `timeoutAt` have no internal deadline. Downloads are limited to 64 MiB; HTML to 4 MiB. Broad ALL/TAR queries or large archives may stop early. Previously saved rows are preserved. `OUTPUT` and `SUMMARY` report `partial`, counts and a recovery hint. Invalid inputs/source outages close cleanly with diagnostics; SUCCEEDED alone does not prove a complete export. Process kills, platform failures and OOM cannot be guaranteed away.

### Proposed pricing (configured by the publisher)

| Event | Price |
|---|---:|
| Start at 1 GB | $0.05 |
| Delivered metadata result | $0.005 |

Configure custom `risultato` **or** synthetic `apify-default-dataset-item`, not both. The Actor prefers synthetic dataset charging if present; otherwise it charges the defined custom event once per result. Missing events are tolerated for local/prepublication testing. No premium text/PDF charge exists because this source does not supply those documents. Console pricing is authoritative; this build does not configure or publish prices.

### Attribution and license

Data source: Giustizia Amministrativa — OpenGA (openga.giustizia-amministrativa.it). Data are CC BY 4.0 (creativecommons.org), confirmed individually on downloaded resource sheets. Every row retains `license`, `licenseUrl`, `attribution`, `sourceUrl` and `downloadUrl`. Promptica transforms the CSV to normalized, filtered records. Retain attribution and indicate further modifications when redistributing.

This license does **not** cover extracting full texts from giustizia-amministrativa.it. No such extraction is implemented.

The seat identifier list was checked against dataciviclab/giustizia-amministrativa (github.com) (MIT); its API downloader is not used. Parsing uses Cheerio and csv-parse. Request/budget patterns derive from this repository's Aste 2.0 Actor.

### Local verification

```bash
npm ci --ignore-scripts
npm test
apify run --input-file test/prefill.json
apify run --input-file test/monitor.json
apify run --input-file test/monitor.json
```

Tests use real licensed CSV/HTML fixtures captured 28 September 2026. `test/collaudo.json` provides the seven-case cloud battery for the publishing team. Cloud execution and deployment are not part of local verification.

### Italiano

Metadati ufficiali dei provvedimenti amministrativi da CSV OpenGA, con filtri e monitor persistente. Solo dati con licenza verificata CC-BY 4.0: nessun testo integrale dal portale giurisprudenziale. `maxResults` limita la finestra osservata anche in monitor; una seconda run identica restituisce zero se non ci sono variazioni. Per conoscere esito completo/parziale leggere OUTPUT, non solo lo stato SUCCEEDED.

### Altri dati pubblici italiani / More Italian public data

Italy Public Data by Promptica — altri dataset / other datasets:

- [Italy Public Procurement — ANAC CIG](https://apify.com/promptica/anac-appalti-italia) — Estrae i bandi di gara pubblici italiani (CIG) dagli open data ufficiali ANAC, inclusi gli affidamenti sotto soglia UE che TED non copre. Filtra per CPV, provincia, importo, stazione appaltante, oggetto e settore. Dati 100% pubblici.
- [Estrai aste giudiziarie PVP — Perizie e monitor](https://apify.com/promptica/aste-giudiziarie-pvp) — Aste giudiziarie PVP: estrai immobili, prezzi, date, tribunali e link alle perizie dal portale ufficiale. Filtri e monitor delle aste nuove o cambiate.
- [EPREL — EU Energy Label Database (etichette energetiche UE)](https://apify.com/promptica/eprel-etichette-energetiche) — Estrae dati pubblici dal registro EPREL della Commissione Europea sulle etichette energetiche: classe, consumi, parametri tecnici, produttore. Utile per e-commerce compliance (Reg. UE 2017/1369).
- [Italy & Spain Fuel Prices Scraper — MIMIT / MITECO](https://apify.com/promptica/europe-fuel-prices-italy-spain) — Official station-level fuel prices, location and brand filters, radius search and persistent price-change monitoring for Italy and Spain.
- [Gazzetta Ufficiale RAG — Leggi, Decreti e Concorsi (Italia)](https://apify.com/promptica/gazzetta-ufficiale-rag) — Estrae atti normativi e concorsi pubblici dalla Gazzetta Ufficiale italiana (gazzettaufficiale.it) come record Markdown strutturati, pronti per pipeline RAG. Filtra per serie, tipo atto, data, e parola chiave. Dati 100% pubblici, nessuna chiave API.
- [inPA Concorsi Pubblici — Portale del reclutamento](https://apify.com/promptica/inpa-concorsi-pubblici) — Estrae i concorsi pubblici e gli avvisi di selezione della PA italiana dal portale ufficiale inPA. Filtra per ente, parola chiave, numero minimo di posti e data. Dati 100% pubblici.
- [Estrai fornitori MePA e Consip — Elenco ufficiale imprese PA](https://apify.com/promptica/italy-consip-suppliers) — Fornitori MePA e Consip: imprese abilitate e aggiudicatarie della PA con partita IVA, sede, aggiudicazioni e contratti attivi. Open data ufficiali.
- [Italy Constitutional Court Decisions — Official Open Data](https://apify.com/promptica/italy-constitutional-court-decisions) — Italian Constitutional Court decisions and official summaries since 1956, with full text, filters and persistent monitoring. CC BY-SA 3.0 attribution included.
- [Estrai PEC enti pubblici — Indice IPA: comuni ed enti (AgID)](https://apify.com/promptica/italy-ipa-public-bodies) — PEC degli enti pubblici italiani dall'Indice IPA di AgID: comuni, enti e stazioni appaltanti con codice fiscale, indirizzo, sito e email istituzionali.
- [Scarica elenco farmacie italiane — Anagrafe Ministero Salute](https://apify.com/promptica/italy-pharmacies) — Elenco farmacie italiane dall'anagrafe ufficiale del Ministero della Salute: nome, partita IVA, indirizzo, comune e provincia. Filtri, storico e monitor.
- [Estrai aste immobili Demanio — Immobili dello Stato in vendita](https://apify.com/promptica/italy-state-property-sales) — Aste immobili dell'Agenzia del Demanio: immobili dello Stato in vendita con prezzo base, scadenza offerte, luogo, superficie e bandi. Filtri e monitor.
- [TED Gare d'Appalto EU](https://apify.com/promptica/ted-gare-eu) — Estrae bandi di gara pubblici europei dal portale ufficiale TED (Tenders Electronic Daily, Gazzetta Ufficiale UE). Dati 100% pubblici via API ufficiale TED. Filtra per codice CPV, paese, parole chiave e data.

# Actor input Schema

## `organo` (type: `string`):

Court group. ALL may reach the internal time limit; prefer one seat.

## `sede` (type: `string`):

Optional exact seat slug, e.g. tar-toscana. See README.

## `anno` (type: `integer`):

Defaults to current UTC year; available history begins in 2017.

## `tipo` (type: `string`):

Select judgments, orders or decrees.

## `esito` (type: `string`):

Case-insensitive substring, e.g. ACCOGLIE.

## `testoOggetto` (type: `string`):

Case-insensitive literal substring.

## `maxResults` (type: `integer`):

Maximum matching records inspected, including unchanged monitor records. Per-seat newest publication first.

## `soloNuove` (type: `boolean`):

Persistent monitoring; includes changes to previously delivered records.

## `monitorNome` (type: `string`):

Use a different name for independent monitors. Avoid concurrent runs on one monitor.

## Actor input object example

```json
{
  "organo": "CDS",
  "sede": "",
  "anno": 2026,
  "tipo": "sentenze",
  "esito": "",
  "testoOggetto": "",
  "maxResults": 5,
  "soloNuove": false,
  "monitorNome": "openga-monitor"
}
```

# Actor output Schema

## `rulings` (type: `string`):

No description

## `diagnostics` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "organo": "CDS",
    "anno": 2026,
    "tipo": "sentenze",
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("promptica/italy-administrative-court-rulings-openga").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "organo": "CDS",
    "anno": 2026,
    "tipo": "sentenze",
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("promptica/italy-administrative-court-rulings-openga").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "organo": "CDS",
  "anno": 2026,
  "tipo": "sentenze",
  "maxResults": 5
}' |
apify call promptica/italy-administrative-court-rulings-openga --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,promptica/italy-administrative-court-rulings-openga"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/T4cFWIldV5nkVnEFk/builds/nhHNHqkKQFXo8M93o/openapi.json
