# Brazil CNPJ Lawsuits & Judicial Distribution Check (`brasildados/cnpj-lawsuits-check`) Actor

Distribuição de processos judiciais e administrativos de empresas por CNPJ: totais por tipo, tribunal, UF, status e polo. | Judicial & administrative process distribution for Brazilian companies by CNPJ: totals by type, court, state, status and party role.

- **URL**: https://apify.com/brasildados/cnpj-lawsuits-check.md
- **Developed by:** [BrasilDados.org](https://apify.com/brasildados) (community)
- **Categories:** Lead generation, Other, Integrations
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Brazil CNPJ Lawsuits Distribution Check

**Descubra o passivo processual real de qualquer empresa brasileira em segundos.**

Consulte a **distribuição agregada de processos judiciais e administrativos** nos quais a empresa figura como **ré ou reclamada** — os processos que realmente importam para avaliação de risco. Retorna totais por tipo, tribunal, UF, status e assunto CNJ, sem expor registros individuais.

Ideal para **due diligence**, **onboarding de fornecedores**, **análise de risco processual** e **monitoramento contínuo de exposição judicial**.

---

### Por que usar este actor?

- **Visão 360° do passivo processual** — saiba se a empresa é ré em 10 ou em 10.000 processos antes de fechar negócio
- **Cobertura nacional** — processos civis, trabalhistas, criminais e administrativos em todo o Brasil
- **Classificação CNJ** — dados alinhados com a tabela oficial do Conselho Nacional de Justiça
- **Janela de 5 anos** — agregação baseada nos processos capturados nos últimos 5 anos, garantindo relevância para compliance e due diligence
- **Pronto para integração** — resposta JSON estruturada, compatível com qualquer sistema

---

### Casos de uso

| Cenário | Como usar |
| --- | --- |
| Due diligence de M&A | Cheque o passivo trabalhista e cível do alvo antes de assinar |
| Onboarding de fornecedores | Bloqueie automaticamente fornecedores com perfil processual elevado |
| Crédito e financiamento | Inclua exposição judicial na análise de risco do tomador |
| Monitoramento de carteira | Acompanhe periodicamente empresas parceiras ou devedoras |
| Compliance regulatório | Identifique empresas com processos criminais ou administrativos ativos |

---

### O que você recebe por CNPJ

#### Campos principais

| Campo | Tipo | Descrição |
| --- | --- | --- |
| `cnpj` | string | CNPJ sem máscara (14 dígitos) |
| `cnpjFormatado` | string | CNPJ com máscara (XX.XXX.XXX/XXXX-XX) |
| `consultadoEm` | string | Data e hora da consulta (ISO 8601) |
| `encontrado` | boolean | `true` se o CNPJ possui dados processuais na base |
| `erro` | string\|null | Mensagem de erro, se houver |
| `totalProcessos` | integer\|null | Total de processos judiciais e administrativos |

#### Distribuição agregada (`distribuicao`)

| Campo | Descrição |
| --- | --- |
| `porTipo` | Por tipo: Civil, Trabalhista, Criminal, Administrativo, etc. |
| `porEstado` | Por UF: SP, RJ, MG, RS… |
| `porStatus` | Por status: Ativo, Encerrado, Suspenso… |
| `porTipoParticipacao` | Por polo: Réu, Autor, Executado, Embargante… |
| `porNomeTribunal` | Por nome completo do tribunal |
| `porTipoTribunal` | Por tipo: Estadual, Federal, Trabalhista, Eleitoral |
| `porNivelTribunal` | Por grau: 1º grau, 2º grau, TST, STJ… |
| `porTipoProcedimentoCnj` | Por classificação de procedimento (tabela CNJ) |
| `porAssuntoCnj` | Por assunto jurídico específico (tabela CNJ) |
| `porAssuntoCnjAbrangente` | Por categoria abrangente do assunto CNJ |

---

### Exemplo de output

```json
{
  "cnpj": "33000167000101",
  "cnpjFormatado": "33.000.167/0001-01",
  "consultadoEm": "2026-05-25T12:00:00.000Z",
  "encontrado": true,
  "erro": null,
  "totalProcessos": 4821,
  "distribuicao": {
    "porTipo": { "Civil": 2100, "Trabalhista": 1950, "Criminal": 480, "Administrativo": 291 },
    "porEstado": { "SP": 1820, "RJ": 1203, "MG": 654, "RS": 347 },
    "porStatus": { "Ativo": 2900, "Encerrado": 1921 },
    "porTipoParticipacao": { "Réu": 3200, "Autor": 1621 },
    "porTipoTribunal": { "Estadual": 3100, "Trabalhista": 1950, "Federal": 480 },
    "porNivelTribunal": { "1": 3800, "2": 1021 },
    "porAssuntoCnj": { "Rescisão do contrato de trabalho": 980, "Cobrança": 620 },
    "porAssuntoCnjAbrangente": { "Direito do Trabalho": 1950, "Direito Civil": 2100 },
    "porTipoProcedimentoCnj": { "Procedimento Comum": 2800, "Processo de Execução": 900 },
    "porNomeTribunal": { "TJSP": 1200, "TRT2": 850, "TJRJ": 700 }
  }
}
````

***

### Como usar

#### Modo batch (job)

Envie uma lista de CNPJs via interface do Apify ou API. O resultado é gravado no dataset do run.

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

```bash
curl -s -X POST "https://api.apify.com/v2/acts/brasildados~cnpj-lawsuits-check/runs?waitForFinish=300" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  --compressed \
  -d '{"cnpjs":["33.000.167/0001-01","60.746.948/0001-12"]}'
```

#### Modo standby (API REST em tempo real)

Com o actor em standby, envie requisições diretas ao endpoint `/check`:

```bash
curl -s -X POST "$CONTAINER_URL/check" \
  -H "Content-Type: application/json" \
  --compressed \
  -d '{"cnpjs":["33.000.167/0001-01"]}'
```

Aceita CNPJs com ou sem máscara. Máximo 1.000 por requisição.

***

### Caso especial: volume excessivo

Empresas com passivo processual extremamente elevado (grandes bancos, estatais de grande porte) podem ultrapassar o limite de agregação da fonte. Nesses casos, o retorno é:

```json
{
  "encontrado": true,
  "erro": "volume excessivo de processos",
  "totalProcessos": null,
  "distribuicao": null
}
```

***

### Cobertura

Base consolidada a partir de fonte oficial credenciada, com atualização periódica. Cobre processos civis, trabalhistas, criminais e administrativos em todo o território nacional.

A agregação considera processos com data de captura nos **últimos 5 anos**, garantindo relevância para due diligence e conformidade regulatória.

***

### English

**Discover the litigation profile of any Brazilian company in seconds.**

Queries the **aggregated judicial and administrative process distribution** for Brazilian companies by CNPJ. Returns structured counts by process type, court, state, status, party role and CNJ subject classification — without exposing individual case records.

#### What you get per CNPJ

**Top-level fields:** `cnpj`, `cnpjFormatado`, `consultadoEm`, `encontrado`, `erro`, `totalProcessos`

**Inside `distribuicao`:**

| Field | Description |
| --- | --- |
| `porTipo` | By type: Civil, Labor, Criminal, Administrative |
| `porEstado` | By state (UF) |
| `porStatus` | By status: Active, Closed, Suspended |
| `porTipoParticipacao` | By party role: Defendant, Plaintiff, Debtor… |
| `porNomeTribunal` | By court name |
| `porTipoTribunal` | By court type: State, Federal, Labor, Electoral |
| `porNivelTribunal` | By jurisdiction level: 1st degree, 2nd degree… |
| `porTipoProcedimentoCnj` | By CNJ procedure classification |
| `porAssuntoCnj` | By CNJ legal subject |
| `porAssuntoCnjAbrangente` | By broad CNJ subject category |

#### Use cases

Due diligence, M\&A target screening, supplier onboarding, credit risk analysis, regulatory compliance, portfolio monitoring.

#### Coverage

Consolidated from a credentialed official source. Covers civil, labor, criminal and administrative proceedings nationwide. Aggregation window: **last 5 years** of captured processes. Max 1,000 CNPJs per run.

**Special case:** companies with an extremely high process volume (large banks, major state-owned enterprises) return `encontrado: true` with `distribuicao: null` and `erro: "volume excessivo de processos"`.

### Pipeline / Actors relacionados

Use em conjunto com os demais actors da coleção **brasildados** para due diligence completa:

| Actor | Quando usar no pipeline |
|-------|------------------------|
| [CNPJ Enrichment & Lead Search](https://apify.com/brasildados/cnpj-enrichment-lead-search) | Obtenha dados cadastrais, sócios e endereço antes de avaliar o risco judicial |
| [Brazil Sanctions Check](https://apify.com/brasildados/sanctions-check) | Complemente com triagem em CEIS, CNEP e FGTS — risco regulatório além do judicial |
| [CNPJ KYC Compliance – PEP & Sanctions](https://apify.com/brasildados/cnpj-kyc-compliance-pep-checker) | Due diligence aprofundada: PEP, sanções internacionais e doações eleitorais |
| [Government Contracts Check](https://apify.com/brasildados/government-contracts-check) | Avalie exposição a receita pública — risco de concentração de clientes |

**Exemplo de pipeline de onboarding:** enrichment → lawsuits check → sanctions → KYC final.

# Actor input Schema

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

Lista de CNPJs a consultar. Aceita com ou sem máscara (pontos, barras, traços). CNPJs inválidos são descartados automaticamente. Máximo 1.000 por execução. | List of CNPJs to query. Accepts any format (with or without punctuation). Invalid CNPJs are silently discarded. Max 1,000 per run.

## Actor input object example

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

# Actor output Schema

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

Um item por CNPJ com totalProcessos e distribuicao (porTipo, porEstado, porStatus, porTipoParticipacao, porNomeTribunal, etc.). CNPJs de empresas com volume muito elevado retornam encontrado=true e erro='volume excessivo de processos'.

# 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": [
        "33.000.167/0001-01",
        "60.746.948/0001-12"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("brasildados/cnpj-lawsuits-check").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": [
        "33.000.167/0001-01",
        "60.746.948/0001-12",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("brasildados/cnpj-lawsuits-check").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "33.000.167/0001-01",
    "60.746.948/0001-12"
  ]
}' |
apify call brasildados/cnpj-lawsuits-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=brasildados/cnpj-lawsuits-check",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Brazil CNPJ Lawsuits & Judicial Distribution Check",
        "description": "Distribuição de processos judiciais e administrativos de empresas por CNPJ: totais por tipo, tribunal, UF, status e polo. | Judicial & administrative process distribution for Brazilian companies by CNPJ: totals by type, court, state, status and party role.",
        "version": "1.0",
        "x-build-id": "HSDD3d3GEaJgRh89R"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/brasildados~cnpj-lawsuits-check/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-brasildados-cnpj-lawsuits-check",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/brasildados~cnpj-lawsuits-check/runs": {
            "post": {
                "operationId": "runs-sync-brasildados-cnpj-lawsuits-check",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/brasildados~cnpj-lawsuits-check/run-sync": {
            "post": {
                "operationId": "run-sync-brasildados-cnpj-lawsuits-check",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "cnpjs"
                ],
                "properties": {
                    "cnpjs": {
                        "title": "CNPJs",
                        "minItems": 1,
                        "maxItems": 1000,
                        "type": "array",
                        "description": "Lista de CNPJs a consultar. Aceita com ou sem máscara (pontos, barras, traços). CNPJs inválidos são descartados automaticamente. Máximo 1.000 por execução. | List of CNPJs to query. Accepts any format (with or without punctuation). Invalid CNPJs are silently discarded. Max 1,000 per run.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
