# Certificado de Regularidade do FGTS por CNPJ ou CPF (`brasildados/certificado-devedor-fgts-api`) Actor

Consulta o Certificado de Regularidade do FGTS por CNPJ ou CPF, em lote. Mesmo campo p/ os dois tipos. Retorna regularidade, dados cadastrais e histórico. Emite PDF opcional. | Check the FGTS Regularity Certificate by CNPJ or CPF, in bulk.

- **URL**: https://apify.com/brasildados/certificado-devedor-fgts-api.md
- **Developed by:** [BrasilDados.org - Hub de APIs de Dados do Brasil](https://apify.com/brasildados) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1,000.00 / 1,000 por cnpj/cpf consultados

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Certificado de Regularidade do FGTS por CNPJ ou CPF 🇧🇷

Consulte o **Certificado de Regularidade do FGTS (CRF)** por **CNPJ ou CPF**, em lote e em tempo real. Para cada documento você recebe se está **regular perante o FGTS**, os **dados cadastrais**, o **período de validade** e o **histórico de certificados** emitidos. Os dados vêm da fonte oficial, sem cache.

Processa até **50 documentos por execução**.

> ℹ️ **CNPJ e CPF vão no mesmo campo.** Você não precisa dizer qual é qual: basta jogar os documentos misturados na lista que o Actor identifica sozinho pelo número de dígitos (14 = CNPJ, 11 = CPF) e dispara a consulta correta para cada um.

***

### Para que serve?

- **Due diligence e onboarding**: saber se um fornecedor, cliente ou parceiro está regular perante o FGTS.
- **Habilitação em licitações e crédito**: exigência comum para contratar com órgãos públicos e instituições de crédito.
- **Compliance**: triagem em lote de carteiras de CNPJs e CPFs.

***

### Input

```json
{
  "documentos": ["33.000.167/0001-01"],
  "gerarCertificado": false
}
```

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| `documentos` | `string[]` | sim | 1 a 50 documentos por execução. Aceita **CNPJ e CPF na mesma lista**, em qualquer formato. |
| `gerarCertificado` | `boolean` | não | Emite o certificado oficial em PDF (`certificadoUrl`). Não muda o preço da consulta. |

Documentos com dígito verificador inválido são marcados com erro e **não são cobrados** (a validação roda localmente, antes de qualquer consulta).

***

### Output

Um registro por documento consultado:

```json
{
  "documento": "33000167000101",
  "documentoFormatado": "33.000.167/0001-01",
  "tipoDocumento": "CNPJ",
  "razaoSocial": "PETROLEO BRASILEIRO S A PETROBRAS",
  "nomeFantasia": null,
  "possuiIrregularidade": false,
  "status": "A empresa está regular perante o Fundo de Garantia do Tempo de Serviço - FGTS.",
  "dataEmissao": "05/09/2026 01:29:00",
  "numeroCertificado": "2026081715370313570655",
  "endereco": {
    "logradouro": "AV REPUBLICA DO CHILE",
    "numero": "65",
    "bairro": "CENTRO",
    "cidade": "RIO DE JANEIRO",
    "uf": "RJ",
    "cep": "20031-170"
  },
  "periodoValidade": { "inicio": "17/08/2026 00:00:00", "fim": "15/09/2026 00:00:00" },
  "historico": [
    { "dataEmissao": "17/08/2026 00:00:00", "numeroCrf": "2026081715370313570655", "periodoValidade": { "inicio": "17/08/2026 00:00:00", "fim": "15/09/2026 00:00:00" } }
  ],
  "consultadoEm": "2026-09-05T01:29:00.000Z",
  "erro": null
}
```

| Campo | Descrição |
| --- | --- |
| `possuiIrregularidade` | `true` = irregular perante o FGTS; `false` = regular; `null` = consulta não concluída (ver `erro`). |
| `status` | Texto de situação devolvido pela fonte oficial. |
| `periodoValidade` | Início e fim de validade do certificado vigente. |
| `historico[]` | Certificados anteriores emitidos para o documento. |
| `certificadoUrl` | Link do PDF oficial, presente só quando `gerarCertificado: true`. |
| `erro` | Motivo quando a consulta não foi concluída. |

Campos que a fonte não informa para aquele documento vêm como `null`.

***

### 📄 Certificado em PDF

Marque **Emitir certificado em PDF** na entrada, ou envie `"gerarCertificado": true`, para receber o certificado oficial em PDF. O Actor emite o documento na fonte, hospeda o arquivo na Apify e devolve o link no campo `certificadoUrl` de cada linha. O download não exige token — a URL é pré-assinada.

Emitir o PDF **não muda o preço da consulta**.

***

### 🔌 Integração via API

```bash
curl -X POST "https://api.apify.com/v2/acts/brasildados~certificado-devedor-fgts-api/run-sync-get-dataset-items" \
  -H "Authorization: Bearer SEU_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"documentos":["33.000.167/0001-01"]}'
```

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

***

### Perguntas frequentes

**O que significa `possuiIrregularidade: true`?**
Que a empresa está irregular perante o FGTS no momento da consulta. É um resultado válido e **é cobrado como qualquer consulta concluída**, mesmo quando o certificado não pode ser emitido.

**Posso misturar CNPJ e CPF na mesma execução?**
Sim. O tipo é detectado automaticamente pelo número de dígitos.

**O que acontece se eu cancelar a execução no meio?**
Os documentos já consultados ficam gravados no dataset e são cobrados; o restante não.

***

### Outros Actors da brasildados

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

***

### 🇺🇸 English version

Check the **FGTS Regularity Certificate (CRF)** by **CNPJ (Tax ID) or CPF**, in bulk and in real time. Both document types go in the same field — the Actor detects which is which from the digit count (14 = CNPJ, 11 = CPF). Up to 50 documents per run.

```bash
curl -X POST "https://api.apify.com/v2/acts/brasildados~certificado-devedor-fgts-api/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"documentos":["33.000.167/0001-01"]}'
```

> Always pass the Apify token in the `Authorization: Bearer` header, never in the URL.

# Actor input Schema

## `documentos` (type: `array`):

Informe CNPJs e/ou CPFs neste mesmo campo, misturados à vontade: o sistema identifica sozinho qual é qual pelo número de dígitos (14 = CNPJ, 11 = CPF) e faz a consulta correta. Aceita qualquer formato, com ou sem pontuação. Máximo 50 documentos por execução. | Enter CNPJs (Tax IDs) and/or CPFs in this same field, freely mixed. Max 50 documents per run.

## `gerarCertificado` (type: `boolean`):

Emite o Certificado de Regularidade do FGTS oficial em PDF e devolve o link no campo `certificadoUrl`, hospedado na Apify. Não muda o preço da consulta. | Issues the official FGTS certificate as a PDF and returns the link in `certificadoUrl`. Does not change the query price.

## Actor input object example

```json
{
  "documentos": [
    "33.000.167/0001-01"
  ],
  "gerarCertificado": false
}
```

# Actor output Schema

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

Documentos consultados no Certificado de Regularidade do FGTS (um registro por documento).

# 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 = {
    "documentos": [
        "33.000.167/0001-01"
    ],
    "gerarCertificado": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("brasildados/certificado-devedor-fgts-api").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 = {
    "documentos": ["33.000.167/0001-01"],
    "gerarCertificado": False,
}

# Run the Actor and wait for it to finish
run = client.actor("brasildados/certificado-devedor-fgts-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "documentos": [
    "33.000.167/0001-01"
  ],
  "gerarCertificado": false
}' |
apify call brasildados/certificado-devedor-fgts-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brasildados/certificado-devedor-fgts-api"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/csTo2R3YhPQlmPO73/builds/eH5ffxdSwuvA3XWaA/openapi.json
