Skip to content

Lawsuits

This endpoint looks up lawsuits in which the CPF (the Brazilian individual taxpayer number), the CNPJ (the Brazilian company taxpayer number) or the name queried is a party to the case, and returns the case cover sheet of the lawsuits found, with the docket entries summarized.

For the counts alone, without the cover sheet of the lawsuits, use Lawsuits summary.

🚧 data is passed through from the provider, with no transformation

The API does not reassemble the body of this response: whatever the provider returns inside data is delivered as is, inside the standard envelope. Three practical consequences:

  • The field names are in Portuguese, in the provider's vocabulary (numeroProcessoUnico, orgaoJulgador, movimentos), and not in the English camelCase used by the rest of the API.
  • Every block is optional. A block only shows up when the provider has data for it. Never assume a key exists: test before accessing it.
  • There is no type guarantee. Since there is no conversion along the way, the same field may arrive as a number or as text depending on where the data came from. That is why the tables on this page describe the fields but do not pin down types.

Request

GET /lawsuits/v2

Parameters

ParameterDescriptionRequired
taxIdCPF or CNPJ of one of the parties to the lawsuitOne of the three
partNameName of one of the parties, by substring containedOne of the three
exactPartNameExact name of one of the partiesOne of the three

You must inform at least one of taxId, partName and exactPartName. Calling without any of the three returns 422 with the message One parameter is required: (taxId, partName, exactPartName).

More than one can be sent in the same call without raising an error, but only one is used. The order of precedence is taxId, then partName, then exactPartName: the first one filled in decides the lookup and the others are discarded.

Unknown query parameters are ignored

This route does not validate the list of parameters in the URL. An unknown name, or one typed by mistake, does not raise an error: it is simply ignored.

The taxId parameter — CPF or CNPJ of the party

The lookup by CPF/CNPJ finds every lawsuit in which the document searched for is a party, and returns the case cover sheet of the lawsuits found, with the docket entries summarized (without attachments).

The document can be sent with or without the mask (123.456.789-09 or 12345678909, 11.222.333/0001-81 or 11222333000181): the mask is removed before the lookup. A CPF or CNPJ that fails the check-digit validation returns 422 before any lookup is performed.

The partName parameter — name of the party, by substring contained

The lookup by name finds every lawsuit in which the name searched for appears among the parties.

TIP

The lookup by name brings every lawsuit that contains the name searched for among the parties. Searching for JOAO DA SILVA also returns JOAO DA SILVA SANTOS, JOAO DA SILVA FIGUEIREDO, and so on.

The exactPartName parameter — exact name of the party

The lookup by exact name brings only the lawsuits in which one of the parties has exactly the name informed.

Lookup parameters by attorney

The lookup that also takes the parties' attorneys into account — taxIdFull, name and exactNamedoes not exist yet. These three names are not read by the API: sending them has the same effect as any other unknown parameter, and a call that brings only one of them is refused with 422, for not having any of the three accepted parameters.

ParameterDescriptionStatus
taxIdFullCPF/CNPJ (parties and attorneys)Coming soon
nameName (parties and attorneys)Coming soon
exactNameExact name (parties and attorneys)Coming soon

Filter parameters

‼️ The filters are not being applied

The filter parameters below are accepted by the API, but they do not reach the provider: the call to the provider is assembled with the CPF, the CNPJ or the name of the lookup only, and the filters are discarded along the way.

In practice, today, the response is the same with or without a filter. Filter on your side, over the list returned, until the forwarding of the filters is restored.

FilterDescriptionExamples
gradeLevel or instance of the lawsuit. It is the only filter whose name is not the name of the field in the response: the matching field is grauProcesso.1 (from 1 to 4)
courtsCourt of the lawsuitTJ-SC, TRT-1 (list in Court or tribunal)
partPoleSide of the case the party is onPASSIVO or ATIVO
lawsuitStatusesStatus of the lawsuitEM TRAMITACAO (list in Lawsuit status)
lawsuitFieldsField of lawDIREITO DO TRABALHO (list in Field of law)
topicsSubject matters of the lawsuit. Not listed on this page — see the CNJ unified court tables.ATRASO DE VOO, INDENIZACAO POR DANO MORAL
lawsuitTypesClass of the lawsuit. Not listed on this page — see the CNJ unified court tables.PROCEDIMENTO COMUM, ACAO PENAL
distributionDateStart date of the assignment of the lawsuit to a court, in the YYYY-MM-DD format2023-01-01
distributionDateFinalEnd date of the assignment of the lawsuit. Use it together with distributionDate, to bound a period, in the same format2023-12-31
distributionDateEqualSpecific date of assignment, in the same format2023-08-08
segmentSegment of the judiciaryJUSTICA ESTADUAL, JUSTICA DO TRABALHO, JUSTICA FEDERAL

