# Migrate from Infosimples

> How to replace Infosimples lookups for CNPJ, Simples Nacional, state registrations (CCC and SINTEGRA), SUFRAMA and CEP with the CNPJá API.

This guide shows how to replace calls to the Infosimples Consultas API with calls to the CNPJá API. It covers the lookups that have an equivalent in CNPJá, at the [Receita Federal](https://solucoes.receita.fazenda.gov.br/Servicos/cnpjreva/), the [Simples Nacional](https://consopt.www8.receita.fazenda.gov.br/consultaoptantes), the [CCC](https://dfe-portal.svrs.rs.gov.br/Nfe/Ccc) and the state SINTEGRA sites, [SUFRAMA](https://www4.suframa.gov.br/cadsuf/#/menu-externo) and the [Correios (DNE)](https://buscacepinter.correios.com.br/app/endereco/index.php), plus the response envelope and codes, the field format and the behavior differences.

## Overview

- The Infosimples CNPJ lookups at the Receita Federal, the Simples Nacional, the CCC, the SINTEGRA sites and SUFRAMA become a single operation, [Lookup CNPJ](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d). Each source beyond the registration is requested as an optional resource in `expand`, and one request can bring all of them.
- The per-state SINTEGRA lookups and SINTEGRA / Unificada become the `stateRegistry.states` parameter. Every UF comes from the CCC, in the same format, and not from each SEFAZ site.
- The state registration and SUFRAMA lookups by CPF become [Lookup CPF](https://cnpja.com/en-us/docs/api/reference#tag/individuals/GET/v2/individuals/%7btaxId%7d). Receita Federal CPF data has no equivalent.
- The `POST` with a form body becomes a `GET`, with the document in the path, and the `token` leaves the body and goes, on its own, in the `Authorization` header.
- The HTTP status now gives the result, instead of the `code` Infosimples returns in the body of every response. The response has no envelope: the body is the record itself, with no `header` and no `data` list.
- Each field comes once, without the `normalizado_*` pairs: CNPJ, CEP and CNAE without punctuation, `YYYY-MM-DD` dates, numeric share capital, E.164 phones and classifications as `code` and `label` pairs.
- You choose the maximum data age with `maxAge`, and billing separates cached queries from live queries.
- The `site_receipts` receipts become PDFs from [Issue CNPJ dossier](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d/dossier).
- Looking up by state registration number and the lookups that require the taxpayer's login or digital certificate have no equivalent.

Effort: medium. Switching the URL and authentication is direct; most of the work is merging the lookups for the same CNPJ into one request, rewriting the field mapping and replacing the response code handling.

## Prerequisites

- **Account and key:** [sign up](https://cnpja.com/en-us/signup) and create a key in [API keys](https://cnpja.com/en-us/organizations/current/api-keys). The walkthrough is in [First request](https://cnpja.com/en-us/docs/api/first-request).
- **Authentication:** send the key as the entire value of the `Authorization` header, with no prefix: `Authorization: YOUR_API_KEY`. With `Bearer`, the request is rejected with `401` `API_KEY_INVALID`. See [Authentication](https://cnpja.com/en-us/docs/api/reference#description/authentication) and [Keys and security](https://cnpja.com/en-us/docs/api/authentication).
- **Base URL:** `https://api.cnpja.com/v2`.
- **What changes:** nothing from the Infosimples account carries over. The token and the balance purchased there don't work at CNPJá, and usage now follows your organization's plan quotas, renewed every month.

## Matching operations

The Infosimples column uses the name of each lookup in the Infosimples catalog. The matching service goes in the `/api/v2/consultas/` path, such as `receita-federal/cnpj`.

| Infosimples | CNPJá | Notes |
|---|---|---|
| Receita Federal / CNPJ | [Lookup CNPJ](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d) | No `expand`. See [CNPJ lookup](https://cnpja.com/en-us/docs/api/cnpj-lookup). |
| Receita Federal / Simples Nacional | [Lookup CNPJ](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d) with `expand=company.taxRegime` | With `company.taxRegime.view=DETAILED` for previous periods and future events. Without the history, [Lookup company](https://cnpja.com/en-us/docs/api/reference#tag/companies/GET/v2/companies/%7bid%7d) returns `taxRegime` by CNPJ root, from cached data only. See [Tax regime](https://cnpja.com/en-us/docs/api/tax-regime). |
| Receita Federal / MEI | [Lookup CNPJ](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d) with `expand=company.taxRegime` | Only the registration and the SIMEI option and periods, with no portal login; the periods require `company.taxRegime.view=DETAILED`. The CCMEI and finding the CNPJ from the CPF have no equivalent. |
| SEFAZ / Cadastro Centralizado de Contribuinte (CCC), by `cnpj` | [Lookup CNPJ](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d) with `expand=stateRegistry` | The same source, the [CCC](https://dfe-portal.svrs.rs.gov.br/Nfe/Ccc). Choose the UFs in `stateRegistry.states`. See [State registrations](https://cnpja.com/en-us/docs/api/state-registrations). |
| SINTEGRA / Unificada, per-UF SINTEGRA and SEFAZ / PR, by `cnpj` | [Lookup CNPJ](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d) with `expand=stateRegistry` | The UF goes in `stateRegistry.states`, such as `stateRegistry.states=SP`. The data comes from the CCC, with the same fields for every UF. |
| CCC and SINTEGRA, by `cpf` | [Lookup CPF](https://cnpja.com/en-us/docs/api/reference#tag/individuals/GET/v2/individuals/%7btaxId%7d) with `expand=stateRegistry` | `stateRegistry.states` is required and accepts `ALL` or UF abbreviations, with no `ORIGIN`. It serves CPFs with a state registration, such as rural producers. |
| CCC, SINTEGRA, SEFAZ / PR and SEFAZ / GO / Produtor Rural, by `ie` | No equivalent | The API doesn't look up by state registration number. |
| SINTEGRA / SUFRAMA, by `cnpj` | [Lookup CNPJ](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d) with `expand=suframa` | [SUFRAMA registrations](https://www4.suframa.gov.br/cadsuf/#/menu-externo). See [SUFRAMA](https://cnpja.com/en-us/docs/api/suframa). |
| SINTEGRA / SUFRAMA, by `cpf` | [Lookup CPF](https://cnpja.com/en-us/docs/api/reference#tag/individuals/GET/v2/individuals/%7btaxId%7d) with `expand=suframa` | |
| `site_receipts` for a CNPJ | [Issue CNPJ dossier](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d/dossier) | `certificates` chooses the documents: `RFB_REGISTRATION`, `RFB_PARTNERS`, `SIMPLES_NACIONAL_OPTION`, `CCC_REGISTRATIONS` and `SUFRAMA_REGISTRATION`. See [Certificates](https://cnpja.com/en-us/docs/api/certificates). |
| `site_receipts` for a CPF | [Issue CPF dossier](https://cnpja.com/en-us/docs/api/reference#tag/individuals/GET/v2/individuals/%7btaxId%7d/dossier) | `certificates=CCC_REGISTRATIONS` or `SUFRAMA_REGISTRATION`. |
| Correios / CEP, by `cep`, and Correios / Completa CEP | [Lookup CEP](https://cnpja.com/en-us/docs/api/reference#tag/postal-codes/GET/v2/postal-codes/%7bcode%7d) | Already returns the municipality's [IBGE code](https://www.ibge.gov.br/explica/codigos-dos-municipios.php). See [CEP and addresses](https://cnpja.com/en-us/docs/api/postal-codes). |
| Correios / CEP, by `endereco` | [Search CEP](https://cnpja.com/en-us/docs/api/reference#tag/postal-codes/GET/v2/postal-codes) | With `search`, with a key. |
| IBGE / Código de Município and IBGE / Área territorial brasileira | [Search CEP](https://cnpja.com/en-us/docs/api/reference#tag/postal-codes/GET/v2/postal-codes) | No operation of its own: search for the municipality's name with `state.in`, check `city` and read `municipality`. |
| Receita Federal / CPF | No equivalent | Lookup CPF doesn't return Receita Federal CPF data. |
| Account balance and usage information | No equivalent in the API | Use [Requests](https://cnpja.com/en-us/organizations/current/usage-events) and [Usage](https://cnpja.com/en-us/organizations/current/usage) in the app. |

## Request example

Infosimples, Receita Federal / CNPJ:

```http
POST /api/v2/consultas/receita-federal/cnpj HTTP/1.1
Host: api.infosimples.com
Content-Type: application/x-www-form-urlencoded

cnpj=37335118000180&token=YOUR_TOKEN&timeout=300
```

CNPJá:

```http
GET /v2/establishments/37335118000180 HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
```

CNPJá, with what used to take the Receita Federal, Simples Nacional, CCC and SUFRAMA lookups:

```http
GET /v2/establishments/37335118000180?expand=company.taxRegime,stateRegistry,suframa HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
```

## Parameters

### Request

| Infosimples | CNPJá | Notes |
|---|---|---|
| `token` | `Authorization` header | Key with no prefix. |
| `POST` with a form body | `GET` with parameters in the URL | The document goes in the path. |
| `timeout` | No equivalent | The request and each live query have a time limit, given in [Timeout and size](https://cnpja.com/en-us/docs/api/limits-and-errors#timeout-and-size), and a live query that runs past its own limit results in `206` with the cached resource, when cached data exists. See [Partial success](#partial-success). |
| `ignore_site_receipt` | No parameter | Responses carry no receipts. Request the PDF from the dossier operations only when you need it. |
| `login_cpf`, `login_senha`, `pkcs12_cert`, `pkcs12_pass` | No equivalent | CNPJá doesn't ask for a login or a digital certificate in its lookups. |
| No equivalent | `maxAge` | Maximum accepted data age, default `45d`. See [Max age and partial success](https://cnpja.com/en-us/docs/api/max-age). |

### Lookups by CNPJ

| Infosimples | CNPJá | Notes |
|---|---|---|
| `cnpj` | `taxId` in the Lookup CNPJ path | 14 characters without punctuation, with uppercase letters in alphanumeric CNPJs. |
| Receita Federal / CNPJ | No `expand` | The CNPJ registration always comes back. |
| Receita Federal / Simples Nacional | `expand=company.taxRegime` | `company.taxRegime.view=DETAILED` adds `timeline` and, for `SIMPLES_NACIONAL_HYBRID`, `regularIbsStartDate` and `regularCbsStartDate`. |
| CCC and SINTEGRA | `expand=stateRegistry` | `stateRegistry.view=DETAILED` adds the address, activity, dates and tax documents of each registration. |
| `uf` in the CCC and SINTEGRA / Unificada, and the UF of each SINTEGRA lookup | `stateRegistry.states` | `ORIGIN` (default, the establishment's UF), abbreviations such as `SP`, or `ALL`. Values add up, such as `ORIGIN,SP`. |
| SINTEGRA / SUFRAMA | `expand=suframa` | |
| `ie`, `ie_produtor` | No equivalent | |
| No equivalent | `company.taxRegime.maxAge`, `stateRegistry.maxAge`, `suframa.maxAge` | Maximum age for a single resource; requires the resource in `expand`. |

Send multiple `expand` values comma-separated or by repeating the parameter. See [Response expansion](https://cnpja.com/en-us/docs/api/reference#description/response-expansion).

### Lookups by CPF

| Infosimples | CNPJá | Notes |
|---|---|---|
| `cpf` | `taxId` in the Lookup CPF path | 11 digits, without punctuation. |
| CCC and SINTEGRA | `expand=stateRegistry` | `expand` is required, with `stateRegistry`, `suframa` or both. |
| `uf` | `stateRegistry.states` | Required with `stateRegistry`; accepts `ALL` or UF abbreviations, with no `ORIGIN`. |
| SINTEGRA / SUFRAMA | `expand=suframa` | |
| `birthdate` in Receita Federal / CPF | No equivalent | |

### CEP

| Infosimples | CNPJá | Notes |
|---|---|---|
| `cep` | `code` in the Lookup CEP path | 8 digits without a hyphen, keeping leading zeros. |
| `endereco` | `search` in Search CEP | Requires a key. Filter with `state.in` and `municipality.in`, and page with `limit` and `cursor`. |
| `municipio` and `uf` in IBGE / Código de Município | `search` and `state.in` in Search CEP | Check `city` in the record returned and read `municipality`. |
| `nome_municipio` and `codigo_estado` in IBGE / Área territorial brasileira | `search` and `state.in` in Search CEP | Send the state in `state.in` as the UF abbreviation. |


## Response fields

The paths on the right are from [Lookup CNPJ](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d), unless stated otherwise. Format differences that apply to all fields:

- Dates come as `YYYY-MM-DD`, and date-times in ISO 8601 UTC.
- Classified values, such as status and size, come as `code` and `label`. Base your logic on `code`; `label` is for display only and changes with the language.
- Identifiers and codes come as text, without punctuation. There are no `normalizado_*` pairs: each field comes once, already in its final format.
- Missing values may come as `null` or be left out of the response, depending on the field. See [Response format](https://cnpja.com/en-us/docs/api/responses).

### Response envelope

| Infosimples | CNPJá | Notes |
|---|---|---|
| `code` | HTTP status and, for errors, `code` | See [Errors](#errors). |
| `code_message` | `message`, for errors | |
| `errors[]` | `errors[]`, for validation errors | Present in `400` `REQUEST_VALIDATION_FAILED`, with the reason in `errors[].code`. |
| `data[]`, `data_count` | The response body | A single record, not a list. Search CEP returns the list in `records[]` and the total in `total`. |
| `site_receipts[]` | Issue CNPJ dossier or Issue CPF dossier | The PDF in the response, instead of URLs available for 7 days. |
| `header.billable`, `header.price` | No equivalent | Responses don't report the cost. See [Billing](#billing). |
| Other `header` fields, such as `header.requested_at` | No equivalent | For errors, `traceId` identifies the request. |

### Identification and status

| Infosimples (Receita Federal / CNPJ) | CNPJá | Notes |
|---|---|---|
| `cnpj`, `normalizado_cnpj` | `taxId` | 14 characters, without punctuation. |
| `matriz_filial` | `type.code` and `type.label` | Codes: `HEAD` and `BRANCH`. |
| `razao_social` | `company.legalName` | |
| `nome_fantasia` | `tradeName` | May be `null`. |
| `abertura_data`, `normalizado_abertura_data` | `incorporationDate` | `YYYY-MM-DD`. |
| `situacao_cadastral` | `status.code` and `status.label` | Codes: `ACTIVE`, `CLOSED`, `NONCOMPLIANT`, `SUSPENDED` and `VOID`, for the active, closed, noncompliant, suspended and void statuses. |
| `situacao_cadastral_data`, `normalizado_situacao_cadastral_data` | `statusDate` | `YYYY-MM-DD`. |
| `situacao_especial` | `specialStatus.code` and `specialStatus.label` | 3-character code. Present only when the establishment is active and has a special status. |
| `situacao_especial_data`, `normalizado_situacao_especial_data` | `specialStatusDate` | Present under the same conditions as `specialStatus`. |
| `certidao_baixa` | No equivalent | For a closed CNPJ, `status.code` equal to `CLOSED`, `statusDate` and `statusReason` give the status, the date and the reason. |
| `origem` | No equivalent | |
| `consulta_datahora`, `normalizado_consulta_datahora` | `updatedAt` | Last update from the Receita Federal. When the registration comes from the cache, it is earlier than the request. The other resources carry their own `updatedAt`. |


### Address and contacts

| Infosimples (Receita Federal / CNPJ) | CNPJá | Notes |
|---|---|---|
| `endereco_logradouro` | `address.street` | May be `null`. |
| `endereco_numero` | `address.number` | May be `null`. |
| `endereco_complemento` | `address.details` | May be `null`. |
| `endereco_bairro` | `address.district` | May be `null`. |
| `endereco_cep`, `normalizado_endereco_cep` | `address.postalCode` | 8 digits, without punctuation. |
| `endereco_municipio` | `address.city` | The 7-digit IBGE code is in `address.municipality`. |
| `endereco_uf` | `address.state` | UF abbreviation. |
| `telefone` | `phones[].number` | A list, with each number in E.164, such as `+5511971564144`, and the type in `phones[].type.code` (`LANDLINE` or `MOBILE`). |
| `email` | `emails[].address` | A list, with the type in `emails[].type.code`. |

The country is in `address.country`, and the coordinates are in `address.coordinates`, with `expand=address.coordinates`. See [Location and maps](https://cnpja.com/en-us/docs/api/location).

### Activities

| Infosimples (Receita Federal / CNPJ) | CNPJá | Notes |
|---|---|---|
| `atividade_economica` | `primaryActivity.code` and `primaryActivity.label` | Code and description in separate fields. 7-digit [CNAE](https://concla.ibge.gov.br/busca-online-cnae.html?view=estrutura), without punctuation. |
| `atividade_economica_secundaria`, `atividade_economica_secundaria_lista` | `secondaryActivities[].code` and `secondaryActivities[].label` | A list. 7-digit CNAE, without punctuation. |

### Company and partners

| Infosimples (Receita Federal / CNPJ) | CNPJá | Notes |
|---|---|---|
| `natureza_juridica_codigo` | `company.legalNature.code` | 4-character code, such as `2062`. |
| `natureza_juridica` | `company.legalNature.label` | |
| `porte` | `company.size.code` and `company.size.label` | Codes: `MICRO`, `SMALL` and `OTHER`. |
| `capital_social`, `normalizado_capital_social` | `company.shareCapital` | A number, such as `99999.99`, not text. |
| `efr` | `company.federativeEntity.code` and `company.federativeEntity.label` | Present only for public-administration [legal natures](https://concla.ibge.gov.br/estrutura/natjur-estrutura/natureza-juridica-2021). |
| `qsa[]` | `company.partners[]` | See [Partners and people](https://cnpja.com/en-us/docs/api/partners). |
| `qsa[].nome` | `company.partners[].person.legalName` | |
| `qsa[].qualificacao` | `company.partners[].role.code` and `company.partners[].role.label` | 2-character code, such as `49`. |
| `qsa[].nome_representante_legal` | `company.partners[].legalRepresentative.person.legalName` | `legalRepresentative` only appears when there is a legal representative. |
| `qsa[].qualificacao_representante_legal` | `company.partners[].legalRepresentative.role.code` and `.label` | |
| `qsa[].pais_origem` | `company.partners[].person.domicileCountry.code` and `.label` | Alpha-2 country code, such as `US`. |
| `licenciamento_dispensado[]` | No equivalent | |

Partners gain new fields, such as the person type, the masked CPF or the CNPJ in `person.taxId`, the age group and a stable `person.id` for [Lookup person](https://cnpja.com/en-us/docs/api/reference#tag/people/GET/v2/people/%7bid%7d).


### Simples Nacional and SIMEI

They require `expand=company.taxRegime`. Periods and events also require `company.taxRegime.view=DETAILED`. With `DETAILED`, the age counts only from the last live query at the Simples Nacional, which can require a live query where `SUMMARY` would come from the cache. See [Tax regime](https://cnpja.com/en-us/docs/api/tax-regime).

| Infosimples (Receita Federal / Simples Nacional) | CNPJá | Notes |
|---|---|---|
| `cnpj`, `normalizado_cnpj` | `taxId` | |
| `razao_social` | `company.legalName` | |
| `simples_nacional_situacao` | `company.taxRegime.type.code` equal to `SIMPLES_NACIONAL`, `SIMPLES_NACIONAL_HYBRID` or `SIMPLES_NACIONAL_SIMEI`, and `company.taxRegime.simplesNacionalStartDate` | `SIMPLES_NACIONAL_HYBRID` identifies optants that also opt into the IBS or CBS regular regime, and `SIMPLES_NACIONAL_SIMEI` identifies MEIs, which are also Simples Nacional optants. `simplesNacionalStartDate` is present only with these three codes. Without an annual return, `SIMPLES_NACIONAL_SIMEI` is also assigned to newly opened sole proprietorships, with `simplesNacionalStartDate` and `simeiStartDate` equal to `null`. The type also carries the other regimes, such as `PRESUMED_PROFIT`. |
| `simei_situacao` | `company.taxRegime.type.code` equal to `SIMPLES_NACIONAL_SIMEI` and `company.taxRegime.simeiStartDate` | A code and a date, instead of text. `simeiStartDate` is present only with `SIMPLES_NACIONAL_SIMEI`. |
| `consulta_datahora` | `company.taxRegime.updatedAt` | A single value for the Simples Nacional and the SIMEI. |
| `simples_nacional_periodos_anteriores[]` | `company.taxRegime.timeline[]` with `type.code` equal to `SIMPLES_NACIONAL_PERIOD` | The same list carries actual, presumed and arbitrated profit periods, SIMEI periods, IBS and CBS regular regime periods and future events. Filter by `type.code`. |
| `simei_periodos_anteriores[]` | `company.taxRegime.timeline[]` with `type.code` equal to `SIMEI_PERIOD` | |
| `inicio_data`, `normalizado_inicio_data` of `simples_nacional_periodos_anteriores[]` and `simei_periodos_anteriores[]` | `timeline[].startDate` | `YYYY-MM-DD`. |
| `fim_data`, `normalizado_fim_data` of `simples_nacional_periodos_anteriores[]` and `simei_periodos_anteriores[]` | `timeline[].endDate` | May be `null`. |
| `detalhamento` of `simples_nacional_periodos_anteriores[]` and `simei_periodos_anteriores[]` | `timeline[].details` | May be `null`. |
| `simples_nacional_eventos_futuros[]` | `company.taxRegime.timeline[]` with `type.code` equal to `SIMPLES_NACIONAL_INCLUSION` or `SIMPLES_NACIONAL_EXCLUSION` | |
| `simei_eventos_futuros[]` | `company.taxRegime.timeline[]` with `type.code` equal to `SIMEI_EXCLUSION` | |
| `data_efeito`, `normalizado_data_efeito` of `simples_nacional_eventos_futuros[]` and `simei_eventos_futuros[]` | `timeline[].startDate` | The event date. For events, `endDate` is always `null`. |
| `descricao_evento` of `simples_nacional_eventos_futuros[]` and `simei_eventos_futuros[]` | `timeline[].details` | |
| `simples_nacional_agendamentos[]` | No equivalent | |
| `regime_regular_ibs_situacao` and `regime_regular_cbs_situacao` | `company.taxRegime.type.code` equal to `SIMPLES_NACIONAL_HYBRID`, `company.taxRegime.regularIbsStartDate` and `company.taxRegime.regularCbsStartDate` | The dates require `company.taxRegime.view=DETAILED`, as the paragraph below the table explains. |
| `regime_regular_ibs_cbs_eventos_futuros[]` | `company.taxRegime.timeline[]` with `type.code` equal to `REGULAR_IBS_OPTION` or `REGULAR_CBS_OPTION` | The tax in `tributo` is part of the code. |
| `conseguiu_obter_mais_informacoes`, `origem` | No equivalent | |
| `nome_empresarial` in Receita Federal / MEI | `company.legalName` | |
| `atividade_secundaria_lista` in Receita Federal / MEI | `secondaryActivities[].code` and `secondaryActivities[].label` | A list. 7-digit CNAE, without punctuation. |
| `consulta_data`, `normalizado_consulta_data` in Receita Federal / MEI | `updatedAt` | Last update from the Receita Federal. |
| `peridos_mei[]` in Receita Federal / MEI | `company.taxRegime.timeline[]` with `type.code` equal to `SIMEI_PERIOD` and `company.taxRegime.simeiStartDate` | `timeline` holds the closed periods, with `data_inicio` and `data_fim` in `startDate` and `endDate`; the start of the current period is in `simeiStartDate`. |

When `company.taxRegime.type.code` is `SIMPLES_NACIONAL_HYBRID`, `company.taxRegime.view=DETAILED` also returns `company.taxRegime.regularIbsStartDate` and `company.taxRegime.regularCbsStartDate`, the start of the current IBS and CBS regular regime periods, which come only from live queries at the Simples Nacional. Either may be `null` when the company opts into only one of the two. The previous periods and upcoming events of these regimes come in `company.taxRegime.timeline[]` with `type.code` equal to `REGULAR_IBS_PERIOD`, `REGULAR_IBS_OPTION`, `REGULAR_IBS_OPTION_CANCELLATION`, `REGULAR_CBS_PERIOD`, `REGULAR_CBS_OPTION` or `REGULAR_CBS_OPTION_CANCELLATION`.

The other registration fields of Receita Federal / MEI, such as `nome_fantasia`, `capital_social`, `atividade_economica`, `situacao_cadastral` and `endereco_*`, follow the Receita Federal / CNPJ tables above, except `endereco_referencia`, which has no equivalent.


### State registrations (CCC and SINTEGRA)

They require `expand=stateRegistry`. Fields marked DETAILED require `stateRegistry.view=DETAILED`. In Lookup CNPJ, with `SUMMARY`, the default, the age of `stateRegistry.updatedAt` applies and only the establishment's UF is queried live; registrations in other UFs are refreshed in that query when the CNPJ has a registration in the establishment's UF and, otherwise, come only from the cache. With `DETAILED`, each requested UF has its age checked and is queried live separately. In Lookup CPF, with `SUMMARY` and a registration already known, a single live query refreshes all registrations and `stateRegistry.states` only filters what comes back; with no known registration, such as on the first lookup, each requested UF is queried live separately.

SINTEGRA lookups return different fields in each UF. In CNPJá, every UF comes from the CCC with the fields below, and fields specific to one SEFAZ have no equivalent.

| Infosimples (CCC and SINTEGRA) | CNPJá | Notes |
|---|---|---|
| `cnpj`, `cpf`, `normalizado_cnpj`, `normalizado_cpf` | `taxId` | In Lookup CPF, the 11-digit CPF. |
| `razao_social`, `nome` | `company.legalName` or, in Lookup CPF, `legalName` | |
| `nome_fantasia` | `tradeName` | Comes from the Receita Federal registration. |
| `porte` | `company.size.code` | Comes from the Receita Federal registration. |
| `consulta_datahora`, `consulta_data` | `stateRegistry.registrations[].updatedAt` | `stateRegistry.updatedAt` gives the last live CCC query, in any UF. |
| `inscricao_estadual`, `normalizado_inscricao_estadual` | `stateRegistry.registrations[].number` | Only the UFs requested in `stateRegistry.states`. |
| The registration's UF, `outras_inscricoes[].uf_cadastro` | `stateRegistry.registrations[].state` | |
| `inscricao_estadual_tipo`, `outras_inscricoes[].ie_tipo` | `stateRegistry.registrations[].type.code` and `.label` | Codes: `STATE_TAXPAYER`, `TAX_SUBSTITUTION`, `NON_TAXPAYER`, `INTERSTATE_TAXPAYER` and `RURAL_PRODUCER`. |
| `situacao_cadastral_ie`, `outras_inscricoes[].ie_situacao`, SINTEGRA `situacao_cadastral` | `stateRegistry.registrations[].isEnabled` | Boolean: `true` when enabled as a taxpayer. It doesn't separate statuses such as inactive and closed. |
| CCC `situacao_cadastral_cnpj`, `outras_inscricoes[].cnpj_situacao` | `stateRegistry.registrations[].hasRestriction` | Boolean for a restriction as recipient in the UF: `false` when the CCC returns `Sem restrição`. |
| `situacao_cadastral_data`, `normalizado_situacao_cadastral_data` | `stateRegistry.registrations[].statusDate` | `YYYY-MM-DD`. |
| `abertura_data`, `normalizado_abertura_data` | `stateRegistry.registrations[].activityStartDate` | DETAILED. |
| `fim_atividade_data`, `normalizado_fim_atividade_data` | `stateRegistry.registrations[].activityEndDate` | DETAILED. May be `null`. |
| `atividade_economica` | `stateRegistry.registrations[].primaryActivity.code` and `.label` | DETAILED. |
| `endereco_logradouro`, `endereco_numero`, `endereco_complemento`, `endereco_bairro` | `stateRegistry.registrations[].address.street`, `.number`, `.details`, `.district` | DETAILED. |
| CCC `endereco_municipio_nome`, SINTEGRA `endereco_municipio` | `stateRegistry.registrations[].address.city` | DETAILED. |
| SINTEGRA / PE `endereco_municipio_ibge`, the code in CCC `endereco_municipio` | `stateRegistry.registrations[].address.municipality` | DETAILED. 7-digit IBGE code, without the name. |
| `endereco_uf` | `stateRegistry.registrations[].address.state` | DETAILED. |
| `endereco_cep`, `normalizado_endereco_cep` | `stateRegistry.registrations[].address.postalCode` | DETAILED. 8 digits, without punctuation. |
| `dfe_habilitados`, `documentos_eletronicos` | `stateRegistry.registrations[].authorizedTaxDocuments[].code` and `.label` | DETAILED. Codes such as `NFE`, `NFCE` and `CTE_ROAD`. |
| `outras_inscricoes[]` | The other items of `stateRegistry.registrations[]` | Request the UFs in `stateRegistry.states`, or `ALL`. |
| SINTEGRA `telefone`, `email`, `atividade_economica_secundaria`, `natureza_juridica` and `capital_social` | `phones[]`, `emails[]`, `secondaryActivities[]`, `company.legalNature` and `company.shareCapital` | They come from the Receita Federal registration, not from the SEFAZ. Lookup CPF has no such fields. |
| CCC `regime_tributacao` | `stateRegistry.registrations[].hasExceededSublimit` | DETAILED. Boolean: `true` when the regime indicates an exceeded sublimit, and `false` for the others, such as the normal one. |
| `regime_apuracao` | No equivalent | The federal regime is in `company.taxRegime`, with `expand=company.taxRegime`. |
| `historico[]`, `credito_presumido`, `tipo_produtor`, `completo`, `informacao_ie_destinatario` | No equivalent | |
| `consulta_comprovante`, `codigo_controle` | No equivalent | The CCC certificate comes from the dossier operations with `certificates=CCC_REGISTRATIONS`. In Issue CNPJ dossier, it covers only the establishment's UF; in Issue CPF dossier, a single UF with a known registration, which can't be chosen. |
| Fields from a single SEFAZ, such as `posto_fiscal`, `ocorrencia_fiscal`, `credenciamento_nfe_data`, `efd_perfil` and `unidade_fiscalizacao` | No equivalent | |


### SUFRAMA

They require `expand=suframa`, in Lookup CNPJ or in Lookup CPF.

| Infosimples (SINTEGRA / SUFRAMA) | CNPJá | Notes |
|---|---|---|
| `cnpj`, `cpf`, `cpf_cnpj`, `normalizado_cnpj`, `normalizado_cpf` | `taxId` | |
| `razao_social` | `company.legalName` or, in Lookup CPF, `legalName` | |
| `inscricao_suframa`, `normalizado_inscricao_suframa` | `suframa.registrations[].number` | A list, instead of a single registration. |
| `situacao_cadastral` | `suframa.registrations[].status.code` | `ACTIVE`, `INACTIVE`, `BLOCKED` or `CANCELLED`. |
| `projeto_aprovado` | `suframa.registrations[].hasApprovedProject` | Boolean. |
| `aprovacao_projeto_data`, `normalizado_aprovacao_projeto_data` | `suframa.registrations[].approvalDate` | May be `null`. |
| `email` | `suframa.registrations[].emails[].address` | A list. |
| `telefone` | `suframa.registrations[].phones[].number` | A list, in E.164. |
| `endereco_logradouro`, `endereco_numero`, `endereco_complemento`, `endereco_bairro` | `suframa.registrations[].address.street`, `.number`, `.details`, `.district` | |
| `endereco_municipio`, `endereco_uf`, `endereco_cep` | `suframa.registrations[].address.city`, `.state`, `.postalCode` | The IBGE code is in `address.municipality`. |
| `atividade_economica` | `suframa.registrations[].primaryActivity.code`, `.label` | An object; 7-digit CNAE. |
| `atividade_economica_secundaria`, `atividade_economica_secundaria_lista` | `suframa.registrations[].secondaryActivities[].code`, `.label` | 7-digit CNAE. |
| `codigo_descricao_natureza_juridica` | `company.legalNature.code`, `.label` | Comes from the Receita Federal registration. |
| `incentivos`, `incentivos_detalhados[]` | [Mapa dos Incentivos Fiscais](https://www.gov.br/suframa/pt-br/zfm/mapa-dos-incentivos-fiscais-ultima-versao-28-09.xlsx) | SUFRAMA no longer publishes the incentives of each registration and now points to this official spreadsheet, so the API doesn't return them. The criteria SUFRAMA applied are in [Estimate incentives](https://cnpja.com/en-us/docs/data/suframa#incentives), to estimate the incentives and confirm them in the spreadsheet. |
| `situacao_cadastral_data`, `situacao_cadastral_observacoes`, `situacao_credenciamento`, `observacao` | No equivalent | |
| `atividade_economica_estadual`, `atividade_economica_estadual_lista`, `inscricao_suframa_completa` | No equivalent | |
| `matriz`, `tipo_pessoa` | No direct field | The establishment type is in `type.code`, and the operation, Lookup CNPJ or Lookup CPF, gives the person type. |

Each registration also carries `updatedAt`, with the last update at SUFRAMA.


### CEP

The paths in this table are from [Lookup CEP](https://cnpja.com/en-us/docs/api/reference#tag/postal-codes/GET/v2/postal-codes/%7bcode%7d) and the Search CEP records.

| Infosimples (Correios / CEP and Completa CEP) | CNPJá | Notes |
|---|---|---|
| `cep`, `normalizado_cep` | `code` | 8 digits. |
| `logradouro` | `street` | |
| `bairro` | `district` | |
| `cidade` | `city` | |
| `uf` | `state` | |
| `codigo_municipio_ibge` | `municipality` | 7 digits. Lookup CEP already returns the code, with no second lookup. |
| `codigo_municipio` in IBGE / Código de Município and IBGE / Área territorial brasileira | `municipality` | In the Search CEP records. |
| `cep_mudou`, `cpc`, `normalizado_cpc`, `localidade_subordinada`, `mensagem` | No equivalent | A nonexistent CEP results in `404` `POSTAL_CODE_NOT_FOUND`. |
| No equivalent | `status`, `number`, `details`, `updatedAt` | CEP status, street number, street complement or stretch, and last update from the Correios. See [CEP and addresses](https://cnpja.com/en-us/docs/api/postal-codes). |


## Behavior differences

### Freshness and caching

Infosimples states that it runs every lookup live at the original source. In CNPJá, each resource comes from the cache while it is within `maxAge` and is queried live, before the response, when it is older or was never fetched. `maxAge` ranges from `5m` to `1y`, with a `45d` default, and each resource reports its last update in its own `updatedAt`. Each resource also accepts a limit of its own, such as `stateRegistry.maxAge`. The smallest value, `5m`, is the closest to always querying the source. Lookup CEP doesn't accept `maxAge` and serves cached data only, updated with each DNE edition. See [Max age and partial success](https://cnpja.com/en-us/docs/api/max-age).

> **Tip:** to refresh only the state registrations or the Simples Nacional, keep `maxAge` high and use the resource's own limit, such as `stateRegistry.maxAge=1d`. That way, the registration data keeps coming from the cache.

### Partial success

In Infosimples, a source failure results in an error code, such as `613`, `614` or `615`. In CNPJá, when a live query fails or runs past its [time limit](https://cnpja.com/en-us/docs/api/limits-and-errors#timeout-and-size), the response is `206`, with the same shape as `200`: the affected resource keeps its cached data, or comes back empty if it was never fetched, and is not billed. With no cached data to fall back on, such as on a CNPJ's first lookup, the request fails instead of returning `206`. Treat `206` as success and compare each resource's `updatedAt` with the limit you asked for. See [Partial success](https://cnpja.com/en-us/docs/api/reference#description/partial-success).

### Errors

Infosimples reports the result of every response in `code`, `code_message` and `errors` in the body; in CNPJá, the HTTP status gives the result. Every error body carries `status`, `code`, `message` and `traceId`. Handle errors by `code`, which is stable, and use `message` for display only. See [Limits and errors](https://cnpja.com/en-us/docs/api/limits-and-errors).

| Infosimples `code` | CNPJá |
|---|---|
| `200` | `200`, or `206` on partial success |
| `600` Unexpected error | `500` `UNEXPECTED_ERROR` |
| `601` Authentication with the token failed | `401` `API_KEY_MISSING`, `API_KEY_INVALID` or `API_KEY_REVOKED` |
| `602` Invalid service in the URL | `404` `NOT_FOUND` |
| `603` Token not authorized or with a usage limit | `402` when the quota or the overage budget is used up, with one of the codes in [Error codes](https://cnpja.com/en-us/docs/api/limits-and-errors#error-codes), or `401` `API_KEY_REVOKED` |
| `604`, `606` and `607` Parameters not validated, missing or invalid | `400` `REQUEST_VALIDATION_FAILED`, not charged |
| `605` Timeout exceeded | `206` when a live query runs past its [time limit](https://cnpja.com/en-us/docs/api/limits-and-errors#timeout-and-size) and cached data exists, or `504` `REQUEST_TIMED_OUT` when the request itself runs past its limit, not charged |
| `612` No data at the source, in Receita Federal / CNPJ | `404` `ESTABLISHMENT_NOT_FOUND`, billed as described in [What is charged even without a useful result](https://cnpja.com/en-us/legal/metering#charged-without-result) |
| `612` No data at the source, in the CCC or SINTEGRA, by `cnpj` | `200` with an empty `stateRegistry.registrations` |
| `612` No data at the source, in SINTEGRA / SUFRAMA, by `cnpj` | `200` with an empty `suframa.registrations` |
| `612` No data at the source, by `cpf` | `404` `INDIVIDUAL_NOT_FOUND` when the CPF has no registration in the sources and UFs queried, billed as described in [What is charged even without a useful result](https://cnpja.com/en-us/legal/metering#charged-without-result); a CPF already known through the other source returns `200` with an empty `registrations` |
| `612` No data at the source, in Correios / CEP | `404` `POSTAL_CODE_NOT_FOUND` |
| `609`, `610`, `613`, `614`, `615` and `618` Source instability | `206` with the cached resource; with no cache, the request fails and should be retried later |
| `617` Usage overload | `429` `RATE_LIMIT_EXCEEDED` or `CONCURRENCY_LIMIT_EXCEEDED` |
| `622` Same lookup repeated | No error: within `maxAge`, the repeat comes from the cache |


### Limits

Infosimples rejects with `622` the same lookup repeated many times in a row. With a key, the requests-per-second and concurrent-request limits apply to the whole organization, across all of its keys, and follow its plan; without a key, they apply to each source IP. The values are in [Usage limits](https://cnpja.com/en-us/docs/api/limits-and-errors#usage-limits). Above them, the response is `429`, not billed. Each request has a maximum duration, and the client timeout must stay above it, as shown in [Timeout and size](https://cnpja.com/en-us/docs/api/limits-and-errors#timeout-and-size).

### Billing

Infosimples debits from a prepaid balance, in reais, each request whose response code is billable, such as `200` and `612`. The price is that of the monthly volume tier plus each API's extra price, when it has one, with a monthly minimum, and comes in `header.price`. In CNPJá, each resource in the response is billed separately, as a live query, which costs more, or a cached query, and each unit has its own quota in the plan, renewed every month. On Pro, the quota of each unit can grow with [packs](https://cnpja.com/en-us/docs/billing/packs-and-budget#packs), and the organization can set a budget to pay for each query beyond the quota at the per-query overage price, so an exhausted quota does not have to stop the integration. When a quota runs out with no overage budget, or the month's budget runs out, every request made with one of the organization's keys gets `402`, as explained in [Quota used up](https://cnpja.com/en-us/docs/billing/quota-exhausted#api); on Free, which has no packs or budget, this happens as soon as the quota runs out. Requests without a key, rejected requests and server failures are not billed, as listed in [What is not charged](https://cnpja.com/en-us/legal/metering#not-charged). Requesting the registration, `company.taxRegime`, `stateRegistry` and `suframa` in one request bills each resource separately, and registration data is always billed, even when you only need the state registrations or the Simples Nacional. With `stateRegistry.view=DETAILED`, billing grows with the registrations and the requested UFs, including those with no registration, so request only the UFs you need instead of `ALL`. A `404` is billed too, as detailed in [What is charged even without a useful result](https://cnpja.com/en-us/legal/metering#charged-without-result). Responses carry no cost headers: track usage under [Usage](https://cnpja.com/en-us/organizations/current/usage). See [Queries and quota](https://cnpja.com/en-us/docs/billing/queries-and-quotas), what each operation consumes in the [Metering Rules](https://cnpja.com/en-us/legal/metering#api) and [Pricing](https://cnpja.com/en-us/pricing).


### Public access

Infosimples requires the token on every lookup. In CNPJá, Lookup CNPJ and Lookup CEP accept requests without a key, as long as the URL has no query parameters at all; any parameter results in `401` `API_KEY_MISSING`. These requests use the default values, such as `maxAge=45d` with no `expand`, are not billed and follow limits of their own, counted per source IP. Public access serves low-volume or low-criticality integrations; use a key when volume grows, when a limit rejection is not acceptable or when you need other parameters. See [Public access](https://cnpja.com/en-us/docs/api/public-access), which also explains the behavior for CNPJs not in cached data.

### Language and labels

`label` values and error messages come in Portuguese by default; send `Accept-Language: en-US` to get them in English. Codes, field names and official source data are never translated. Use `code` in your logic and `label` for display only. See [Language](https://cnpja.com/en-us/docs/api/reference#description/language).

## No equivalent

- Lookup by state registration number (`ie` and `ie_produtor`), including SEFAZ / GO / Produtor Rural.
- Receita Federal / CPF: the CPF status, the birth date and the other Receita Federal CPF data.
- Lookups with the taxpayer's login, access code or digital certificate, such as Receita Federal / Situação Fiscal, Receita Federal / Comprovante de Pagamento and the MEI installment payment slips. The registration data and partner names from Situação Fiscal are in Lookup CNPJ, without the capital share.
- Issuing payment slips, such as the MEI DAS.
- The CCMEI and the Receita Federal / MEI fields about the entrepreneur, such as `nome_empresario`, `cpf`, `identidade_numero`, `nire`, `ocupacao_principal`, `forma_atuacao` and `recibo_numero`.
- Tax clearance certificates. Certificates reproduce registrations at the source; the API does not issue tax clearance certificates, such as the certidão negativa de débitos.
- Temporary receipt URLs (`site_receipts`). The dossier operations return the PDF in the response.
- `certidao_baixa`, `licenciamento_dispensado` and `origem` from Receita Federal / CNPJ and `endereco_referencia` from Receita Federal / MEI.
- The response `header`, with price, signature and execution time, the `timeout` and the account balance lookup.
- The other lookups in the Infosimples catalog, such as vehicles, lawsuits, state and municipal certificates, invoices, tax debt, professional councils, sanctions lists and rural properties.

## Step by step

1. [Sign up](https://cnpja.com/en-us/signup) and create a key in [API keys](https://cnpja.com/en-us/organizations/current/api-keys).
2. List the Infosimples lookups your integration uses and check the equivalent of each one in [Matching operations](#matching-operations).
3. Replace the `POST` to `/api/v2/consultas/` with `GET https://api.cnpja.com/v2/establishments/` followed by the CNPJ without punctuation, or with `/v2/individuals/` for a CPF and `/v2/postal-codes/` for a CEP.
4. Remove `token` and `timeout` from the body, send the key in `Authorization`, with no prefix, and set the client timeout above a request's maximum duration, given in [Timeout and size](https://cnpja.com/en-us/docs/api/limits-and-errors#timeout-and-size).
5. Merge into one request the lookups you made in sequence for the same CNPJ, with `expand`, and replace the per-UF SINTEGRA lookups with `stateRegistry.states`.
6. Set `maxAge` and each resource's own limit according to how current the data must be.
7. Rewrite the response parsing without the envelope and without `data[]`, with the tables in [Response fields](#response-fields), basing your logic on `code`.
8. Handle errors by HTTP status and `code`, accept `206` as success, and retry `429`, `500` and `504` with a delay.
9. Replace reading `site_receipts` with the dossier operations in the flows that store receipts.
10. Review the flows that looked up by state registration number, by CPF at the Receita Federal or with the taxpayer's login, which have no equivalent.
11. Validate the integration with the key, compare the responses with the Infosimples ones and follow usage in [Usage](https://cnpja.com/en-us/organizations/current/usage) during the first weeks.

## Sources for this comparison

What this page says about Infosimples comes from its public API documentation and the page of each lookup:

- Consultas API documentation: the request format, the common parameters, the response structure and codes and, through the link of each lookup, its parameters and fields, including the state SINTEGRA sites and SEFAZ / PR.
- The pages of the Receita Federal / CNPJ, Receita Federal / Simples Nacional and Receita Federal / MEI lookups.
- The pages of the SEFAZ / Cadastro Centralizado de Contribuinte (CCC), SINTEGRA / Unificada and SINTEGRA / SUFRAMA lookups.
- The pages of the Correios / CEP, Correios / Completa CEP, IBGE / Código de Município and IBGE / Área territorial brasileira lookups.
- Lookup catalog: the names of the other lookups mentioned.
- Pricing: the prepaid balance, billing by volume tier, the extra price of each API and the monthly minimum.
- Home page: lookups run live at the original source.

Sources accessed on November 19, 2026.

Third-party trademarks on this page are used only to identify them, with no affiliation or endorsement ([Terms of Use](https://cnpja.com/en-us/legal/terms#data)).
