Skip to content
Simples Nacional, MEI and tax regime in the API
API · Features

Simples Nacional, MEI and tax regime in the API

Get a CNPJ's tax regime, Simples Nacional and SIMEI opt-in, history and certificate via the API, and search companies by tax regime.

Tip: Concepts on this page: Tax regime, Data freshness and Certificates.

The API returns the company’s current tax regime, which also identifies an MEI, its Simples Nacional and SIMEI start dates and, on request, its IBS and CBS regular regime start dates and the history of previous periods and upcoming events. The regime is part of the company data and always requires an API key. What each regime means and how CNPJá determines it are in Tax regime.

Important: this page describes the data and does not constitute tax, accounting or legal advice, as the Terms of Use state.

Request

The regime appears in three operations:

OperationFieldHistory and IBS/CBS datesUpdates
Lookup CNPJcompany.taxRegime, with expand=company.taxRegimeWith company.taxRegime.view=DETAILEDA live query or cached data, depending on age
Lookup companytaxRegime, always presentNoCached data only
Search CNPJcompany.taxRegime in each record, and in the company.taxRegime.* filtersNoCached data only

The Search CNPJ filters are in Search by regime.

Lookup CNPJ

The regime is an optional resource: request it in expand, as explained in CNPJ lookup. Without it, company.taxRegime is absent from the response.

GET /v2/establishments/37335118000180?expand=company.taxRegime HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
ParameterValuesEffect
company.taxRegime.viewSUMMARY (default) or DETAILEDSUMMARY returns the regime type and the Simples Nacional and SIMEI start dates. DETAILED adds the IBS and CBS regular regime start dates, in regularIbsStartDate and regularCbsStartDate, and the history in timeline
company.taxRegime.maxAgeA duration, such as 1d or 30dMax age accepted for the regime only, instead of maxAge
  • Both are accepted only with company.taxRegime in expand. Without it, the request is rejected with 400 REQUEST_VALIDATION_FAILED, and errors includes an item with the DEPENDENCIES code, as shown in Limits and errors.
  • company.taxRegime can be requested together with other resources, as in expand=company.taxRegime,stateRegistry.
  • Requests without a key do not accept expand, so the regime is not available through Public access.

Lookup company

Lookup company takes the CNPJ root, the first 8 characters, and always returns the regime in taxRegime, at the SUMMARY level, with no additional parameters:

GET /v2/companies/37335118 HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY

The operation uses cached data only and does not accept maxAge. To update the regime, look up one of the company’s CNPJs in Lookup CNPJ, as described in Sources and updates.

Response fields

Lookup CNPJ response, trimmed to the regime fields:

{
  "taxId": "37335118000180",
  "company": {
    "id": "37335118",
    "legalName": "CNPJA TECNOLOGIA LTDA",
    "taxRegime": {
      "updatedAt": "2026-01-27T03:00:00.000Z",
      "type": { "code": "PRESUMED_PROFIT", "label": "Lucro Presumido" }
    }
  }
}

The same fields appear in taxRegime in Lookup company and in company.taxRegime in each Search CNPJ record:

FieldContent
updatedAtDate and time of the last update of the regime, never null. For a company never read in the Simples Nacional, it is the date of the registry or ECF reading that set the regime
typeRegime type, with code and label, described in Codes and values
simplesNacionalStartDateStart of the current Simples Nacional period, or null. Present only when type.code is SIMPLES_NACIONAL, SIMPLES_NACIONAL_HYBRID or SIMPLES_NACIONAL_SIMEI; for other regimes, it is absent
simeiStartDateStart of the current SIMEI period, or null. Present only when type.code is SIMPLES_NACIONAL_SIMEI; for other regimes, it is absent
regularIbsStartDateStart of the current IBS regular regime period, or null. Present only when type.code is SIMPLES_NACIONAL_HYBRID, and only in Lookup CNPJ with company.taxRegime.view=DETAILED
regularCbsStartDateStart of the current CBS regular regime period, or null. Present only when type.code is SIMPLES_NACIONAL_HYBRID, and only in Lookup CNPJ with company.taxRegime.view=DETAILED
timelineHistory of previous periods and upcoming events. Present only in Lookup CNPJ with company.taxRegime.view=DETAILED
  • An MEI has type.code set to SIMPLES_NACIONAL_SIMEI, and a Simples Nacional hybrid optant has SIMPLES_NACIONAL_HYBRID: neither has SIMPLES_NACIONAL. To cover every Simples Nacional optant, check all three codes, as explained in MEI and hybrid Simples.
  • When present, simplesNacionalStartDate and simeiStartDate can be null, as with an estimated MEI. Base the opt-in check on type.code, not on the dates.
  • When present, regularIbsStartDate or regularCbsStartDate can be null if the company opts into the regular regime of only one of the two taxes, but at least one of them has a date.

