# Italian Constitutional Court - Case Law Search (`legaltech/corte-costituzionale`) Actor

Search 20,000+ Italian Constitutional Court decisions (1956-present) from official open data: boolean search, massime, operative part, constitutional articles invoked.

- **URL**: https://apify.com/legaltech/corte-costituzionale.md
- **Developed by:** [Miguel González](https://apify.com/legaltech) (community)
- **Categories:** Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 81.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### Italian Constitutional Court - Case Law Search

Searches more than 20,000 judgments and orders (sentenze and ordinanze) of the Italian Constitutional Court (Corte costituzionale, 1956-present) using the Court's official open data (dati.cortecostituzionale.it, updated weekly). Boolean search with AND/OR/NOT (Italian and Spanish operators also accepted), exact phrases, \* wildcard and -word exclusion, case- and accent-insensitive; search everywhere, only in the reasoning, only in the official headnotes (massime) or only in the operative part (dispositivo). Filters by filing date, decision type (sentenza/ordinanza), proceeding type (incidental, principal, conflicts of powers, referendum), reporting judge and constitutional articles invoked. Retrieves decisions by ECLI or number/year. Returns ECLI, dates, panel, header (epigrafe), operative part, structured massime (title, text, constitutional parameters, challenged provisions), relevant passages and optional full text. Limits: each run downloads the official dumps for the requested period (about 15 s since 2001, about 50 s for the whole archive).

### Use cases

- Trace the Court's line of case law on a topic (e.g. "ergastolo ostativo").
- Find every decision that applies a specific article of the Italian Constitution (e.g. art. 32).
- Search only the official headnotes (massime) to get the summarised doctrine.
- Retrieve a specific decision by ECLI or number/year with its operative part and massime.
- Extract relevant passages for LLM analysis.

### How to use (guide for AI agents)

- `pronunce`: formats "2024/1", "1/2024" or "ECLI:IT:COST:2024:1".
- `constitutionArticles`: article number only ("3", "32", "117").
- `judgmentType` and `searchIn`: pick by option title.
- Search terms in Italian. Narrow `dateFrom` for faster runs.
- Every result includes `searchTerm` and `rank`; `passages` holds the paragraphs where the search terms appear, ready for LLM analysis.

### Input example

```json
{
    "searchTerms": ["ergastolo ostativo"],
    "dateFrom": "2018-01-01",
    "constitutionArticles": ["27"],
    "sortOrder": "relevance",
    "maxResults": 20,
    "passages": 3
}
```

### Output example (abridged)

```json
{
    "searchTerm": "ergastolo ostativo",
    "rank": 1,
    "score": 48,
    "totalFound": 18,
    "ecli": "ECLI:IT:COST:2021:97",
    "number": 97,
    "year": 2021,
    "type": "Ordinanza",
    "judgmentType": "GIUDIZIO DI LEGITTIMITÀ COSTITUZIONALE IN VIA INCIDENTALE",
    "decisionDate": "2021-04-15",
    "depositDate": "2021-05-11",
    "president": "CORAGGIO",
    "relatore": "Nicolò Zanon",
    "redattore": "Nicolò Zanon",
    "collegio": ["Giancarlo CORAGGIO", "Giuliano AMATO", "..."],
    "epigrafe": "nel giudizio di legittimità costituzionale degli artt. 4-bis, comma 1, 58-ter della legge 26 luglio 1975, n. 354...",
    "dispositivo": "per questi motivi LA CORTE COSTITUZIONALE rinvia all'udienza pubblica del 10 maggio 2022...",
    "passages": ["Successivamente, anche il beneficio della liberazione anticipata veniva esteso ai condannati all'ergastolo..."],
    "massime": [{
        "number": "43874",
        "title": "Ordinamento penitenziario - Benefici penitenziari - ... (c.d. ergastolo ostativo) ...",
        "text": "È rinviata all'udienza pubblica del 10 maggio 2022...",
        "constitutionalParameters": ["Costituzione, art. 3", "Costituzione, art. 117, comma 1"],
        "challengedNorms": ["legge, n. 354, del 26/07/1975, art. 4 bis, comma 1"],
        "constitutionArticles": ["3", "117"]
    }],
    "url": "https://www.cortecostituzionale.it/scheda-pronuncia/2021/97"
}
```

### Notes and limits

- Data: © Corte costituzionale, dati.cortecostituzionale.it, licence CC BY-SA 3.0. Data is updated weekly, so a decision filed in the last few days may not appear yet.

### Source

Only official sources are used (courts, ministries or the open data published by the courts themselves). Results are returned as published by the source.

### Proxy

No proxy is needed: the source is an official open service. If it starts blocking, enable `proxyConfiguration` (Apify RESIDENTIAL (IT) recommended, or your own `proxyUrls`). Requests then go through a sticky session (same IP, own cookies) with a Chrome TLS fingerprint (impit), and the IP is rotated on 403/429 or network errors.

# Actor input Schema

## `searchTerms` (type: `array`):

One search per item (Italian). Syntax: AND / OR / NOT (also Italian E / O / NON and Spanish Y / O / NO, uppercase), "exact phrase", \* wildcard (costituzional\*), parentheses and -word. Case- and accent-insensitive.

## `searchIn` (type: `string`):

Parts of the decision to search. Codes are opaque: do NOT guess them; choose by reading the title (enumTitle) of each option.

## `dateFrom` (type: `string`):

Filing (publication) date, start of range (YYYY-MM-DD). A narrower range makes the run faster. Leave empty to search the whole archive since 1956.

## `dateTo` (type: `string`):

Filing date, end of range (YYYY-MM-DD).

## `pronunciaType` (type: `string`):

Sentenza (judgment) or ordinanza (order).

## `judgmentType` (type: `string`):

Type of constitutional proceeding (from the official massime). Codes are opaque: do NOT guess them; choose by reading the title (enumTitle) of each option.

## `relatore` (type: `string`):

Name or surname of the relatore or redattore, e.g. "Amoroso".

## `constitutionArticles` (type: `array`):

Only decisions whose massime invoke one of these articles of the Italian Constitution as a parameter (e.g. "3", "32", "117").

## `pronunce` (type: `array`):

Decision identifiers to fetch directly: "2024/1", "1/2024" or "ECLI:IT:COST:2024:1".

## `sortOrder` (type: `string`):

Relevance (number of term occurrences) or filing date.

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

Maximum number of decisions returned per search term.

## `passages` (type: `integer`):

Number of paragraphs containing the search terms returned in `passages` (0 = none). Ideal for LLM analysis.

## `includeMassime` (type: `boolean`):

Adds the official headnotes (massime) of each decision: title, text, constitutional parameters and challenged provisions.

## `includeFullText` (type: `boolean`):

Adds the `text` field with the full reasoning ("Considerato in diritto"). Greatly increases output size.

## `proxyConfiguration` (type: `object`):

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.

## Actor input object example

```json
{
  "searchTerms": [
    "\"diritto alla salute\" AND ambiente"
  ],
  "searchIn": "all",
  "dateFrom": "2001-01-01",
  "pronunciaType": "",
  "judgmentType": "",
  "constitutionArticles": [],
  "pronunce": [],
  "sortOrder": "relevance",
  "maxResults": 20,
  "passages": 3,
  "includeMassime": true,
  "includeFullText": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset of decisions returned by the search, one item per result. Main fields: searchTerm, rank, ecli, type, depositDate, judgmentType, relatore, dispositivo, passages, url. See the dataset schema for the full list of fields.

# 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 = {
    "searchTerms": [
        "\"diritto alla salute\" AND ambiente"
    ],
    "dateFrom": "2001-01-01",
    "constitutionArticles": [],
    "pronunce": [],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("legaltech/corte-costituzionale").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 = {
    "searchTerms": ["\"diritto alla salute\" AND ambiente"],
    "dateFrom": "2001-01-01",
    "constitutionArticles": [],
    "pronunce": [],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("legaltech/corte-costituzionale").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 '{
  "searchTerms": [
    "\\"diritto alla salute\\" AND ambiente"
  ],
  "dateFrom": "2001-01-01",
  "constitutionArticles": [],
  "pronunce": [],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call legaltech/corte-costituzionale --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,legaltech/corte-costituzionale"
        }
    }
}
```

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/POWxhsbczggfm7lmQ/builds/PU2rCIU3JeL4JqSpo/openapi.json
