# Processos Judiciais dos Sócios (QSA) - Scraper (`brasildados/processos-judiciais-socios`) Actor

Processos judiciais dos sócios das empresas consolidado por CNPJ: total, papéis e distribuições, como indicador de risco da empresa. | Company-level aggregate of the owners' (QSA) lawsuit distribution by CNPJ. No individual identification.

- **URL**: https://apify.com/brasildados/processos-judiciais-socios.md
- **Developed by:** [BrasilDados.org](https://apify.com/brasildados) (community)
- **Categories:** Other, Automation, Integrations
- **Stats:** 3 total users, 3 monthly users, 77.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $600.00 / 1,000 por cnpj consultados

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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

## Processos Judiciais dos Sócios (QSA) por CNPJ ⚖️

Consulte, por CNPJ, o **panorama consolidado dos processos judiciais do quadro de sócios (QSA)** de uma empresa: total de processos, papéis (autor, réu, outro) e distribuições por tipo, assunto, tribunal, estado e status. É um **indicador de risco da empresa** para due diligence, crédito e KYC.

Processa até **1.000 CNPJs por execução**.

> **Privacidade primeiro.** O retorno é **consolidado por empresa**, derivado de processos públicos. **Não há CPF, nome ou lista por sócio** - ninguém é identificado individualmente. Quando o CNPJ tem um **único sócio**, as distribuições detalhadas são **omitidas** (`detalheSuprimido: true`), mantendo apenas os totais, para não expor uma pessoa identificável.

---

### Para que serve?

- **Due diligence e onboarding:** medir a exposição litigiosa dos donos por trás de um fornecedor/parceiro.
- **Crédito e risco:** complementar a análise com a litigiosidade do quadro societário.
- **Compliance/KYC:** triagem em lote, com base legal de legítimo interesse sobre dado público e agregado.

---

### Input

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

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| `cnpjs` | `string[]` | sim | 1 a 1.000 CNPJs por execução. Qualquer formato. CNPJ com dígito inválido é marcado com erro e não é cobrado. |

***

### Output

Um registro consolidado por CNPJ (achatado nos totais; distribuições como mapas rótulo → contagem):

```json
{
  "cnpj": "47960950000121",
  "cnpjFormatado": "47.960.950/0001-21",
  "encontrado": true,
  "mensagem": "Consulta realizada: 113 processo(s) dos 5 sócio(s), 76 como réu.",
  "totalSocios": 5,
  "totalProcessos": 113,
  "processosComoAutor": 16,
  "processosComoReu": 76,
  "processosComoOutro": 21,
  "mediaProcessosPorSocio": 21,
  "maxProcessosPorSocio": 33,
  "minProcessosPorSocio": 3,
  "detalheSuprimido": false,
  "distribuicaoPorTipo": { "EXECUCAO FISCAL": 38, "PROCEDIMENTO COMUM CIVEL": 8, "RITO ORDINARIO": 6 },
  "distribuicaoPorStatus": { "ARQUIVADO": 62, "REDISTRIBUIDO": 11, "ATIVO": 2 },
  "distribuicaoPorEstado": { "SP": 65, "PB": 9, "SC": 6 },
  "distribuicaoPorTribunal": { "TJSP": 65, "TJPB": 9 },
  "distribuicaoPorTipoVara": { "ESTADUAL": 100, "FEDERAL": 13 },
  "distribuicaoPorInstancia": { "PRIMEIRO GRAU": 90, "SEGUNDO GRAU": 23 },
  "distribuicaoPorTipoParte": { "CLAIMED": 69, "CLAIMANT": 14, "OTHER": 22 },
  "distribuicaoPorTipoProcedimentoCnj": { "EXECUCAO FISCAL": 38, "PROCEDIMENTO COMUM CIVEL": 8 },
  "distribuicaoPorAssuntoCnj": { "DIREITO TRIBUTARIO": 40, "RESPONSABILIDADE DO FORNECEDOR": 6 },
  "distribuicaoPorAssuntoAmploCnj": { "DIREITO TRIBUTARIO": 40, "DIREITO DO CONSUMIDOR": 12 }
}
```

| Campo | Descrição |
| --- | --- |
| `encontrado` | `true` = há dados; `false` = consultado sem dados; `null` = erro/CNPJ inválido. |
| `mensagem` | Texto legível confirmando a consulta e o resultado. |
| `totalSocios` / `totalProcessos` | Quantidade de sócios (QSA) e total de processos agregado. |
| `processosComoAutor/Reu/Outro` | Distribuição por polo. |
| `detalheSuprimido` | `true` quando o CNPJ tem 1 sócio e as distribuições foram omitidas por privacidade. |
| `mediaProcessosPorSocio` / `maxProcessosPorSocio` / `minProcessosPorSocio` | Estatísticas por sócio. |

#### Distribuições (mapas rótulo → contagem)

A parte mais rica do retorno: como os processos dos sócios se distribuem por várias dimensões. Cada campo é um objeto `{ rótulo: contagem }`. Todos vêm `null` quando `detalheSuprimido: true`.

| Campo | O que distribui |
| --- | --- |
| `distribuicaoPorTipo` | Tipo do processo (ex.: `EXECUCAO FISCAL`, `PROCEDIMENTO COMUM CIVEL`). |
| `distribuicaoPorStatus` | Situação (ex.: `ARQUIVADO`, `ATIVO`, `SUSPENSO`, `TRANSITADO EM JULGADO`). |
| `distribuicaoPorEstado` | UF do processo (ex.: `SP`, `RJ`, `MG`). |
| `distribuicaoPorTribunal` | Tribunal (ex.: `TJSP`, `TJPB`, `TRT2`). |
| `distribuicaoPorTipoVara` | Tipo de vara/justiça (ex.: `ESTADUAL`, `FEDERAL`, `TRABALHISTA`). |
| `distribuicaoPorInstancia` | Grau/instância (ex.: `PRIMEIRO GRAU`, `SEGUNDO GRAU`). |
| `distribuicaoPorTipoParte` | Papel da parte (ex.: `CLAIMANT`, `CLAIMED`, `DEFENDANT`, `OTHER`). |
| `distribuicaoPorTipoProcedimentoCnj` | Tipo de procedimento pela tabela CNJ. |
| `distribuicaoPorAssuntoCnj` | Assunto pela tabela CNJ (ex.: `DIREITO TRIBUTARIO`, `RESPONSABILIDADE DO FORNECEDOR`). |
| `distribuicaoPorAssuntoAmploCnj` | Assunto amplo (categoria-mãe) pela tabela CNJ. |

***

### 🔌 Integração via API

**Execução em lote (resultado na resposta):**

```bash
curl -X POST "https://api.apify.com/v2/acts/brasildados~processos-judiciais-socios/run-sync-get-dataset-items?token=SEU_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"cnpjs":["47.960.950/0001-21","33.000.167/0001-01"]}'
```

**Standby (`POST /check`):**

```bash
curl -X POST "https://brasildados--processos-judiciais-socios.apify.actor/check" \
  -H "Authorization: Bearer SEU_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  --compressed \
  -d '{"cnpjs":["47.960.950/0001-21","33.000.167/0001-01"]}'
```

> Passe o token Apify no header `Authorization: Bearer`. Nunca coloque o token na URL.

***

### Perguntas frequentes

**Identifica os sócios individualmente?**
Não. O retorno é **consolidado por empresa**, sem CPF, nome ou lista por pessoa. É um indicador de risco da empresa.

**E empresas de sócio único?**
As distribuições detalhadas são omitidas (`detalheSuprimido: true`) para não expor uma pessoa identificável; os totais continuam disponíveis.

**De onde vêm os dados?**
De processos judiciais públicos, consolidados em indicadores agregados. Base legal de legítimo interesse (LGPD) para finalidades de risco, crédito e compliance.

***

### Outros Actors da brasildados

- **CNPJ Lawsuits Check:** distribuição processual da própria empresa por CNPJ.
- **CNPJ Due Diligence Report:** dossiê completo por email.
- **Lista de Devedores PGFN:** dívida ativa da União por CNPJ.
- **CNPJ KYC / Sanções e PEP:** compliance por CNPJ.

Explore todos em [apify.com/brasildados](https://apify.com/brasildados?fpr=t5lwzq).

***

### 🇺🇸 English version

Query, by CNPJ (Tax ID), the **company-level aggregate of the owners' (QSA) lawsuit distribution**: total lawsuits, roles (claimant/defendant) and distributions by type, subject, court, state and status. A **company risk indicator** for due diligence, credit and KYC. The output is aggregated and contains **no CPF, name or per-person breakdown**. For single-owner companies the detailed distributions are suppressed (`detalheSuprimido: true`).

**Batch run (results in the response):**

```bash
curl -X POST "https://api.apify.com/v2/acts/brasildados~processos-judiciais-socios/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"cnpjs":["47.960.950/0001-21","33.000.167/0001-01"]}'
```

**Standby (`POST /check`):**

```bash
curl -X POST "https://brasildados--processos-judiciais-socios.apify.actor/check" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  --compressed \
  -d '{"cnpjs":["47.960.950/0001-21","33.000.167/0001-01"]}'
```

# Actor input Schema

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

Lista de CNPJs a consultar. Retorna o panorama CONSOLIDADO POR EMPRESA dos processos judiciais do quadro de sócios (QSA), sem identificar nenhuma pessoa. Aceita qualquer formato. Máximo 1.000 por execução. | List of CNPJs to query. Returns the COMPANY-LEVEL aggregate of the owners' (QSA) lawsuit distribution, with no individual identification. Any format accepted. Max 1,000 per run.

## Actor input object example

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

# Actor output Schema

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

CNPJs consultados (um registro consolidado por CNPJ).

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

// Run the Actor and wait for it to finish
const run = await client.actor("brasildados/processos-judiciais-socios").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": [
        "47.960.950/0001-21",
        "33.000.167/0001-01",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("brasildados/processos-judiciais-socios").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": [
    "47.960.950/0001-21",
    "33.000.167/0001-01"
  ]
}' |
apify call brasildados/processos-judiciais-socios --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Processos Judiciais dos Sócios (QSA) - Scraper",
        "description": "Processos judiciais dos sócios das empresas consolidado por CNPJ: total, papéis e distribuições, como indicador de risco da empresa. | Company-level aggregate of the owners' (QSA) lawsuit distribution by CNPJ. No individual identification.",
        "version": "1.0",
        "x-build-id": "NvypbpiPZlypkkwnp"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/brasildados~processos-judiciais-socios/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-brasildados-processos-judiciais-socios",
                "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~processos-judiciais-socios/runs": {
            "post": {
                "operationId": "runs-sync-brasildados-processos-judiciais-socios",
                "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~processos-judiciais-socios/run-sync": {
            "post": {
                "operationId": "run-sync-brasildados-processos-judiciais-socios",
                "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. Retorna o panorama CONSOLIDADO POR EMPRESA dos processos judiciais do quadro de sócios (QSA), sem identificar nenhuma pessoa. Aceita qualquer formato. Máximo 1.000 por execução. | List of CNPJs to query. Returns the COMPANY-LEVEL aggregate of the owners' (QSA) lawsuit distribution, with no individual identification. Any format accepted. 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
