The search portal sits behind an AWS WAF that blocks an IP after about 7 searches in a row and lets it through again after 10 minutes or more. Each page is one search, so this notebook asks for a single page per call and reuses each result in several cells. When the WAF blocks before any page, the call raises BotChallengeBlockedError; when it blocks in the middle of a pagination, it raises ColetaParcialError, with the pages already downloaded in .resultado.
Basic search (2nd instance)
import juscraper as justjto = jus.scraper('tjto')dados_cjsg = tjto.cjsg('dano moral', paginas=1)print(dados_cjsg.shape)dados_cjsg.head(3)
Processo: 0017731-25.2026.8.27.2700
Classe: Conflito de competência cível
Relator: ANGELA MARIA RIBEIRO PRUDENTE
Competencia: TRIBUNAL PLENO
Data Julgamento: 2026-10-15
Filters and document types
You can filter by judgment date range and choose the document type: acordaos (default), decisoes (monocratic decisions) or sentencas (sentences). The sort order is set with ordenacao: "DESC" (most recent first, the default), "ASC" or "RELEV".
First instance search (cjpg), downloading and parsing separately
Use cjpg() to search first-instance jurisprudence; it accepts the same parameters as cjsg(). Both are a download followed by a parse, and the two steps are also available on their own: cjpg_download() returns the raw HTML pages and cjpg_parse() turns them into the same DataFrame (cjsg_download() and cjsg_parse() do the same for the 2nd instance).