The values follow the naming used in the tables of this page, without punctuation and without accents.

Headers

http
Authorization: ApiKey <your-api-key>

Example request

GET /lawsuits/v2?exactPartName=JOAO DA SILVA

bash
curl -i -G 'https://api.nxcd.app/lawsuits/v2' \
  --header 'Authorization: ApiKey YOUR_API_KEY' \
  --data-urlencode 'exactPartName=JOAO DA SILVA'

Lookup by CPF:

bash
curl -i -G 'https://api.nxcd.app/lawsuits/v2' \
  --header 'Authorization: ApiKey YOUR_API_KEY' \
  --data-urlencode 'taxId=12345678909'

Response

The envelope is the API standard:

FieldDescriptionType
idUnique identifier of the requestString
versionAPI version that served the callString
dataList of the lawsuits foundObject[]
metadataObject with the metadata of the requestObject
metadata.timeSpentRequest time, in millisecondsNumber

data is a list

Each item of data is a lawsuit. When nothing is found, data comes back empty: [].

Case cover sheet

FieldDescription
data[].urlProcessoURL of the lawsuit at the court queried
data[].numeroProcessoUnicoUnique lawsuit number, CNJ standard
data[].numeroProcessoAntigoLawsuit number prior to the CNJ standard
data[].statusObservacaoStatus of the lawsuit according to the source (the court)
data[].grauProcessoLevel of the lawsuit (1, 2, 3, 4)
data[].juizName of the judge of the lawsuit
data[].relatorName of the reporting judge of the lawsuit
data[].revisoresList of the names of the reviewing judges, when there are any
data[].areaArea of the lawsuit (labor, civil...)
data[].sistemaSystem of the court queried
data[].segmentoSegment of the judiciary (state, federal...)
data[].tribunalOrigemCourt of origin of the lawsuit
data[].tribunalCourt of the lawsuit
data[].ufState of the lawsuit or of the court
data[].orgaoJulgadorJudicial body hearing the lawsuit (court division)
data[].unidadeOrigemUnit of origin of the lawsuit (judicial district)
data[].classeProcessual.nomeName of the lawsuit class, CNJ standard
data[].classeProcessual.codigoCNJCode of the lawsuit class in the CNJ table
data[].assuntosCNJList of the subject matters of the lawsuit
data[].assuntosCNJ[].tituloName or title of the subject matter
data[].assuntosCNJ[].codigoCNJCode of the subject matter in the CNJ table
data[].dataDistribuicaoDate the lawsuit was assigned to a court
data[].dataAutuacaoDate the lawsuit was formally docketed
data[].valorCausa.moedaCurrency of the claim amount
data[].valorCausa.valorClaim amount
data[].eTutelaAntecipadaWhether there is a preliminary injunction in the lawsuit
data[].eJusticaGratuitaWhether free legal aid was granted
data[].ePrioritarioWhether it is a priority lawsuit
data[].eSegredoJusticaWhether it runs under judicial seal
data[].eProcessoDigitalWhether it is a digital lawsuit
data[].dataProcessamentoDate the information was captured

Parties and attorneys

FieldDescription
data[].partesList of parties to the lawsuit
data[].partes[].tipoType of the party
data[].partes[].nomeName of the party
data[].partes[].poloSide of the party in the case (ATIVO or PASSIVO)
data[].partes[].cpfCPF of the party
data[].partes[].cnpjCNPJ of the party
data[].partes[].advogadosList of the attorneys of the party
data[].partes[].advogados[].tipoType of the attorney
data[].partes[].advogados[].nomeName of the attorney
data[].partes[].advogados[].cpfCPF of the attorney
data[].partes[].advogados[].cnpjCNPJ of the attorney's law firm
data[].partes[].advogados[].oab.ufState of the OAB registration (the Brazilian bar association)
data[].partes[].advogados[].oab.numeroOAB registration number
data[].partes[].advogados[].oab.tipoType of the OAB registration
data[].advogadosSemParteList of attorneys with no related party
data[].advogadosSemParte[].tipoType of the attorney
data[].advogadosSemParte[].nomeName of the attorney
data[].advogadosSemParte[].cpfCPF of the attorney
data[].advogadosSemParte[].cnpjCNPJ of the attorney's law firm
data[].advogadosSemParte[].oab.ufState of the OAB registration
data[].advogadosSemParte[].oab.numeroOAB registration number
data[].advogadosSemParte[].oab.tipoType of the OAB registration
FieldDescription
data[].movimentosList of the docket entries of the lawsuit
data[].movimentos[].indiceIndex of the docket entry
data[].movimentos[].dataDate of the docket entry
data[].movimentos[].nomeOriginalTitle of the docket entry
data[].movimentos[].descricaoDescription of the docket entry
data[].movimentos[].movimentadoPor.nomeName of whoever filed the entry in the lawsuit
data[].movimentos[].movimentadoPor.cargoPosition of whoever filed the entry in the lawsuit
data[].processosRelacionadosList of related lawsuits
data[].processosRelacionados[].numeroProcessoNumber of the related lawsuit