Important: no response field says that the regime was estimated. When the Simples Nacional or SIMEI opt-in is decisive, confirm it with a short company.taxRegime.maxAge or with the Simples Nacional certificate. When the Simples Nacional hybrid classification is decisive, also use company.taxRegime.view=DETAILED, where age counts only from the last live query at the Simples Nacional.

Regime history

With company.taxRegime.view=DETAILED, Lookup CNPJ adds company.taxRegime.timeline, with the previous periods of the regime and the upcoming events already scheduled, such as a Simples Nacional exclusion with a set date.

GET /v2/establishments/37335118000180?expand=company.taxRegime&company.taxRegime.view=DETAILED HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY

Illustrative response, which does not correspond to the CNPJ in the request above, trimmed to the regime of a company that left the Simples Nacional:

{
  "company": {
    "taxRegime": {
      "updatedAt": "2026-01-27T03:00:00.000Z",
      "type": { "code": "PRESUMED_PROFIT", "label": "Lucro Presumido" },
      "timeline": [
        {
          "type": { "code": "SIMPLES_NACIONAL_PERIOD", "label": "Período Anterior do Simples Nacional" },
          "startDate": "2020-06-05",
          "endDate": "2023-12-31",
          "details": "Excluída por Ato Administrativo praticado pela Receita Federal do Brasil"
        },
        {
          "type": { "code": "PRESUMED_PROFIT_PERIOD", "label": "Período Anterior do Lucro Presumido" },
          "startDate": "2024-01-01",
          "endDate": "2024-12-31",
          "details": null
        }
      ]
    }
  }
}

For a Simples Nacional hybrid company, DETAILED also adds regularIbsStartDate and regularCbsStartDate, described in Response fields. Illustrative response, trimmed to the regime of a company in the CBS regular regime only:

{
  "company": {
    "taxRegime": {
      "updatedAt": "2027-01-27T03:00:00.000Z",
      "type": { "code": "SIMPLES_NACIONAL_HYBRID", "label": "Simples Híbrido" },
      "simplesNacionalStartDate": "2020-06-05",
      "regularIbsStartDate": null,
      "regularCbsStartDate": "2027-01-01",
      "timeline": []
    }
  }
}

Each timeline item has:

FieldContent
typeEntry type, with code and label, listed in Codes and values
startDateStart of the period or date of the event
endDateEnd of the period. For upcoming events, it is always null, as it is for a self-employed cargo transporter period still in progress
detailsA description, such as the reason for a Simples Nacional exclusion, or null

The source of each entry type is in Timeline. Sort the items by startDate to build a timeline.

Search by regime

Search CNPJ filters establishments by the company’s regime:

FilterSelects
company.taxRegime.type.code.inRegime types, separated by commas, such as SIMPLES_NACIONAL_SIMEI or ACTUAL_PROFIT,PRESUMED_PROFIT
company.taxRegime.simplesNacionalStartDate.gte and company.taxRegime.simplesNacionalStartDate.lteStart of the current Simples Nacional period
company.taxRegime.simeiStartDate.gte and company.taxRegime.simeiStartDate.lteStart of the current SIMEI period
company.taxRegime.regularIbsStartDate.gte and company.taxRegime.regularIbsStartDate.lteStart of the current IBS regular regime period
company.taxRegime.regularCbsStartDate.gte and company.taxRegime.regularCbsStartDate.lteStart of the current CBS regular regime period

To find active head offices in SP that opt into Simples Nacional, excluding MEIs:

