Lawsuits Stats

Returns the full lawsuit profile of a Brazilian company (CNPJ), including
counts, claim values, and monthly time-series for each legal category.

This is the most complete legal statistics endpoint for credit and risk
assessment available in Brazil.


MainStats — Legal Category Breakdown

The MainStats object is the core of the response. It categorizes every
lawsuit the company is involved in across 10 buckets:

KeyDescription
totalAll lawsuits, regardless of role or type
reu_totalAll lawsuits where the company is the defendant
reu_trabalhistaLabor court cases (company as defendant) — typically the highest-volume risk category for Brazilian companies
reu_civelCivil court cases where the company is the defendant
reu_execucao_fiscalTax enforcement proceedings — government collecting tax debt. Kept separate from civil cases due to their fundamentally different risk nature
reu_outrosOther defendant cases not covered by the above categories
autor_totalAll lawsuits where the company is the plaintiff or claimant
autor_civelCivil cases where the company is the plaintiff
autor_criminalCriminal cases where the company appears as victim
autor_outrosOther plaintiff cases

Each bucket contains:

  • count_new — total lawsuits filed (all time)
  • count_active — lawsuits currently active
  • value_new — total claim value in BRL (all time)
  • value_active — claim value of active lawsuits only in BRL
  • monthly_distribution — the above four metrics broken down by YYYY-MM, based on each lawsuit's notice date

Filtering by Time Range (last_years)

The last_years parameter filters all monthly_distribution fields to include
only the most recent N years of data. This significantly reduces response size
while keeping total counts and values intact.

For example, with last_years: 2 in 2026, only monthly data from 2025 and 2026
is returned. The global totals (TotalLawsuits, TotalValue, etc.) still
reflect the complete historical data.

This filter applies to:

  • MonthlyDistribution (global timeline)
  • MainStats (all 10 category buckets)
  • All other distributions (Type, CourtName, Status, State, PartyType)

Typical usage: last_years: 2 for dashboards (recent data only),
last_years: 5 for trend analysis (medium-term view).


Additional Distributions (full response)

The full response includes MainStats plus monthly time-series for
several other dimensions. These additional distributions are omitted when only_main_stats: true is set:

  • TypeDistribution — breakdown by lawsuit type string, e.g. "RECLAMAÇÃO TRABALHISTA", "EXECUÇÃO FISCAL", "AÇÃO DE COBRANÇA", "MONITÓRIA"
  • CourtNameDistribution — breakdown by court name, e.g. "1ª VARA DO TRABALHO DE PORTO ALEGRE", "VARA DE EXECUÇÕES FISCAIS"
  • StatusDistribution — breakdown by lawsuit status, e.g. "ATIVO", "ARQUIVADO", "BAIXADO"
  • StateDistribution — breakdown by Brazilian state (UF), e.g. "RS", "SP", "RJ"

Each of these distributions follows the same StatBucket structure as
MainStats, including monthly_distribution.


Response Size

The full response can be large for companies with extensive litigation
history (hundreds of lawsuits across decades). Use only_main_stats: true
to receive only the global totals and MainStats, omitting all other
distributions. This is recommended for dashboards and list views where
the granular distributions are not needed.


Authentication

This endpoint requires HTTP Basic Auth. Include an Authorization header
with the value Basic <base64>, where <base64> is the Base64 encoding
of username:apikey.

Your username and API key are provided by Klooks upon registration.
Each user may have up to 3 active API keys — any of them can be used
as the password component.

Example: Authorization: Basic am9obkBleGFtcGxlLmNvbTpteS1hcGkta2V5LTEyMw==

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

CNPJ da empresa. Aceita com ou sem formatação (pontos, barras, hífens são ignorados). Deve resultar em 14 dígitos.

boolean
Defaults to false

When true, returns only global totals and the MainStats object, omitting distributions by type, state, court and status. Useful for lighter responses.

boolean
Defaults to false

When true, bypasses the Firestore cache (15-day TTL) and fetches fresh data from BigDataCorp. The updated result is saved to cache at the end of the request.

integer
≥ 1

Filters all monthly_distribution fields to include only the last N years. For example, last_years: 2 in 2026 returns monthly data from 2025-2026 only. Global totals (TotalLawsuits, TotalValue) remain unchanged and reflect complete historical data. Use this to significantly reduce response size for dashboards and list views.

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json