The docket entries come summarized

In this lookup, the list brings the summary of each entry, without the documents attached to it.

The statusPredictus block

The statusPredictus block gathers the classifications made by the provider's intelligence from reading the lawsuit in full.

FieldDescription
data[].statusPredictusClassifications made by the provider's intelligence
data[].statusPredictus.statusProcessoStatus of the lawsuit, according to the provider's classification
data[].statusPredictus.ramoDireitoField or area of law of the lawsuit
data[].statusPredictus.dataArquivamentoDate the lawsuit was closed and archived
data[].statusPredictus.dataTransitoJulgadoDate the decision became final and unappealable
data[].statusPredictus.valorExecucao.moedaCurrency of the enforcement amount of the lawsuit
data[].statusPredictus.valorExecucao.valorEnforcement amount of the lawsuit
data[].statusPredictus.julgamentosList of the rulings handed down in the lawsuit
data[].statusPredictus.julgamentos[].dataJulgamentoDate of the ruling
data[].statusPredictus.julgamentos[].tipoJulgamentoType of the ruling
data[].statusPredictus.julgamentos[].statusJulgamentoStatus of the ruling
data[].statusPredictus.julgamentos[].diasAteJulgamentoDays between the assignment and the ruling
data[].statusPredictus.julgamentos[].justicaGratuitaWhether there was free legal aid
data[].statusPredictus.julgamentos[].tutelaAntecipadaWhether there was a preliminary injunction

The statusExecucaoPena block

The statusExecucaoPena block, inside statusPredictus, only shows up when there is a sentence involved in the lawsuit.

FieldDescription
data[].statusPredictus.statusExecucaoPena.regimeAtualPrison regime (closed, open, semi-open)
data[].statusPredictus.statusExecucaoPena.execucaoProvisoriaWhether the sentence is provisional
data[].statusPredictus.statusExecucaoPena.statusBnmpStatus coming from the BNMP, the Brazilian national prison monitoring database
data[].statusPredictus.statusExecucaoPena.percentualPenaCumpridaPercentage of the sentence already served
data[].statusPredictus.statusExecucaoPena.reuPresoWhether the defendant is in custody
data[].statusPredictus.statusExecucaoPena.livramentoCondicionalWhether parole was granted until the sentence is extinguished
data[].statusPredictus.statusExecucaoPena.penaCumpridaTime of the sentence already served
data[].statusPredictus.statusExecucaoPena.penaRestanteTime remaining to serve out the sentence
data[].statusPredictus.statusExecucaoPena.penaTotalTotal sentence to be served
data[].statusPredictus.statusExecucaoPena.penaSubstitutivaWhether there is an alternative sentence, such as a fine
data[].statusPredictus.statusExecucaoPena.medidaSegurancaSecurity measure, when the defendant is found not criminally liable
data[].statusPredictus.statusExecucaoPena.beneficioArt75Whether there is the benefit that caps time served at 30 years
data[].statusPredictus.statusExecucaoPena.situacaoSentenciadoSituation of the sentenced person
data[].statusPredictus.statusExecucaoPena.interrupcaoCumprimentoWhether serving the sentence was interrupted, as in the case of an escape
data[].statusPredictus.statusExecucaoPena.motivoInterrupcaoCumprimentoReason for the interruption of the sentence
data[].statusPredictus.statusExecucaoPena.dataInicioInterrupcaoCumprimentoDate of the interruption of the sentence, if there was one
data[].statusPredictus.statusExecucaoPena.dataInicioCumprimentoDate the imprisonment began
data[].statusPredictus.statusExecucaoPena.foragidoWhether the person is a fugitive
data[].statusPredictus.statusExecucaoPena.extintoWhether the sentence is extinguished

JSON examples

Here is a JSON example of the response.