GET /v2/establishments?company.taxRegime.type.code.in=SIMPLES_NACIONAL,SIMPLES_NACIONAL_HYBRID&type.code.in=HEAD&status.code.in=ACTIVE&address.state.in=SP HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
  • SIMPLES_NACIONAL includes neither hybrid optants nor MEIs. For every Simples Nacional optant, use company.taxRegime.type.code.in=SIMPLES_NACIONAL,SIMPLES_NACIONAL_HYBRID,SIMPLES_NACIONAL_SIMEI, and for hybrid optants only, company.taxRegime.type.code.in=SIMPLES_NACIONAL_HYBRID.
  • The filters use the same regime as Lookup CNPJ, the estimated regime included.
  • SIMPLES_NACIONAL_HYBRID and the regularIbsStartDate and regularCbsStartDate filters select only companies whose IBS or CBS regular regime option was already found by a live query. Until then, a Simples Nacional optant with the option appears as SIMPLES_NACIONAL, as explained in IBS and CBS.
  • Records include company.taxRegime without regularIbsStartDate, regularCbsStartDate and timeline, even when filtered by these dates. To get them, look up the CNPJ with company.taxRegime.view=DETAILED.
  • Since the regime belongs to the company, the filters return all of its establishments. Combine them with type.code.in=HEAD to get one record per company.

Operators, sorting, pagination and the other filters are in CNPJ search.

Codes and values

Base your logic on code. The label is for display only and changes with the language, as explained in Response format.

Regime types

type.codeRegime
ACTUAL_PROFITActual profit
PRESUMED_PROFITPresumed profit
ARBITRATED_PROFITArbitrated profit
SIMPLES_NACIONALSimples Nacional, except hybrid and SIMEI
SIMPLES_NACIONAL_HYBRIDSimples Nacional hybrid: Simples Nacional with the IBS or CBS regular regime
SIMPLES_NACIONAL_SIMEISIMEI, for MEIs
NOT_APPLICABLENot applicable: every establishment closed or void

History entries

timeline[].type.codeEntry
ACTUAL_PROFIT_PERIODPrevious actual profit period
PRESUMED_PROFIT_PERIODPrevious presumed profit period
ARBITRATED_PROFIT_PERIODPrevious arbitrated profit period
SIMPLES_NACIONAL_PERIODPrevious Simples Nacional period
SIMPLES_NACIONAL_INCLUSIONUpcoming Simples Nacional inclusion
SIMPLES_NACIONAL_EXCLUSIONUpcoming Simples Nacional exclusion
SIMEI_PERIODPrevious SIMEI period
SIMEI_EXCLUSIONUpcoming SIMEI exclusion
SIMEI_CARGO_TRANSPORTER_PERIODPeriod as a SIMEI self-employed cargo transporter
REGULAR_IBS_PERIODPrevious IBS regular regime period
REGULAR_IBS_OPTIONUpcoming IBS regular regime option
REGULAR_IBS_OPTION_CANCELLATIONUpcoming cancellation of the IBS regular regime option
REGULAR_CBS_PERIODPrevious CBS regular regime period
REGULAR_CBS_OPTIONUpcoming CBS regular regime option
REGULAR_CBS_OPTION_CANCELLATIONUpcoming cancellation of the CBS regular regime option

Sources and updates

The regime’s sources and how each one is updated are in Sources and freshness. With expand=company.taxRegime, Lookup CNPJ compares the age of the regime with company.taxRegime.maxAge or, without it, with maxAge (default 45d). If the limit is exceeded, the Simples Nacional is queried live before the response. With DETAILED, age counts only from the last live query at the Simples Nacional, so the request can require a live query where SUMMARY would come from cached data.

Limits follow the syntax described in Max age. A separate limit keeps maxAge at the default for the CNPJ registration data and requires a more recent regime:

GET /v2/establishments/37335118000180?expand=company.taxRegime&company.taxRegime.maxAge=7d HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
  • The live query also updates the regime returned by Lookup company and Search CNPJ, which never make live queries.
  • A lower maxAge updates only the opt-ins to Simples Nacional, SIMEI and the IBS and CBS regular regime: the regime declared in the ECF has no live query.

Partial success

Each live query has up to 30 seconds. If the query to the Simples Nacional fails or exceeds that time, the response comes with 206, a partial success:

  • The regime keeps its cached data, which may be older than the requested limit.
  • The regime is not charged. The other resources of the request are returned and charged normally.
  • The response does not say which resource failed. Compare company.taxRegime.updatedAt with the requested limit and repeat the request later.

Important: treat 206 as a success, but do not use an outdated regime for decisions that depend on the current Simples Nacional opt-in, such as issuing an invoice. See Max age.

Certificate

