Falcao — National Labor-Justice Jurisprudence (CSJT)
FalcaoScraper queries the Jurisprudencia Nacional system of the Brazilian Labor Justice (Justica do Trabalho), hosted by the CSJT at https://jurisprudencia.jt.jus.br. A single search endpoint spans the TST and all 24 TRTs across five document collections.
Method
Description
listar_decisoes
Jurisprudence search — returns a DataFrame
listar_decisoes_download
Downloads the raw JSON pages to disk
listar_decisoes_parse
Parses a folder produced by listar_decisoes_download
Notes: the public (unauthenticated) endpoint only allows page sizes of 5 or 10 (tamanho_pagina) and caps results at 10,000 per query.
Basic search
This example requests two pages. Always select a bounded number of pages for exploratory queries. The backend can respond with HTTP 429 and a long wait. Increasing sleep_time does not cancel an active block.
On 2026-10-03, five successful probes, including three consecutive calls in one session, each reported x-rate-limit-remaining: 49. Later that day, HTTP 429 reported a wait of 27,720 seconds at 19:17:44 UTC, pointing to release at 23:59:44 in Brasilia. This is consistent with the earlier midnight-reset hypothesis, but the quota size and the meaning of the successful-response counter remain unverified. The client does not use that counter to reject larger searches in advance. See issue #350.
If listar_decisoes fails after receiving pages, it preserves their JSON files in their own folder under the system temporary directory; the scraper’s download_path is not used. The exception note gives the folder to pass to listar_decisoes_parse for a partial result. This does not resume the interrupted search. Successful calls remove their temporary files.
The acordaos collection ships the ementa, returned as plain text (HTML stripped).
print(df["ementa"].iloc[0][:300])
DANO MORAL COLETIVO. CARACTERIZAÇÃO. Comprovado o ato ilícito praticado pela reclamada, com violação ao ordenamento jurídico e sonegação de direito trabalhista assegurado aos empregados (descanso semanal remunerado), é inegável a ofensa aos direitos fundamentais dos trabalhadores, sobretudo a dignid
Using filters
Filters are validated by the InputListarDecisoesFalcao pydantic schema. Multi-value filters accept a string or a list of strings.
Each listar_decisoes_download call creates its own subfolder and saves one raw JSON file per page (named {colecao}_{page}.json); listar_decisoes_parse reads a folder back into a DataFrame.
import tempfile, os, jsonwith tempfile.TemporaryDirectory() as tmp: pasta = falcao.listar_decisoes_download("dano moral", paginas=1, diretorio=tmp) arquivos = os.listdir(pasta)print("files:", arquivos) raw = json.load(open(os.path.join(pasta, arquivos[0])))print("quantidadeTotal:", raw["quantidadeTotal"])print("raw keys:", list(raw.keys())) df_parsed = falcao.listar_decisoes_parse(pasta)print("parsed:", df_parsed.shape)