---
title: "PGFN Debts Search"
method: POST
path: "/br/pgfn/debts-search/v1"
tags: ["Brazil", "Procuradoria-Geral da Fazenda Nacional (PGFN)"]
---

# PGFN Debts Search

`POST /br/pgfn/debts-search/v1`

## Request

- Base URL: `https://api.croma.run`
- URL: `https://api.croma.run/br/pgfn/debts-search/v1`
- Auth: HTTP bearer

Search the active debts Brazilian companies owe the Union in the dívida ativa (Procuradoria-Geral da Fazenda Nacional): federal taxes, social security contributions and the FGTS, by company name, CNPJ or its 8-character root, regime, state, status, the company's role in the debt, whether it is in court, and an amount range. Largest amount first, pages of up to 50. Companies only. Served by Croma (`as_of` says how current the data is), refreshed with each quarterly release.

**Dataset endpoint**: answers from the whole source in milliseconds and carries `as_of`.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `query` string: Palabras a buscar en los nombres (opcional).
  - `document_number` string: CNPJ de la empresa deudora, con o sin puntuación, p. ej. `12.345.678/0001-90`, o su raíz de 8 caracteres para todos sus establecimientos (opcional).
  - `regime` '' | 'nao_previdenciario' | 'previdenciario' | 'fgts': Tipo de deuda: `nao_previdenciario` (tributos y demás), `previdenciario` (contribuciones a la seguridad social) o `fgts` (opcional).
  - `state` string: Sigla del estado (UF) de la empresa deudora, p. ej. `SP` (opcional).
  - `status_type` '' | 'in_collection' | 'tax_benefit' | 'guaranteed' | 'suspended_by_court' | 'in_negotiation': Situación: `in_collection` (en cobro), `tax_benefit` (beneficio fiscal), `guaranteed` (garantizada), `suspended_by_court` (suspendida por decisión judicial), `in_negotiation` (en negociación) (opcional).
  - `debtor_type` '' | 'principal' | 'co_responsible' | 'joint': Papel de la empresa en la deuda: `principal`, `co_responsible` (corresponsable) o `joint` (solidaria) (opcional).
  - `in_court` 'any' | 'yes' | 'no': `yes` solo deudas en ejecución judicial, `no` solo las que no, `any` ambas.
  - `amount_min` number: Monto mínimo de la deuda en reales (opcional).
  - `amount_max` number: Monto máximo de la deuda en reales; `0` sin límite (opcional).
  - `page` integer: 1-based page number for paginated results.
  - `per_page` integer: Resultados por página (1-50).

## Response `200`

Successful response

- PgfnDebtsSearchResponse
  - `data` PgfnDebtsSearchData, required
    - `as_of` string, nullable, required: How current the data in this response is.
    - `query` string, required
    - `document_number` string, nullable, required
    - `regime` string, nullable, required
    - `state` string, nullable, required
    - `status_type` string, nullable, required
    - `debtor_type` string, nullable, required
    - `in_court` string, required
    - `total` number, required: Debts matching the filters, across every page, counted up to 1000.
    - `total_is_exact` boolean, required: False when more than 1000 match: `total` is then 1000, and the pages go on.
    - `page` number, required
    - `per_page` number, required
    - `total_pages` number, required: Pages over `total`; there are more when `total_is_exact` is false.
    - `count` number, required
    - `debts` object[], required
      - `id` string, required: The regime, the inscription number and the company's CNPJ, joined by colons: the key.
      - `regime` 'nao_previdenciario' | 'previdenciario' | 'fgts', required: `nao_previdenciario` (federal taxes and other non-social-security debt), `previdenciario` (social security contributions) or `fgts` (the workers' severance fund).
      - `inscription_number` string, required: The inscription's number in the dívida ativa, as PGFN publishes it.
      - `document_number` string, required: The company's CNPJ, 14 characters, no punctuation.
      - `document` string, required: The CNPJ as it is written, `12.345.678/0001-90`.
      - `cnpj_root` string, required: The CNPJ's first 8 characters: the same for every establishment of one company.
      - `debtor_name` string, required: The company's name as PGFN records it.
      - `debtor_type` 'principal' | 'co_responsible' | 'joint', required: The company's role in the debt: `principal`, `co_responsible` or `joint`. An inscription with several debtors has a row for each.
      - `state` string, nullable, required: Two-letter state (UF) of the company.
      - `responsible_unit` string, nullable, required: The PGFN unit in charge, e.g. `3ª REGIÃO`.
      - `registering_unit` string, nullable, required: The unit that registered an FGTS debt.
      - `collecting_entity` 'pgfn' | 'caixa', required: Who collects the debt: PGFN, or Caixa for part of the FGTS.
      - `status_type` 'in_collection' | 'tax_benefit' | 'guaranteed' | 'suspended_by_court' | 'in_negotiation', nullable, required: `in_collection`, `tax_benefit`, `guaranteed`, `suspended_by_court` or `in_negotiation`.
      - `status` string, nullable, required: The inscription's detailed status, as PGFN words it.
      - `revenue_type` string, nullable, required: What the debt is for, as PGFN words it, e.g. `Receita da dívida ativa - PIS`, `Simples Nacional`.
      - `registered_on` string, nullable, required: `yyyy-mm-dd` the debt was inscribed.
      - `in_court` boolean, required: true when the debt is being enforced in court (ajuizada).
      - `amount` number, required: The consolidated amount in reais, with legal charges, as of PGFN's extraction. The whole inscription's amount: repeated on each debtor's row.
      - `reference_month` string, required: `yyyy-mm`: the month PGFN's quarterly release refers to.

## Other responses

- `400`: Invalid request body
- `401`: Missing or invalid API key
- `429`: Rate limit exceeded
- `500`: Internal error
- `502`: Upstream source returned an error

---

[API](https://skmtc.dev/usecroma/apis/croma-marketplace-api.md) · [All operations](https://skmtc.dev/usecroma/apis/croma-marketplace-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usecroma/apis/croma-marketplace-api/revisions/df016cdb29d7?raw)
