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