# Brazil CNPJ Legal Processes Detail - Individual Lawsuits (`brasildados/cnpj-lawsuits-detail`) Actor

Individual lawsuit records by CNPJ: case number, court, status, value, parties. 5y defendant. 50/page, pagination. $0.35/page. | Processos individuais por CNPJ: número, tribunal, situação, valor, partes. 5 anos réu. 50/página, paginação. US$ 0,35/página.

- **URL**: https://apify.com/brasildados/cnpj-lawsuits-detail.md
- **Developed by:** [BrasilDados.org - Hub de APIs de Dados do Brasil](https://apify.com/brasildados) (community)
- **Categories:** Real estate, Other, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$350.00 / 1,000 per lawsuits detail pages

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### ⚖️ CNPJ Legal Processes Detail — Individual Lawsuits

Scraper and API for the **individual lawsuit records** of Brazilian companies by **CNPJ (Tax ID)**: case number, court, status, value and parties, over the **last 5 years** as defendant/respondent. Paginated, 25 lawsuits per page. Built for due diligence, supplier onboarding and compliance.

> Only need the aggregated totals (by type, court, status, state)? Use [CNPJ Legal Processes Distribution](https://apify.com/brasildados/cnpj-lawsuits-check?fpr=t5lwzq) instead — it's cheaper for that use case and doesn't require pagination.

### Output example (one record per CNPJ / page)

```json
[
  {
    "cnpj": "02342260000170",
    "cnpjFormatado": "02.342.260/0001-70",
    "consultadoEm": "2026-08-25T20:33:29.132Z",
    "encontrado": true,
    "erro": null,
    "processos": [
      {
        "numero": "50222990720214036182",
        "tipo": "EXECUCAO FISCAL",
        "assuntoPrincipal": "DIREITO TRIBUTARIO - IRPJ/IMPOSTO DE RENDA DE PESSOA JURIDICA",
        "tribunal": "JFSP",
        "instancia": "1",
        "tipoTribunal": "TRIBUTARIA",
        "uf": "SP",
        "status": "EXTINTO",
        "valor": null,
        "dataDistribuicao": "2021-09-22",
        "ultimaMovimentacao": "2026-08-10",
        "partes": [
          { "tipoPessoa": "empresa", "nome": "UNIAO FEDERAL FAZENDA NACIONAL", "documento": "03.566.231/0001-55", "tipo": "CLAIMANT", "polaridade": "ACTIVE" },
          { "tipoPessoa": "empresa", "nome": "EMPRESA EXEMPLO LTDA", "documento": "02.342.260/0001-70", "tipo": "CLAIMED", "polaridade": "PASSIVE" }
        ]
      }
    ],
    "paginacao": {
      "paginaAtual": 1,
      "totalPaginas": 2,
      "totalProcessos": 73,
      "temMaisPaginas": true,
      "cursorProximaPagina": "eyJwYWdpbmEiOjIsInRva2VuIjoiLi4uIn0"
    }
  }
]
```

> `partes` masks personal data: companies (CNPJ) keep name and document (public data); individuals have the name omitted and CPF masked.

### How pagination works

The source only supports **sequential** pagination — there's no "jump to page 5" without going through pages 1–4 first. Each page returns `paginacao.cursorProximaPagina`: paste that **exact value** into the `cursor` input field to fetch the next page. It is an opaque token, not a page number you type in.

```json
{ "cnpjs": ["02.342.260/0001-70"], "cursor": "eyJwYWdpbmEiOjIsInRva2VuIjoiLi4uIn0" }
```

`cursor` requires exactly **1 CNPJ** (a cursor belongs to one company's pagination chain). Without `cursor`, you can query up to **100 CNPJs** at once — each returns its first page.

### Try it: input and API

```json
{ "cnpjs": ["33.000.167/0001-01"] }
```

```bash
curl -X POST "https://api.apify.com/v2/acts/brasildados~cnpj-lawsuits-detail/run-sync-get-dataset-items?format=json" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"cnpjs":["33.000.167/0001-01"]}'
```

In the Console, the **Output** tab opens on an overview. Switch to **Todos os campos** for the full record. Downloads and the API always return every field.

### What this Actor returns

| | |
|---|---|
| 🔑 **Identification** | `cnpj`, `cnpjFormatado`, `consultadoEm`, `encontrado`, `erro` |
| 📄 **Case records** | `processos[]`: number, court, status, value, parties (PII masked), up to 25 per page |
| 🔁 **Pagination** | `paginacao`: `paginaAtual`, `totalPaginas`, `totalProcessos`, `temMaisPaginas`, `cursorProximaPagina` |

### Why check Brazilian company lawsuits by CNPJ (Tax ID)?

- **M\&A due diligence:** review individual cases before signing
- **Supplier onboarding:** inspect the actual lawsuits behind an elevated litigation profile
- **Credit and lending:** case-level detail for underwriting decisions
- **Compliance:** flag companies with active criminal or administrative cases

Consolidated from credentialed official sources. Window: **last 5 years** of captured processes as **defendant/respondent**.

### Pricing

**$0.35 per page delivered** (up to 25 lawsuits). A CNPJ the source cannot answer is logged, produces no row and is not charged.

### Related Actors

| Actor | When to use |
|---|---|
| [CNPJ Legal Processes Distribution](https://apify.com/brasildados/cnpj-lawsuits-check?fpr=t5lwzq) | Aggregated totals by type, court, status, state — cheaper, no pagination |
| [CNPJ Enrichment](https://apify.com/brasildados/brazil-enrich-data-lead-by-cnpj?fpr=t5lwzq) | Company profile and QSA before judicial risk review |
| [Sanctions Check](https://apify.com/brasildados/sanctions-check?fpr=t5lwzq) | CEIS/CNEP/FGTS regulatory screening |
| [CNPJ KYC & PEP Checker](https://apify.com/brasildados/cnpj-kyc-compliance-pep-checker?fpr=t5lwzq) | PEP, international sanctions and electoral donations |

**Suggested pipeline:** Distribution (screen) → **Detail (this, if flagged)** → Sanctions → KYC

### FAQ

#### Can I jump straight to page 5?

No — the source only chains pages sequentially. Start without `cursor` (page 1), then feed each response's `cursorProximaPagina` back in to advance one page at a time.

#### Which party role is included?

Lawsuits where the company appears as **defendant/respondent**, over the **last 5 years**.

#### What if `processos` is empty but `erro` is null?

The CNPJ was queried successfully and has no lawsuits matching the filter in this window.

#### Is it legal to use this data?

Use only with legitimate business purpose and applicable compliance requirements (LGPD/GDPR where personal data appears).

***

### 🇧🇷 Resumo em português

**Processos Judiciais Individuais por CNPJ** é um scraper e API que retorna os processos individuais de empresas brasileiras (número, tribunal, situação, valor, partes) nos **últimos 5 anos** como réu/reclamado, com paginação sequencial (25 processos por página — não dá pra pular pra uma página arbitrária, só avançar uma de cada vez usando o cursor devolvido). Até 100 CNPJs na primeira página; exatamente 1 ao usar `cursor`. CNPJ que a fonte não consegue responder fica registrado no log e não entra no resultado. Cobrança de **US$ 0,35 por página entregue**. Só precisa dos totais agregados? Use o [CNPJ Legal Processes Distribution](https://apify.com/brasildados/cnpj-lawsuits-check?fpr=t5lwzq), mais barato pra esse caso.

# Actor input Schema

## `cnpjs` (type: `array`):

CNPJs to query, with or without punctuation. Up to 100 when starting a new query (no cursor); exactly 1 when using `cursor` to fetch the next page.

CNPJs a consultar, com ou sem pontuação. Até 100 para começar uma consulta nova (sem cursor); exatamente 1 ao usar `cursor` para buscar a próxima página.

## `cursor` (type: `string`):

Leave empty for the first page. To fetch the next page, paste the exact value from `paginacao.cursorProximaPagina` in the previous response — it is not a page number you type in. Requires exactly 1 CNPJ.

Deixe vazio para a primeira página. Para buscar a próxima, cole o valor exato de `paginacao.cursorProximaPagina` da resposta anterior — não é um número de página para digitar. Exige exatamente 1 CNPJ.

## Actor input object example

```json
{
  "cnpjs": [
    "02.342.260/0001-70"
  ]
}
```

# Actor output Schema

## `resultados` (type: `string`):

Um item por CNPJ/página consultada, com os processos individuais e o cursor para a próxima página em paginacao.cursorProximaPagina.

# 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 = {
    "cnpjs": [
        "02.342.260/0001-70"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("brasildados/cnpj-lawsuits-detail").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 = { "cnpjs": ["02.342.260/0001-70"] }

# Run the Actor and wait for it to finish
run = client.actor("brasildados/cnpj-lawsuits-detail").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 '{
  "cnpjs": [
    "02.342.260/0001-70"
  ]
}' |
apify call brasildados/cnpj-lawsuits-detail --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brasildados/cnpj-lawsuits-detail"
        }
    }
}

```

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/q77R6p1Znt1m5RQ6p/builds/dZRQX7Mh2aKe99hpK/openapi.json