Status Code: 200
json
{
  "id": "3aa55faf-0c97-40f0-a5a2-4a06ba6db92b",
  "version": "v2",
  "data": [
    {
      "urlProcesso": "https://esaj.tjsp.jus.br/cposg/search.do?conversationId=&paginaConsulta=0&cbPesquisa=NUMPROC&numeroDigitoAnoUnificado=0243906-91.2011&foroNumeroUnificado=0000&dePesquisaNuUnificado=0243905-91.2011.8.26.0000&dePesquisaNuUnificado=UNIFICADO&dePesquisa=&tipoNuProcesso=UNIFICADO&uuidCaptcha=&g-recaptcha-response=",
      "numeroProcessoUnico": "04239059120118260000",
      "statusObservacao": "ENCERRADO",
      "grauProcesso": 2,
      "relator": "DAMIAO DE OLIVEIRA",
      "area": "CRIMINAL",
      "sistema": "ESAJ-TJRJ-2G",
      "segmento": "JUSTICA ESTADUAL",
      "tribunal": "TJ-RJ",
      "uf": "RJ",
      "orgaoJulgador": "2ª CAMARA DE DIREITO CRIMINAL",
      "classeProcessual": {
        "nome": "HABEAS CORPUS CRIMINAL",
        "codigoCNJ": "307"
      },
      "assuntosCNJ": [
        {
          "titulo": "DIREITO PENAL-CRIMES CONTRA A VIDA-HOMICIDIO QUALIFICADO"
        }
      ],
      "dataDistribuicao": "2011-09-23T00:00:00",
      "partes": [
        {
          "tipo": "PACIENTE",
          "cpf": "12345678909",
          "nome": "JOAO DA SILVA"
        },
        {
          "tipo": "IMPETRANTE",
          "polo": "ATIVO",
          "cpf": "98765432100",
          "nome": "LUCIANO SOUSA"
        }
      ],
      "movimentos": [
        {
          "data": "2010-11-19T00:00:00",
          "indice": 50,
          "eMovimento": true,
          "nomeOriginal": ["PROCESSO CADASTRADO"]
        }
      ],
      "processosRelacionados": [
        {
          "numeroProcesso": "677353"
        }
      ],
      "eProcessoDigital": false,
      "dataProcessamento": "2022-07-13T11:36:30.133924",
      "statusPredictus": {
        "statusProcesso": "EM TRAMITACAO",
        "julgamentos": [],
        "dataTransitoJulgado": "2011-11-24T00:00:00",
        "ramoDireito": "DIREITO PENAL"
      },
      "unidadeOrigem": "DIREITO CRIMINAL"
    }
  ],
  "metadata": {
    "timeSpent": 4833
  }
}

WARNING

In this example the docket entries were left out, to make it easier to read. The example also does not bring the sentence enforcement block, since there is no sentence involved in the lawsuit used.

When nothing is found

Status Code: 200
json
{
  "id": "3aa55faf-0c97-40f0-a5a2-4a06ba6db92b",
  "version": "v2",
  "data": [],
  "metadata": {
    "timeSpent": 4833
  }
}

Response headers

HeaderWhen it appears
Nextid-ReqIdOn every response. Carries the request identifier, the same one as the id field of the body.

Errors

CodeWhen it happens
401 UnauthorizedAPI key missing, invalid, or without the nextid.bureaus.lawsuits permission.
404 Not FoundThe version informed in the URL does not exist. Only v2 reaches this lookup.
422 Unprocessable EntityNone of the parameters taxId, partName and exactPartName was informed, or taxId fails the check-digit validation.
500 Internal Server ErrorUnexpected failure during processing, including a failure in the lookup at the provider.

Example of a response without any of the lookup parameters:

Status Code: 422
json
{
  "id": "3aa55faf-0c97-40f0-a5a2-4a06ba6db92b",
  "error": {
    "statusCode": 422,
    "error": "Unprocessable Entity",
    "message": "One parameter is required: (taxId, partName, exactPartName)."
  }
}

Example of a response with an invalid CPF or CNPJ:

Status Code: 422
json
{
  "id": "3aa55faf-0c97-40f0-a5a2-4a06ba6db92b",
  "error": {
    "statusCode": 422,
    "error": "Unprocessable Entity",
    "message": "Invalid taxId (CPF/CNPJ)"
  }
}

The format of the error responses is described in HTTP response codes.

Versions

VersionStatusWhat changes
v2RecommendedThe only version of this lookup.

/lawsuits/v2 is the only supported version of this lookup. Always state the version in the path of the call.

Additional information