The SIMPLES_NACIONAL_OPTION certificate, the Simples Nacional opt-in certificate, issued by Issue CNPJ dossier, shows as a PDF the company’s status in Simples Nacional and SIMEI as the source had it on the query date. The certificate is not issued or attested by CNPJá and does not replace querying the source where the law requires it, as explained in What a certificate is not. Use it when you need to file the opt-in check as a PDF, for example in an internal audit or when applying a tax rule that depends on the opt-in.

GET /v2/establishments/37335118000180/dossier?certificates=SIMPLES_NACIONAL_OPTION HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
  • The certificate comes from live queries at the Simples Nacional and refers to the company: it is the same for the head office and every branch.
  • The certificate follows the dossier’s maxAge and comes from a live query or from the cache, depending on age.
  • In a 206, the certificate comes in its cached version, or is left out of the PDF when there is none.

The other certificates and the dossier rules are in Certificates.

Billing

With expand=company.taxRegime, Lookup CNPJ meters the regime as a separate resource, live or cached depending on age, on top of the registration data, while Lookup company and Search CNPJ return the regime with no usage of its own. The usage of each operation is in the Metering Rules: Lookup CNPJ, Lookup company, Search CNPJ and, for the SIMPLES_NACIONAL_OPTION certificate, Issue certificates.

Frequent errors

StatusCodeCauseAction
400REQUEST_VALIDATION_FAILEDcompany.taxRegime.view or company.taxRegime.maxAge without company.taxRegime in expand, or a value in the wrong format, including in a company.taxRegime.* filterInclude company.taxRegime in expand and fix the parameter shown in errors
401API_KEY_MISSINGRequest without an API key, or a public request with query parameters, such as expandSend the key in the Authorization header, as explained in First request
404ESTABLISHMENT_NOT_FOUNDThe CNPJ is not registered with the Receita FederalCheck the CNPJ before repeating. The 404 is charged, as shown in the metering rules
404COMPANY_NOT_FOUNDNo company in the cached data has the root sent to Lookup companyLook up one of the company’s CNPJs in Lookup CNPJ, which adds it to the cached data. The 404 is charged as well

The other errors are in Limits and errors.

Use cases

  • Invoicing support: check whether a customer or supplier is listed as a Simples Nacional optant, with type.code set to SIMPLES_NACIONAL, SIMPLES_NACIONAL_HYBRID or SIMPLES_NACIONAL_SIMEI, which can affect, for example, how taxes are shown and withheld. Use a short company.taxRegime.maxAge when the rule depends on the current opt-in, and file the SIMPLES_NACIONAL_OPTION certificate when you need a record of the check.
  • IBS and CBS regular regime: identify Simples Nacional optants that pay IBS, CBS or both under the regular regime, with type.code set to SIMPLES_NACIONAL_HYBRID, and get the start dates with DETAILED. In Search CNPJ, use company.taxRegime.type.code.in=SIMPLES_NACIONAL_HYBRID or the company.taxRegime.regularIbsStartDate.* and company.taxRegime.regularCbsStartDate.* filters.
  • Credit and supplier analysis support: use the regime as one indicator of size and accounting formality. With DETAILED, the history shows Simples Nacional exclusions and regime changes over the years.
  • MEI onboarding: identify an MEI by type.code set to SIMPLES_NACIONAL_SIMEI and apply the rules of your own operation, such as revenue or credit limits.
  • Prospecting: find in Search CNPJ actual profit companies, Simples Nacional optants or MEIs in a region or activity, combined with CNAE, size and incorporation date filters. For every Simples Nacional optant, filter by the three Simples Nacional codes, as shown in Search by regime.
  • Data enrichment: add the regime to your customer base with Lookup company, which returns the regime together with the rest of the company data, from cached data.

In the app

On the platform, the regime appears in the Tax regime section of the record, in the Tax regime filter group of the search and as a resource of exports and bulk lookups, as shown in Where it appears in the app.

Notes

  • Lookup CPF does not accept company.taxRegime: the regime exists only for companies.
  • Request DETAILED only when you need the history, the IBS and CBS regular regime start dates or a recent check of the Simples Nacional hybrid classification, because it tends to require more live queries.
  • The API does not return the company’s gross revenue or its Simples Nacional annex, as stated in the regime’s Limitations.

Informational content that may change without notice. It is not tax, accounting or legal advice, and CNPJá's terms and policies prevail over this page.