# Brazil Court Decisions & Case Law (STJ, STF Jurisprudência) (`siteacs/brazil-case-law`) Actor

Search Brazilian court decisions (jurisprudência, acórdãos) from the STJ and STF, the superior courts (tribunal superior), by keyword, party, lawyer or company CNPJ. Get ementa, relator, parties, dates, legislation cited and inteiro teor, from the courts' official search services.

- **URL**: https://apify.com/siteacs/brazil-case-law.md
- **Developed by:** [SiteAcs](https://apify.com/siteacs) (community)
- **Categories:** Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 decisions

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

## Brazil Court Decisions & Case Law (STJ, STF Jurisprudência)

**In short.** Input: search words (`keywords`), a party or lawyer (`party`), or a company CNPJ (`cnpj`), plus optional
filters (court, decision type, dates, relator, case class). Output: one dataset row per STJ or STF decision, the same
fields for both courts. Price: **$0.002 per decision** ($2.00 per 1,000), full text included; a search with no results
costs nothing.

Example input:

```json
{ "keywords": "dano moral bagagem", "court": "STJ", "decisionType": "acordao", "maxResults": 25 }
```

Three fields of one output row (the full row is shown under "Output example" below):

```json
{
  "processNumber": "AgInt no AREsp 3229103/SP",
  "relator": "HUMBERTO MARTINS",
  "orgaoJulgador": "Terceira Turma"
}
```

For AI agents (Claude, ChatGPT, Cursor) that need a few decisions per question, use the MCP server
[Brazil Case Law MCP](https://apify.com/siteacs/brazil-case-law-mcp), priced per search. This Actor is for bulk exports
and scheduled runs.

Search the case law (jurisprudência) of Brazil's two highest courts, the **Superior Tribunal de Justiça (STJ)** and
the **Supremo Tribunal Federal (STF)**, by keyword, by party or lawyer, or both. Each decision comes back as one
structured row: acórdãos and decisões monocráticas with ementa, relator, court division, dates, parties and lawyers,
thesis, legislation cited and, if you ask for it, the full text.

The data comes from the courts' own public search services, the ones behind
[scon.stj.jus.br](https://scon.stj.jus.br/SCON/) and [jurisprudencia.stf.jus.br](https://jurisprudencia.stf.jus.br/),
not from an aggregator such as Jusbrasil. A decision appears here when the court publishes it. Only the STJ and the
STF are covered; full text costs nothing extra.

### Em português

Pesquisa de jurisprudência do STJ e do STF por palavra-chave, por parte ou por advogado (pesquisa por parte/advogado)
ou por CNPJ de empresa (pesquisa por CNPJ, com a razão social consultada em base pública):
acórdãos e decisões monocráticas com ementa, relator, órgão julgador, datas, partes e advogados, tese, legislação
citada e, se quiser, o inteiro teor. Os dados vêm das bases oficiais de pesquisa dos tribunais (SCON do STJ e
jurisprudência do STF), sem agregadores. Custa US$ 2,00 por 1.000 decisões, com o inteiro teor incluído. Funciona como
API de jurisprudência do STJ e do STF, com saída em JSON, CSV ou Excel.

### Who it is for

- **Lawyers and law firms**: export recent STJ and STF precedents on a topic to a spreadsheet, or re-run a saved search
  on a schedule.
- **Legal-tech teams**: load precedents into search, RAG or classification pipelines through the API; both courts share
  one schema.
- **Researchers and students**: build datasets of decisions by subject, minister, division or period.
- **Litigation teams**: list the STJ and STF decisions in which a company, public body or law firm took part, e.g. every
  recent acórdão with Banco do Brasil as a party.

### What you get

One dataset row per decision, with the same fields for both courts:

| Field | What it holds |
|---|---|
| `id` | Decision ID, prefixed with the court (e.g. `STJ-ACOR-2981368`, `STF-sjur123456`); use it to remove duplicates across runs |
| `court`, `decisionType` | `STJ` or `STF`; `acordao` or `monocratica` |
| `processNumber`, `caseClass`, `caseClassName`, `state` | e.g. `AgInt no AREsp 3229103/SP`, `AgInt no AREsp`, `AGRAVO INTERNO NO AGRAVO EM RECURSO ESPECIAL`, `SP` (see the note on `caseClass` below) |
| `registrationNumber` | STJ registration number, e.g. `2026/0138387-7` |
| `relator`, `relatorForAcordao` | Reporting minister (and, at STF, the minister who wrote the acórdão when different); STF decisions signed by the presidency carry `PRESIDENTE` |
| `orgaoJulgador` | Court division, e.g. `Terceira Turma`, `Tribunal Pleno` |
| `judgmentDate`, `publicationDate`, `publicationSource` | ISO dates and the gazette reference (DJe/DJEN) |
| `parties` | Parties and their lawyers as the court lists them, one `ROLE: NAME` entry each, e.g. `AGDO.(A/S): BANCO DO BRASIL SA`, `ADV.(A/S): …`. STF: always. STJ acórdãos: only with `includeFullText` (read from the official PDF). STJ monocratic decisions: empty, because SCON does not publish the list |
| `ementa`, `ruling` | The headnote and the decision summary of acórdãos |
| `tese`, `tema` | Legal thesis and repetitive-appeal / general-repercussion theme, when there is one |
| `legislativeReferences` | Statutes and articles cited, one entry per act |
| `citedCases`, `additionalInfo`, `notes` | Precedents cited (at STF, the "Acórdão(s) citado(s)" and "Decisões monocráticas citadas" blocks), the court's indexing notes, and other remarks |
| `textExcerpt` | Opening of the text of monocratic decisions (which have no ementa) |
| `fullText` | Full text of the decision, when `includeFullText` is on |
| `fullTextUrl`, `sourceUrl`, `processUrl` | Official links: full text (PDF), the court's record of the decision, the case page |
| `searchKeywords`, `searchParty`, `scrapedAt` | The keywords and party of the search that found the decision, and when it was collected (UTC) |

`processNumber` is written as each court writes it: STJ puts incidents before the class and adds `/UF` when the state
is known (`AgInt no AREsp 3229103/SP`); STF puts them after the number (`RE 1613807 AgR`). `caseClass` follows each
court's own catalogue: at STJ it is everything before the number, incidents included (`AgInt no AREsp`); at STF it is
the main class only (`RE` for `RE 1613807 AgR`).

### Input examples

Recent STJ acórdãos on lost or damaged luggage:

```json
{
  "keywords": "dano moral bagagem",
  "court": "STJ",
  "decisionType": "acordao",
  "maxResults": 25
}
```

STF and STJ decisions judged in 2025 on a phrase, with full text:

```json
{
  "keywords": "\"plano de saúde\" AND (reembolso OR rol)",
  "court": "both",
  "decisionType": "both",
  "dateType": "judgment",
  "dateFrom": "2025-01-01",
  "dateTo": "2025-12-31",
  "includeFullText": true,
  "maxResults": 100
}
```

STJ acórdãos of one division that cite a precedent (`orgaoJulgador` names differ between the courts, so set `court`):

```json
{
  "keywords": "\"Súmula 7/STJ\" bagagem",
  "court": "STJ",
  "orgaoJulgador": "Terceira Turma",
  "maxResults": 50
}
```

The newest STF and STJ acórdãos with Banco do Brasil among the parties (no keywords needed):

```json
{
  "party": "Banco do Brasil",
  "court": "both",
  "maxResults": 100
}
```

A party and legal terms together, with the parties read from each STJ acórdão's PDF:

```json
{
  "keywords": "royalties",
  "party": "Petrobras",
  "includeFullText": true,
  "maxResults": 20
}
```

Keyword syntax (`keywords`, at most 500 characters): words are combined with AND; use quotes for a phrase, `OR` and
`NOT` between terms, and parentheses to group. The operators can also be typed in lower case or in Portuguese (`ou`, `e`, `não`/`nao`); outside quotes these
words are read as operators at both courts. A query the courts would reject (an unclosed parenthesis or quote, an
operator with no term on one side, an empty group, a lone `-`) is refused before the search, and nothing is charged.
Citations such as `Súmula 7/STJ`, `Lei 8.078/90` or `Tema 1.199` can be typed as they are (for the STJ, a dotted number such as `1.199` is sent as a phrase, which its search needs).

Other filters: `relator` (minister's name, accents ignored), `orgaoJulgador`, `caseClass` (e.g. `REsp`, `AREsp`,
`HC`, `RE`, `ARE`, `ADI`), and a date range on publication or judgment date. `party` takes a company, public body,
person or lawyer as the court writes the name (3 to 200 characters); see "Party and lawyer search" below.
`maxResults` defaults to 50 and goes up to 10,000.

### Output example

```json
{
  "id": "STJ-ACOR-2981368",
  "court": "STJ",
  "decisionType": "acordao",
  "processNumber": "AgInt no AREsp 3229103/SP",
  "caseClass": "AgInt no AREsp",
  "caseClassName": "AGRAVO INTERNO NO AGRAVO EM RECURSO ESPECIAL",
  "registrationNumber": "2026/0138387-7",
  "state": "SP",
  "relator": "HUMBERTO MARTINS",
  "relatorForAcordao": null,
  "orgaoJulgador": "Terceira Turma",
  "judgmentDate": "2026-10-27",
  "publicationDate": "2026-10-29",
  "publicationSource": "DJEN 29/10/2026",
  "parties": null,
  "ementa": "AGRAVO INTERNO NO AGRAVO EM RECURSO ESPECIAL. CIVIL. ALEGAÇÃO GENÉRICA. SÚMULA N. 284/STF. BAGAGEM. AVARIA. DANO MORAL. REVISÃO. SÚMULA N. 7/STJ.\nO recurso especial não comporta conhecimento. [...]\nAgravo interno improvido.",
  "ruling": "Vistos e relatados estes autos [...] por unanimidade, negar provimento ao recurso, nos termos do voto do Sr. Ministro Relator. [...]",
  "tese": null,
  "tema": null,
  "legislativeReferences": [],
  "citedCases": null,
  "additionalInfo": null,
  "notes": null,
  "textExcerpt": null,
  "fullText": null,
  "fullTextUrl": "https://processo.stj.jus.br/SCON/GetInteiroTeorDoAcordao?num_registro=202601383877&dt_publicacao=29/10/2026",
  "sourceUrl": "https://processo.stj.jus.br/SCON/SearchBRS?b=ACOR&livre=2981368+inpath%28CDOC%29&p=false",
  "processUrl": "https://consulta-processo.web.stj.jus.br/resultados?nr=202601383877",
  "searchKeywords": "dano moral bagagem",
  "searchParty": null,
  "scrapedAt": "2026-11-11T19:01:02+00:00"
}
```

### Pricing

You pay **$2.00 per 1,000 decisions** returned ($0.002 each), with no Apify platform usage charges on top.

- Only decisions saved to your dataset are charged. A search that finds nothing costs nothing.
- Full text (`includeFullText`) is included at the same price.
- `maxResults` caps the cost of a run: 50 results cost at most $0.10.
- If your spending limit for the run is reached, the actor stops cleanly and keeps what it already saved.

### Limits and tips

- **Broad STJ searches can time out**, mostly on monocratic decisions. The STJ database cancels very broad queries
  (Oracle error `ORA-01013`). The run then names the base it was searching in its status message and still returns what
  the other sources found. Add specific words, a phrase in quotes, or a date range of a few months.
- **`maxResults` is shared.** With both courts or both decision types, the limit is split fairly between the sources;
  a source with fewer hits leaves its share to the others. Each court's results come newest first, by publication
  date (by judgment date when `dateType` is `judgment`; STJ monocratic decisions have only a publication date).
- **When a court is down** the run still searches the other one and names the failure in its status message. If no
  court can be searched at all, the run ends as failed, so an outage never looks like "no results".
- **Full text.** STF texts come with the search. For STJ acórdãos the actor downloads the official PDF and extracts its
  text, which adds a few seconds per decision. Some old STF acórdãos have no text, only a link.
- **Coverage** is whatever the courts publish in their search services: the acórdãos and monocratic decisions indexed
  in the STJ's SCON, and STF's acórdãos (about 373,000) and monocratic decisions (about 760,000).
- **What `keywords` searches.** STF: the ementa, indexing, thesis and theme, observation notes, legislation and
  precedents cited, case number and, for monocratic decisions, the decision text (the STF site's defaults, without the
  party list and session record). STJ: every field SCON searches by default, which includes its party index. A name
  typed as a keyword is therefore matched in STF's texts and in STJ's texts and party index.
- **What `party` searches.** Only each court's own party list (see below), never the decision text.
- **Pace.** The actor sends at most about one request per second to each court and needs no proxy.

### Party and lawyer search

`party` returns only decisions where the name appears in the court's own list of parties and lawyers:

- **STF**: the "Partes" field of each decision (`partes_lista_texto`: `AGTE.(S)`, `AGDO.(A/S)`, `ADV.(A/S)` and so on).
- **STJ**: SCON's party index (the field its site searches with `[PART]`), which holds parties and their lawyers. SCON
  does not show that list in its results, so `parties` is filled for STJ acórdãos only when `includeFullText` is on.

The name is matched as a phrase, word for word, with accents and case ignored (`previdencia` finds `PREVIDÊNCIA`). A
longer name that contains the phrase also matches: `Banco do Brasil` also finds `CASSI - Caixa de Assistência dos
Funcionários do Banco do Brasil`, so check `parties` when that matters. Spelling variants are not merged: STF lists
`INSTITUTO NACIONAL DO SEGURO SOCIAL` and sometimes `... DE SEGURO SOCIAL - INSS`, so the acronym `INSS` can find more.
For a lawyer, search the name: the courts write OAB registrations in different forms (STJ `SP247319`, STF
`83976/DF`).

Before the search, the name is cleaned so that it matches however the court wrote the company form: a trailing `S.A.`,
`S/A`, `SA`, `S A`, `Ltda`, `ME`, `EPP` or `EIRELI` is dropped, and `-` is read as a space (`Banco do Brasil S/A` searches
`Banco do Brasil`; `Coca-Cola` searches `Coca Cola`, which also finds `COCA-COLA`). A company form in the middle of the
name ends it: `Petróleo Brasileiro S.A. - Petrobras` searches `Petróleo Brasileiro`, since the courts write what follows
in many ways. A bare `SA` or `ME` counts mid-name only when the whole name is in capitals (`José ME Silva` is kept
whole). Quotes, brackets and wildcards are
dropped too, so the name is always searched as one literal phrase.

A party search returns decisions, not counts: the run's log and status message give no number of matches per court for
it (keyword searches without `party` still log them).

### Company search by CNPJ (pesquisa por CNPJ)

`cnpj` takes a company's CNPJ, formatted (`00.000.000/0001-91`) or as 14 digits, and returns decisions about that
company:

1. The number is checked (14 digits, valid check digits) and looked up in a free public CNPJ registry built on the
   Receita Federal's open data: [BrasilAPI](https://brasilapi.com.br) first, then [Minha Receita](https://minhareceita.org)
   if it does not answer. Only the number is sent, directly, with no proxy. Only the registered name (razão social),
   the trade name (nome fantasia), the legal nature and the MEI flag (`opcao_pelo_mei`) are read from the answer.
2. Both courts' party lists are searched for the registered name **with its company form**, in each spelling the
   courts index: `BANCO DO BRASIL SA` is sent as `BANCO DO BRASIL S.A.`, `S/A`, `SA` and `S A`, so the bank is found
   and `CAIXA DE ASSISTENCIA DOS FUNCIONARIOS DO BANCO DO BRASIL` is not. A status after the name (`EM RECUPERACAO
   JUDICIAL`, `EM LIQUIDACAO EXTRAJUDICIAL`) is dropped first. Decisions that print the CNPJ in their text (full text
   included at STF) are found too; the number alone finds only a handful of decisions per company.
3. **Every row with a party list is checked before it is saved**: every STF row, and STJ acórdãos when
   `includeFullText` is on (their party list comes from the PDF). A row is kept only when a party entry, after its
   role label, starts with the company's name followed by the end, a company form, `-`, `E OUTRO(A/S)` or `EM
   RECUPERACAO` (`PETRÓLEO BRASILEIRO S/A - PETROBRAS` passes; `PETROBRAS TRANSPORTE S.A. - TRANSPETRO`, `FUNDAÇÃO
   PETROBRAS ...`, `RIO CLARO ...` and people named Vale do not), or when the court reports the CNPJ match. Rows that
   fail are dropped and **not charged**. **STJ rows without a party list (monocratic decisions, and acórdãos without
   full text) are not verified**: SCON matches the phrase anywhere in its party index, so check `parties` or turn on
   `includeFullText` when precision matters.
4. The trade name is searched too when it names the company: it is cut at `-` (`PETROBRAS - EDISE` searches
   `PETROBRAS`), office words at its end are dropped (`MATRIZ`, `SEDE`, `EST UNIF`, ...), and none is searched when it
   names an office or department (`DIRECAO GERAL`, `DEPARTAMENTO ...`), has digits, or repeats the registered name.
   At the STJ the trade name is sent only where the row can be checked (acórdãos with full text).
5. Each row carries `searchCnpj`, `searchCompanyName` (the razão social) and `matchedBy`: `party` when its party list
   names the company by the rule above, `cnpj-text` when the CNPJ matched in its text, or null when the row cannot
   show it (unverified STJ rows).

Refused before any court request, and not charged:

- **Natural persons**: legal nature 213-5 (empresário individual, which every MEI is), the whole group 4 "pessoas
  físicas" (produtor rural, leiloeiro, contribuinte individual, ...), a record without a 4-digit legal nature, the MEI
  flag, and a registered name with a run of 8 or more digits (MEI names often hold the owner's CPF). Such a name is
  never shown in the log, the message or the output. Shorter numbers in a company's name are fine (`3M DO BRASIL`,
  `B3 S.A.`, `99 TECNOLOGIA`); a trade name with digits is simply not searched.
- A CNPJ with wrong check digits, one the registries do not know, or any CNPJ while the registries do not answer (the
  search is never run without the name).
- `cnpj` together with `party`. It works alone or with keywords.

Like a party search, a CNPJ search returns decisions, not counts. CPF numbers stay refused in every field.

### Perguntas frequentes

**Como faço uma pesquisa de jurisprudência do STJ e do STF e exporto o resultado?**
Digite os termos em `keywords`, escolha o tribunal em `court` (STJ, STF ou ambos) e rode o Actor. Cada acórdão volta
como uma linha com a ementa, o relator, o órgão julgador, as datas e os links oficiais, e o inteiro teor vem junto se
você ligar `includeFullText`. O resultado pode ser baixado em JSON, CSV ou Excel ou lido pela API. Só o STJ e o STF
são pesquisados, e só as decisões que o próprio tribunal publica; para um relator específico, use o campo `relator`, e
para decisões de uma empresa ou de um advogado, os campos `cnpj` e `party`.

### Official published decisions only

This actor returns decisions the courts themselves publish in their official case-law search, with the fields the
courts publish, including the parties and lawyers they list. It searches one name at a time and returns decisions; it
does not build profiles of people or totals per person.

- **No CPF search.** A CPF number in any input field is refused: the run fails with a message and **charges nothing**.
  The check counts digits, not separators: a field with 9 or more digits outside the number forms the actor
  recognises is refused, however they are punctuated or split. Recognised forms, each in its exact printed format: CNJ
  case numbers, CNPJs, STJ registration numbers, `R$` amounts below R$ 100 million, dates, years, OAB numbers, and
  numbers right after a case class or statute word (`REsp 1.810.170/RS`, `Tema 1.199`, `lei 8.112/90`). Numbers side by
  side (only spaces or punctuation between them) count together, so `arts. 165, 458, 535` or two case numbers in a row
  are refused; put a word between them (`arts. 165, 458 e 535`). Write amounts of R$ 100 million or more in millions
  (`R$ 150 milhões`). Court wildcards (`?`, `$`, `*`, `%`, `_`) next to a digit are refused too.
- **CPF numbers are masked** (`***.***.***-**`) in every output field, including full texts, when a court text prints
  one, however it is punctuated (`nº.123.456.789-09`, `123.456.789- 09`, `123456789-09`), with or without the word
  "CPF" before it.
- **Court field syntax is refused.** Typed SCON field suffixes such as `.TXT.`, `.PART.` or `[PART]` (also with spaces
  before them), `inpath(...)` and `@` field references are refused (and not charged); the actor builds its own field
  clauses. Abbreviations such as `Ind.Com.Ltda.` or `Ag.Rg.` are fine.
- **Lawful use is the buyer's responsibility.** Court decisions name private people. Under the LGPD (Lei 13.709/2018),
  you need a lawful purpose for processing them: legal research, litigation and compliance work are typical; screening
  job applicants or tenants, or building profiles of people, are not uses this actor is meant for.

# Changelog

This Actor's version history is a separate document: https://apify.com/siteacs/brazil-case-law/changelog.md

# Actor input Schema

## `keywords` (type: `string`):

Legal terms in Portuguese (jurisprudência), at most 500 characters. Words are combined with AND; use quotes for a phrase ("dano moral"), OR / NOT between terms, and parentheses to group. Example: "dano moral" bagagem (extravio OR avaria). Optional when "party" or "cnpj" is set. STF searches ementa, indexing, thesis, legislation and observation fields and, for monocratic decisions, the decision text; STJ searches the fields SCON searches by default, party index included.

## `party` (type: `string`):

Only decisions where this name is listed as a party or lawyer, e.g. Banco do Brasil, Petrobras, INSS or a lawyer's name (3 to 200 characters). Matched as a phrase against each court's own party list (STF "Partes" field, STJ party index); accents and case are ignored. A longer name containing the phrase also matches. A trailing S.A., S/A, SA, Ltda, ME, EPP or EIRELI is dropped and "-" is read as a space; a company form mid-name ends the name (Petróleo Brasileiro S.A. - Petrobras searches Petróleo Brasileiro). Works alone or with keywords. CPF numbers are refused. Party searches return decisions, not match counts.

## `cnpj` (type: `string`):

Only decisions about this company: its registered name (razão social, and its trade name when it names the company) in the party list, or the CNPJ printed in the decision text. Formatted (00.000.000/0001-91) or 14 digits, with valid check digits. The name is looked up in a free public CNPJ registry (BrasilAPI, falling back to Minha Receita); only the number is sent. Natural persons with a CNPJ (empresário individual, MEI, produtor rural and the other pessoa física legal natures, or any record without a legal nature) are refused, as are unknown CNPJs and searches while the registries are down, all without charge. The registered name is searched with its company form (BANCO DO BRASIL S.A., S/A, SA); rows whose party list names a different company with a similar name are dropped and not charged. STJ rows without a party list (monocratic decisions, acórdãos without full text) are not verified. Not together with "party"; works alone or with keywords. CNPJ searches return decisions, not match counts.

## `court` (type: `string`):

Which court to search: STJ, STF or both (the default). Example: STJ.

## `decisionType` (type: `string`):

Acórdãos are collegiate judgments with an ementa; monocratic decisions are signed by one minister. Broad monocratic searches at the STJ can time out: add a date range or specific terms.

## `dateType` (type: `string`):

Whether the date range below filters by publication date or judgment date. STJ monocratic decisions have a publication date only.

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

Earliest date, format YYYY-MM-DD, e.g. 2025-01-01. Narrows broad searches. Leave empty for no lower limit.

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

Latest date, format YYYY-MM-DD, e.g. 2025-12-31. Leave empty for no upper limit.

## `relator` (type: `string`):

Name of the minister who reported the decision (relator), e.g. Nancy Andrighi or Cármen Lúcia. Accents and case are ignored. Leave empty for any relator.

## `orgaoJulgador` (type: `string`):

E.g. Terceira Turma, Segunda Seção, Corte Especial (STJ) or Primeira Turma, Tribunal Pleno (STF). Set "court" too: division names differ between the courts, and STF monocratic decisions have no division.

## `caseClass` (type: `string`):

Abbreviation of the case class, letters and spaces only, e.g. REsp, AgInt no AREsp, HC (STJ) or RE, ARE, ADI (STF). Leave empty for any class.

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

Maximum number of decisions to save in total, 1 to 10,000, e.g. 50 (default). Each saved decision is charged $0.002. With several courts or decision types the limit is shared between them.

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

true or false (default false). Adds the full text (inteiro teor) of each decision at no extra charge. For STJ acórdãos the actor reads the official PDF, which adds a few seconds per decision.

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

Not needed: the courts' sites answer datacenter IPs. Turn it on only if requests get blocked.

## Actor input object example

```json
{
  "keywords": "dano moral bagagem",
  "court": "both",
  "decisionType": "acordao",
  "dateType": "publication",
  "maxResults": 50,
  "includeFullText": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One item per STJ or STF decision found: court, type, process, relator, division, dates, ementa, source and full-text links, and full text when requested.

## `thesisAndLegislation` (type: `string`):

The same decisions with their thesis/theme and the legislation they cite.

# 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 = {
    "keywords": "dano moral bagagem",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("siteacs/brazil-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 = {
    "keywords": "dano moral bagagem",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("siteacs/brazil-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 '{
  "keywords": "dano moral bagagem",
  "maxResults": 50
}' |
apify call siteacs/brazil-case-law --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,siteacs/brazil-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/le04Netaod0LjO1qP/builds/SE2iEpXHrE0wkRKCf/openapi.json
