ENPTSign inGet $5 free
Recipes/Get a company's three federal clearance certificates

Get a company's three federal clearance certificates

From a CNPJ: the federal tax and active-debt certificate (Receita Federal and PGFN), the labor-debt certificate (TST) and the FGTS certificate (Caixa), each with its result and validity, plus the official PDFs. One link with a clear answer for tenders, banks and buyers.

About $0.165 a run. Failed steps are free.

How can an AI agent get a Brazilian company's certidões negativas (federal, labor and FGTS)?

Give the agent the CNPJ and have it fetch the three certificates that tenders, banks and buyers ask for: the federal tax and active-debt certificate issued jointly by the Receita Federal and the PGFN, the labor-debt certificate (CNDT) from the TST, and the FGTS certificate (CRF) from Caixa. This recipe gets all three in one call and returns one link with each result, its validity and the official PDFs.

Try it here

About $0.165 a run. Failed steps are free. New accounts start with $5 free.

Company CNPJ, with or without punctuation

Give it to your agent

Paste this into your agent. It reads the recipe and does the rest.

CodexClaude CodeAny agent with a terminal

Use the Superpowers recipe at https://superpowers.tools/recipes/certidoes-cnpj/skill.md

  1. Reads the recipe
  2. Sets up Superpowers if needed
  3. Runs it on your balance
For developersRun it from a script or read exactly what your agent reads

Tools it uses

0 installs · 1 run

Run the script

curl -s https://superpowers.tools/recipes/certidoes-cnpj/run.mjs -o certidoes-cnpj.mjs
node certidoes-cnpj.mjs --cnpj "33.000.167/0001-01"

Reads your key from SUPERPOWERS_API_KEY or ~/.config/superpowers/key and prints the results link.

The recipe

Exactly what your agent reads.

---
name: certidoes-cnpj
description: Get a Brazilian company's three federal clearance certificates from its CNPJ (certidão negativa federal from the Receita Federal and PGFN, the labor-debt CNDT from the TST and the FGTS CRF from Caixa), each with result, validity and the official PDF, in one link.
---

# Get a company's three federal clearance certificates

A Superpowers recipe. One CNPJ in, one link out: the certidão de débitos federais e dívida ativa da União (Receita Federal and PGFN), the certidão negativa de débitos trabalhistas (CNDT, TST) and the certificado de regularidade do FGTS (CRF, Caixa), with each result, its validity, a one-line verdict and the official PDFs. These are the certificates tenders, banks and buyers ask for.

Needs a Superpowers API key. If you don't have one yet: https://superpowers.tools/skill.md?src=recipe%3Acertidoes-cnpj

## Input

- **cnpj** (required): the company's CNPJ, with or without punctuation. A branch CNPJ works: the federal certificate is issued for the head office and covers every branch.
- **lang** (optional): pt writes the result in Portuguese. Use it when your user writes in Portuguese.

## Run the script

    curl -s "https://superpowers.tools/recipes/certidoes-cnpj/run.mjs" -o sp-certidoes.mjs
    node sp-certidoes.mjs --cnpj "33.000.167/0001-01"            # add --lang pt for Portuguese

It prints JSON with share_url (the page to forward), charge_usd and each step's raw output.

## Step by step

1. In parallel:
   - POST https://superpowers.tools/v1/run {"tool": "receita.cnd-federal", "input": {"cnpj": <cnpj>}}: status (issued or not_issued), result (negative, positive_with_negative_effect, positive), control_code, valid_until, pdf_url and verify_url. When not issued, receita_message says why (pending debts, missing returns, irregular registration).
   - POST https://superpowers.tools/v1/run {"tool": "operator.cndt", "input": {"cnpj": <cnpj>}}: status, numero_certidao, valida_ate, processos and the PDF.
   - POST https://superpowers.tools/v1/run {"tool": "operator.crf-fgts", "input": {"cnpj": <cnpj>}}: situacao, numero_crf and validade_fim.
   If one fails, keep the others and say which one is missing.
2. Copy the PDFs so the links last: POST https://superpowers.tools/v1/files/from-url {"url": <pdf url>, "filename": "certidao-federal-<cnpj>.pdf"}.
3. Verdict: all clear when the federal certificate was issued and is not plain positive, the CNDT is negative or positive with the effects of a negative, and the FGTS is regular; otherwise list what needs a look.
4. Publish: POST https://superpowers.tools/v1/shares {"title": "Clearance certificates: <name>", "recipe": "certidoes-cnpj", "items": [{"label": "Summary", "text": <verdict and one line per certificate>}, {"url": <federal pdf>, "caption": "Federal certificate"}, {"url": <cndt pdf>, "caption": "Labor-debt certificate"}]} and give the user share_url.

## Reading the result

"Positive with the effects of a negative" has the same legal value as a negative certificate: there are debts, but they are suspended, guaranteed or under discussion. A federal certificate that was still valid is returned as the Receita's own copy, so the issue date can be weeks old; pass "fresh": true to receita.cnd-federal for a new one. Authenticity of the federal certificate can be checked at the Receita's verify_url with the control code.