Lawsuit status

The status is information generated by an internal intelligence that, from reading the lawsuit in full, including decisions and docket entries, classifies its status. These are the possible returns for the statusProcesso field or for lawsuitStatuses (when used as a lookup filter).

  • EM TRAMITACAO
  • EM GRAU DE RECURSO
  • SUSPENSO
  • ARQUIVAMENTO DEFINITIVO
  • ARQUIVAMENTO PROVISORIO
  • ARQUIVADO ADMINISTRATIVAMENTE
  • ARQUIVAMENTO

Field of law

Besides the status of the lawsuit, the intelligence also classifies the status of the ruling, the field of law the lawsuit belongs to, the enforcement amount and the sentence enforcement status, when there is a sentence involved. These are the possible returns for the ramoDireito field.

  • DIREITO A EDUCACAO
  • DIREITO ADMINISTRATIVO E OUTRAS MATERIAS DE DIREITO PUBLICO
  • DIREITO AMBIENTAL
  • DIREITO ASSISTENCIAL
  • DIREITO CIVIL
  • DIREITO DA CRIANCA E DO ADOLESCENTE
  • DIREITO DA SAUDE
  • DIREITO DO CONSUMIDOR
  • DIREITO DO TRABALHO
  • DIREITO ELEITORAL
  • DIREITO ELEITORAL E PROCESSO ELEITORAL DO STF
  • DIREITO INTERNACIONAL
  • DIREITO MARITIMO
  • DIREITO PENAL
  • DIREITO PENAL MILITAR
  • DIREITO PREVIDENCIARIO
  • DIREITO PROCESSUAL CIVIL E DO TRABALHO
  • DIREITO PROCESSUAL PENAL
  • DIREITO PROCESSUAL PENAL MILITAR
  • DIREITO TRIBUTARIO

Court or tribunal

Higher courts and councils

  • STF
  • STJ
  • STM
  • TSE
  • TST
  • CJF

Federal regional courts

  • TRF-1
  • TRF-2
  • TRF-3
  • TRF-4
  • TRF-5
  • TRF-6

Federal courts

  • JF-AC
  • JF-AL
  • JF-AM
  • JF-AP
  • JF-BA
  • JF-CE
  • JF-DF
  • JF-ES
  • JF-GO
  • JF-MA
  • JF-MG
  • JF-MS
  • JF-MT
  • JF-PA
  • JF-PB
  • JF-PE
  • JF-PI
  • JF-PR
  • JF-RJ
  • JF-RN
  • JF-RO
  • JF-RR
  • JF-RS
  • JF-SC
  • JF-SE
  • JF-SP
  • JF-TO

State courts of justice

  • TJ-AC
  • TJ-AL
  • TJ-AM
  • TJ-AP
  • TJ-BA
  • TJ-CE
  • TJ-DFT
  • TJ-ES
  • TJ-GO
  • TJ-MA
  • TJ-MG
  • TJ-MS
  • TJ-MT
  • TJ-PA
  • TJ-PB
  • TJ-PE
  • TJ-PI
  • TJ-PR
  • TJ-RJ
  • TJ-RN
  • TJ-RO
  • TJ-RR
  • TJ-RS
  • TJ-SC
  • TJ-SE
  • TJ-SP
  • TJ-TO

Regional electoral courts

  • TRE-AC
  • TRE-AL
  • TRE-AM
  • TRE-AP
  • TRE-BA
  • TRE-CE
  • TRE-DF
  • TRE-DFT
  • TRE-ES
  • TRE-GO
  • TRE-MA
  • TRE-MG
  • TRE-MS
  • TRE-MT
  • TRE-PA
  • TRE-PB
  • TRE-PE
  • TRE-PI
  • TRE-PR
  • TRE-RJ
  • TRE-RN
  • TRE-RO
  • TRE-RR
  • TRE-RS
  • TRE-SC
  • TRE-SE
  • TRE-SP
  • TRE-TO

Regional labor courts

  • TRT-1
  • TRT-2
  • TRT-3
  • TRT-4
  • TRT-5
  • TRT-6
  • TRT-7
  • TRT-8
  • TRT-9
  • TRT-10
  • TRT-11
  • TRT-12
  • TRT-13
  • TRT-14
  • TRT-15
  • TRT-16
  • TRT-17
  • TRT-18
  • TRT-19
  • TRT-20
  • TRT-21
  • TRT-22
  • TRT-23
  • TRT-24

Military courts of justice

  • TJM-MG
  • TJM-RS
  • TJM-SP

Nextcode | Identity Verification Solutions