# Portuguese Case Law: Court Decisions (DGSI) (`yodeling_november/portuguese-case-law`) Actor

⚖️ Search Portuguese case law in seconds: decisions of the Supreme Courts (STJ, STA), the five Relações and the Central Administrative Courts from the official dgsi.pt databases, with summary, descriptors and full text. Newest first, or get alerts for new decisions.

- **URL**: https://apify.com/yodeling_november/portuguese-case-law.md
- **Developed by:** [João Fernandes](https://apify.com/yodeling_november) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 81.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 court decisions

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

## Portuguese Case Law: Court Decisions (DGSI)

**Search Portuguese case law in seconds, straight from the official court databases.**

This Actor searches the decisions that the Portuguese courts publish on **dgsi.pt**, the case-law databases of the Ministry of Justice (IGFEJ): about **390,000 decisions** of the **Supreme Court of Justice (STJ)**, the **Supreme Administrative Court (STA)**, the **five Courts of Appeal (Relações)**, the **two Central Administrative Courts** and the **Tribunal dos Conflitos**. Search by words, judge rapporteur, descriptor or date, and get each decision with its summary, descriptors and full text, newest first. Or schedule it and get **only the new decisions** on your topics.

### ✨ Why use it

- ⚖️ **Ten courts in one search:** STJ, STA, Lisboa, Porto, Coimbra, Guimarães, Évora, TCA Sul, TCA Norte and Conflitos.
- 🆕 **Newest first:** dgsi.pt returns results in no useful order and stops at 1,000 per search. This Actor splits the search by date so you always get the most recent decisions.
- 🔔 **Case-law alerts:** *New decisions only* mode returns just what was published since your last run. Schedule it weekly per topic or per client.
- 📄 **Clean, complete records:** case number, date, rapporteur, descriptors, vote, type of appeal, outcome, summary and full text, in Excel, CSV or JSON.
- 🤖 **Ready for legal AI:** full texts with paragraphs kept, ideal for search, RAG and summarisation pipelines.
- 💸 **Pay per decision:** $0.002 each. 100 decisions with full text cost $0.20.

### ⚖️ Courts covered

| Code | Court | Decisions on dgsi.pt |
|---|---|---|
| `STJ` | Supremo Tribunal de Justiça | about 74,000 |
| `STA` | Supremo Tribunal Administrativo | about 90,000 |
| `TRL` | Tribunal da Relação de Lisboa | about 62,000 |
| `TRP` | Tribunal da Relação do Porto | about 64,000 |
| `TRC` | Tribunal da Relação de Coimbra | about 17,000 |
| `TRG` | Tribunal da Relação de Guimarães | about 16,000 |
| `TRE` | Tribunal da Relação de Évora | about 19,000 |
| `TCAS` | Tribunal Central Administrativo Sul | about 31,000 |
| `TCAN` | Tribunal Central Administrativo Norte | about 21,000 |
| `TCONF` | Tribunal dos Conflitos | about 1,300 |

Around 1,000 new decisions are published every month across these courts.

### 💡 Use cases

- **Law firms and in-house counsel:** research the latest case law on a question, or follow a topic, a type of appeal or a judge.
- **Tax advisers:** follow the tax sections of the STA and the Central Administrative Courts.
- **Legal tech and AI teams:** build a searchable corpus of Portuguese case law for RAG, classification or summarisation.
- **Banks, insurers and debt collectors:** watch how the courts decide on the contracts and clauses you rely on.
- **Academics, students and journalists:** collect decisions on a subject for a study or an article.

### 🚀 How to use it

1. Click **Try for free**.
2. Type your search words, for example `"abuso de direito"`, and choose the courts. Add a rapporteur, a descriptor or a date range if you want.
3. Run it and download the decisions as **Excel, CSV or JSON**, or read them from the **Apify API**.
4. Following a topic? Switch to *New decisions only*, give the alert a *Monitor ID* and **schedule** it weekly. Send the results to email, Slack, Make, Zapier or n8n.

### 📥 Input examples

The 20 most recent decisions on abuse of rights in the Supreme Court and the Lisbon and Porto Courts of Appeal:

```json
{ "query": "\"abuso de direito\"", "courts": ["STJ", "TRL", "TRP"], "maxResultsPerCourt": 20 }
```

Everything one judge decided in 2026 in the Supreme Court, summaries only:

```json
{ "rapporteur": "ANA PAULA LOBO", "courts": ["STJ"], "dateFrom": "2026-01-01", "maxResultsPerCourt": 200, "includeFullText": false }
```

Weekly alert for new urban-lease decisions in every court:

```json
{ "descriptor": "ARRENDAMENTO URBANO", "mode": "new", "monitorId": "arrendamento-urbano", "maxResultsPerCourt": 100 }
```

Search syntax is the one of dgsi.pt: `AND`, `OR`, `NOT`, `"exact phrase"` and `*` as a wildcard, for example `arrend* AND despejo`.

### 📦 Output

One row per decision:

```json
{
  "decisionId": "TRL-43aecbbb0459013280258e8f003df25c",
  "court": "TRL",
  "courtName": "Tribunal da Relação de Lisboa",
  "caseNumber": "15881/19.6T8LSB.L1-6",
  "decisionDate": "2026-10-08",
  "rapporteur": "ANTÓNIO SANTOS",
  "descriptors": ["CONTRATO PROMESSA", "CÔNJUGE", "EXECUÇÃO ESPECÍFICA"],
  "vote": "UNANIMIDADE",
  "proceduralMeans": "APELAÇÃO",
  "decision": "IMPROCEDENTE",
  "summary": "4.1. - Se incumprido o contrato-promessa, pode o contraente fiel, na falta de convenção em contrário, obter sentença que produza os efeitos…",
  "hasFullText": true,
  "fullText": "Acordam os Juízes na 6ª Secção Cível do Tribunal da Relação de Lisboa…",
  "url": "https://www.dgsi.pt/jtrl.nsf/33182fc732316039802565fa00497eec/43aecbbb0459013280258e8f003df25c?OpenDocument",
  "source": "IGFEJ — Bases Jurídico-Documentais (dgsi.pt)",
  "fetchedAt": "2026-10-14T20:30:00+00:00"
}
```

Other fields, filled when the court publishes them: `section`, `subjectArea`, `legislation`, `documentNumber`, `conventionalNumber` and `license`. The dataset view *Decisions* shows date, court, case, rapporteur, descriptors, outcome, summary and link.

### 💰 How much does it cost?

| Event | Price |
|---|---|
| Decision (one row) | $0.002 |

Higher Apify plans get volume discounts. 100 decisions cost $0.20 and 1,000 cost $2, with or without full text. A weekly alert that finds 15 new decisions costs $0.03. You can set a maximum cost per run in the run options; the Actor stops when it is reached.

### 🔍 Good to know

- **Publication delay:** courts publish their decisions on dgsi.pt days or weeks after they are given. Alerts look at decisions given in the last 120 days, so late publications are still caught.
- **First run of an alert:** it returns the newest matching decisions and marks every other existing one as seen. From then on you get only new decisions.
- **Full text:** most recent decisions have it. Many older ones, especially before 2000, only have a summary (`hasFullText: false`).
- **Personal data:** the courts anonymise the parties before publishing. This Actor never returns the party fields of the databases (Recorrente, Recorrido). The rapporteur is the judge who wrote the decision, as published by the court.
- **Without search words, rapporteur or descriptor,** the Actor returns the decisions of the last 30 days.
- If one database is temporarily unavailable, the run continues with the other courts and the status message says which one is missing.

### 🇵🇹 Jurisprudência portuguesa

Pesquisa os **acórdãos do STJ, do STA, das Relações de Lisboa, Porto, Coimbra, Guimarães e Évora, dos TCA Sul e Norte e do Tribunal dos Conflitos** publicados no dgsi.pt. Pesquisa por palavras, relator, descritor ou data, com os mais recentes primeiro, e recebe cada acórdão com sumário, descritores e texto integral em Excel, CSV ou JSON. Com o modo *New decisions only* e um agendamento semanal, recebe **alertas de jurisprudência** só com os acórdãos novos sobre os temas que acompanha.

### ❓ FAQ

**Is this the official database?** The data comes from the official dgsi.pt databases of the Ministry of Justice (IGFEJ). This Actor is not affiliated with or endorsed by IGFEJ or the courts.

**Does it include the Constitutional Court?** Not yet. Its decisions are published on its own website.

**Can I get every decision on a topic, not just the newest?** Yes. Raise *Max decisions per court* (up to 1,000 per court and run) and narrow the dates if needed.

**Something looks wrong?** Open an issue on the Actor's Issues tab with the input you used. Issues are answered within a few days.

### 📚 Source

| Data | Publisher | Terms |
|---|---|---|
| Court decisions | IGFEJ — Bases Jurídico-Documentais (dgsi.pt), Ministério da Justiça | Public decisions, anonymised by the courts. Cite the court, the case number and dgsi.pt. |

### 🔗 More official data from the same developer

- [Public Tenders: Portugal, Spain & EU](https://apify.com/yodeling_november/public-tenders-pt-es-eu): a daily feed of new calls for tender.
- [Public Contract Awards: Portugal & Spain](https://apify.com/yodeling_november/public-contract-awards-pt-es): who wins, at what price and against whom.
- [EU Company Verification (KYB)](https://apify.com/yodeling_november/eu-company-verification): bulk checks in 9 official registries.
- [New Companies & Insolvencies: Spain & France](https://apify.com/yodeling_november/company-events-spain-france): fresh leads and risk alerts from the official gazettes.
- [European Fuel Prices](https://apify.com/yodeling_november/eu-fuel-prices): cheapest stations in 6 countries and averages for 29.
- [European Public Data MCP Server](https://apify.com/yodeling_november/public-data-mcp): official European data as tools for your AI agent.

# Actor input Schema

## `query` (type: `string`):

Words to find anywhere in the decision. As on dgsi.pt: AND, OR, NOT, "exact phrase" and \* (e.g. arrend\*). Leave empty for the latest decisions.

## `courts` (type: `array`):

Supreme courts, the five Relações, the two Central Administrative Courts and the Tribunal dos Conflitos.

## `rapporteur` (type: `string`):

Only decisions written by this judge, e.g. ANA PAULA LOBO.

## `descriptor` (type: `string`):

Only decisions with this descriptor (keyword assigned by the court), e.g. ARRENDAMENTO URBANO.

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

Decision date, YYYY-MM-DD. Without search words, rapporteur or descriptor, the last 30 days are used.

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

Decision date, YYYY-MM-DD.

## `maxResultsPerCourt` (type: `integer`):

Newest decisions first.

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

The full decision as published, when the court published it (the summary is always included).

## `mode` (type: `string`):

New: only decisions not delivered by an earlier run with the same Monitor ID. Schedule it daily or weekly for case-law alerts. Looks at decisions from the last 120 days unless you set 'Decided from'.

## `monitorId` (type: `string`):

Name of the alert in New mode. Use one per search you follow.

## Actor input object example

```json
{
  "query": "\"abuso de direito\"",
  "courts": [
    "STJ",
    "STA",
    "TRL",
    "TRP",
    "TRC",
    "TRG",
    "TRE",
    "TCAS",
    "TCAN",
    "TCONF"
  ],
  "maxResultsPerCourt": 5,
  "includeFullText": true,
  "mode": "all",
  "monitorId": "default"
}
```

# Actor output Schema

## `decisions` (type: `string`):

Court decisions matching the search, newest first within each court.

# 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 = {
    "query": "\"abuso de direito\"",
    "maxResultsPerCourt": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("yodeling_november/portuguese-case-law").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 = {
    "query": "\"abuso de direito\"",
    "maxResultsPerCourt": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("yodeling_november/portuguese-case-law").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 '{
  "query": "\\"abuso de direito\\"",
  "maxResultsPerCourt": 5
}' |
apify call yodeling_november/portuguese-case-law --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yodeling_november/portuguese-case-law"
        }
    }
}
```

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/AzlsKuxHq0k0kjaJD/builds/hI1xZP5jpD4uNRm7R/openapi.json
