TJRN - Tribunal de Justica do Rio Grande do Norte

Jurisprudence scraper for TJRN, via Elasticsearch API.

Feature Available
cjsg Yes
import juscraper as jus

tjrn = jus.scraper('tjrn')

Available columns

brutos = tjrn.cjsg_download('dano moral', paginas=1)
df_parsed = tjrn.cjsg_parse(brutos)

print(df_parsed.shape)
df_parsed.head(3)
Baixando páginas TJRN: 100%|██████████| 1/1 [00:00<00:00, 25115.59it/s]
(10, 11)
processo classe orgao_julgador colegiado relator tipo_decisao data_julgamento data_publicacao ementa sistema sigiloso
0 0801608-23.2025.8.20.5100 APELAÇÃO CÍVEL Gab. Desª. Sandra Elali na Câmara Cível - Juiz... Segunda Câmara Cível ROBERTO FRANCISCO GUEDES LIMA Acórdão 2026-11-26 2026-11-26 APELAÇÃO CÍVEL Nº 0801608-23.2025.8.20.5100\nA... PJE False
1 0804535-75.2024.8.20.5106 APELAÇÃO CÍVEL Gab. Desª. Sandra Elali na Câmara Cível - Juiz... Segunda Câmara Cível ROBERTO FRANCISCO GUEDES LIMA Acórdão 2026-11-26 2026-11-26 APELAÇÃO CÍVEL Nº 0804535-75.2024.8.20.5106\nA... PJE False
2 0800222-07.2022.8.20.5150 APELAÇÃO CÍVEL Gab. Desª. Sandra Elali na Câmara Cível - Juiz... Segunda Câmara Cível ROBERTO FRANCISCO GUEDES LIMA Acórdão 2026-11-26 2026-11-26 APELAÇÃO CÍVEL Nº 0800222-07.2022.8.20.5150\nA... PJE False

Preview ementa

print(df['ementa'].iloc[0][:300])
APELAÇÃO CÍVEL Nº 0801608-23.2025.8.20.5100
APELANTE: LUZIA MARIA DA COSTA SILVA
ADVOGADOS: JONH LENNO DA SILVA ANDRADE E RAYSSA VITORIA GONÇALVES DA SILVA
APELADAS: ASPECIR PREVIDÊNCIA E UNIÃO SEGURADORA S.A. - VIDA E PREVIDÊNCIA
ADVOGADOS: MARCELO NORONHA PEIXOTO E JULIANO DELESPORTE DOS SANTOS TU

Using filters

Available filters: numero_processo, id_classe, id_orgao_julgador, id_relator, id_colegiado, data_julgamento_inicio/data_julgamento_fim, sistema, decisoes, jurisdicoes, grau, buscar_em.

sistema, decisoes, jurisdicoes and grau only take the values of the portal form, or ""/None for all; any other value raises ValidationError before the request:

  • sistema: "PJE" or "SAJ" (case-sensitive).
  • decisoes: "Decisão" (single-judge, first and second instance), "Acórdão" (collegiate, second instance only) or "Sentença" (first instance only). The portal returns nothing for a type outside its instance, so "Sentença" with grau="2", jurisdicoes="TJ" or "TR", and "Acórdão" with grau="1", raise ValidationError.
  • jurisdicoes: "TJ" (Tribunal de Justiça) or "TR" (Turmas Recursais); both only cover second-instance decisions, so combining either with grau="1" or decisoes="Sentença" raises ValidationError (the portal returns nothing for it).
  • grau: "1" or "2", as strings.

By default pesquisa searches the ementa, and only acórdãos have one. With a term in the ementa, decisoes="Sentença", grau="1", and decisoes="Decisão" with jurisdicoes="TJ", "TR" or sistema="PJE" raise ValidationError, because the portal returns nothing for them: search the term with buscar_em="inteiro_teor" (see below), or leave pesquisa empty and filter by judgment date. decisoes="Decisão" without those filters is still accepted, but only a handful of old SAJ single-judge decisions (from 2008) have an ementa. The portal ignores prepositions and the conjunctions “e” and “ou” in lowercase, so a term made only of them ("a", "de") counts as an empty search.

df_filtered = tjrn.cjsg(
    'direito',
    data_julgamento_inicio='2024-01-01',
    data_julgamento_fim='2024-06-30',
    paginas=1,
)

print(df_filtered.shape)
df_filtered.head(3)
Baixando páginas TJRN: 100%|██████████| 1/1 [00:00<00:00, 15887.52it/s]
(10, 11)
processo classe orgao_julgador colegiado relator tipo_decisao data_julgamento data_publicacao ementa sistema sigiloso
0 0800929-73.2023.8.20.5106 APELAÇÃO CÍVEL Gab. Des. Claudio Santos na Câmara Cível Primeira Câmara Cível CLAUDIO MANOEL DE AMORIM SANTOS Acórdão 2024-06-28 2024-07-01 EMENTA: DIREITO CIVIL E CONSUMIDOR. APELAÇÃO C... PJE False
1 0805644-19.2024.8.20.0000 CONFLITO DE COMPETÊNCIA CÍVEL Gab. Des. Lourdes de Azevedo no Pleno Tribunal Pleno MARIA DE LOURDES MEDEIROS DE AZEVEDO Acórdão 2024-06-28 2024-07-02 EMENTA: PROCESSUAL CIVIL. CONFLITO DE COMPETÊN... PJE False
2 0824603-17.2022.8.20.5106 APELAÇÃO CÍVEL Gab. Des. Claudio Santos na Câmara Cível Primeira Câmara Cível CLAUDIO MANOEL DE AMORIM SANTOS Acórdão 2024-06-28 2024-07-01 EMENTA: DIREITO CIVIL E CONSUMIDOR. APELAÇÃO C... PJE False

Searching the full text

buscar_em picks where to look for pesquisa: "ementa" (default) or "inteiro_teor", the full text of the decision (the portal’s “Inteiro teor” field), which acórdãos, single-judge decisions and sentenças all have.

df_sentencas = tjrn.cjsg('dano moral', buscar_em='inteiro_teor', decisoes='Sentença', paginas=1)

print(df_sentencas.shape)
df_sentencas[['processo', 'classe', 'orgao_julgador', 'data_julgamento']].head(3)
Baixando páginas TJRN: 100%|██████████| 1/1 [00:00<00:00, 2681.78it/s]
(10, 11)
processo classe orgao_julgador data_julgamento
0 0802953-73.2020.8.20.5108 PROCEDIMENTO COMUM CÍVEL 3ª Vara da Comarca de Pau dos Ferros 2026-11-26
1 0866948-80.2026.8.20.5001 PROCEDIMENTO DO JUIZADO ESPECIAL DA FAZENDA PÚ... 5º Juizado da Fazenda Pública da Comarca de Natal 2026-11-26
2 0812239-86.2026.8.20.5004 PROCEDIMENTO DO JUIZADO ESPECIAL CÍVEL 8º Juizado Especial Cível da Comarca de Natal 2026-11-26