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:
| Operation | Field | History and IBS/CBS dates | Updates |
|---|---|---|---|
| Lookup CNPJ | company., with expand=company. | With company. | A live query or cached data, depending on age |
| Lookup company | taxRegime, always present | No | Cached data only |
| Search CNPJ | company. in each record, and in the company. filters | No | Cached 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. is absent from the response.
GET /v2/establishments/37335118000180?expand=company.taxRegime HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY | Parameter | Values | Effect |
|---|---|---|
company. | SUMMARY (default) or DETAILED | SUMMARY 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. | A duration, such as 1d or 30d | Max age accepted for the regime only, instead of maxAge |
- Both are accepted only with
company.intaxRegime expand. Without it, the request is rejected with400REQUEST_, andVALIDATION_ FAILED errorsincludes an item with theDEPENDENCIEScode, as shown in Limits and errors. company.can be requested together with other resources, as intaxRegime 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. in each Search CNPJ record:
| Field | Content |
|---|---|
updatedAt | Date 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 |
type | Regime type, with code and label, described in Codes and values |
simplesNacionalStartDate | Start of the current Simples Nacional period, or null. Present only when type. is SIMPLES_, SIMPLES_ or SIMPLES_; for other regimes, it is absent |
simeiStartDate | Start of the current SIMEI period, or null. Present only when type. is SIMPLES_; for other regimes, it is absent |
regularIbsStartDate | Start of the current IBS regular regime period, or null. Present only when type. is SIMPLES_, and only in Lookup CNPJ with company. |
regularCbsStartDate | Start of the current CBS regular regime period, or null. Present only when type. is SIMPLES_, and only in Lookup CNPJ with company. |
timeline | History of previous periods and upcoming events. Present only in Lookup CNPJ with company. |
- An MEI has
type.set tocode SIMPLES_, and a Simples Nacional hybrid optant hasNACIONAL_ SIMEI SIMPLES_: neither hasNACIONAL_ HYBRID SIMPLES_. To cover every Simples Nacional optant, check all three codes, as explained in MEI and hybrid Simples.NACIONAL - When present,
simplesNacionalStartDateandsimeiStartDatecan benull, as with an estimated MEI. Base the opt-in check ontype., not on the dates.code - When present,
regularIbsStartDateorregularCbsStartDatecan benullif 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.or with the Simples Nacional certificate. When the Simples Nacional hybrid classification is decisive, also usetaxRegime. maxAge company., where age counts only from the last live query at the Simples Nacional.taxRegime. view=DETAILED
Regime history
With company., Lookup CNPJ adds company., 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:
| Field | Content |
|---|---|
type | Entry type, with code and label, listed in Codes and values |
startDate | Start of the period or date of the event |
endDate | End of the period. For upcoming events, it is always null, as it is for a self-employed cargo transporter period still in progress |
details | A 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:
| Filter | Selects |
|---|---|
company. | Regime types, separated by commas, such as SIMPLES_ or ACTUAL_ |
company. and company. | Start of the current Simples Nacional period |
company. and company. | Start of the current SIMEI period |
company. and company. | Start of the current IBS regular regime period |
company. and company. | Start 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_includes neither hybrid optants nor MEIs. For every Simples Nacional optant, useNACIONAL company., and for hybrid optants only,taxRegime. type. code. in=SIMPLES_ NACIONAL,SIMPLES_ NACIONAL_ HYBRID,SIMPLES_ NACIONAL_ SIMEI company..taxRegime. type. code. in=SIMPLES_ NACIONAL_ HYBRID - The filters use the same regime as Lookup CNPJ, the estimated regime included.
SIMPLES_and theNACIONAL_ HYBRID regularIbsStartDateandregularCbsStartDatefilters 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 asSIMPLES_, as explained in IBS and CBS.NACIONAL - Records include
company.withouttaxRegime regularIbsStartDate,regularCbsStartDateandtimeline, even when filtered by these dates. To get them, look up the CNPJ withcompany..taxRegime. view=DETAILED - Since the regime belongs to the company, the filters return all of its establishments. Combine them with
type.to get one record per company.code. in=HEAD
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. | Regime |
|---|---|
ACTUAL_ | Actual profit |
PRESUMED_ | Presumed profit |
ARBITRATED_ | Arbitrated profit |
SIMPLES_ | Simples Nacional, except hybrid and SIMEI |
SIMPLES_ | Simples Nacional hybrid: Simples Nacional with the IBS or CBS regular regime |
SIMPLES_ | SIMEI, for MEIs |
NOT_ | Not applicable: every establishment closed or void |
History entries
timeline[]. | Entry |
|---|---|
ACTUAL_ | Previous actual profit period |
PRESUMED_ | Previous presumed profit period |
ARBITRATED_ | Previous arbitrated profit period |
SIMPLES_ | Previous Simples Nacional period |
SIMPLES_ | Upcoming Simples Nacional inclusion |
SIMPLES_ | Upcoming Simples Nacional exclusion |
SIMEI_ | Previous SIMEI period |
SIMEI_ | Upcoming SIMEI exclusion |
SIMEI_ | Period as a SIMEI self-employed cargo transporter |
REGULAR_ | Previous IBS regular regime period |
REGULAR_ | Upcoming IBS regular regime option |
REGULAR_ | Upcoming cancellation of the IBS regular regime option |
REGULAR_ | Previous CBS regular regime period |
REGULAR_ | Upcoming CBS regular regime option |
REGULAR_ | Upcoming 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., Lookup CNPJ compares the age of the regime with company. 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
maxAgeupdates 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.with the requested limit and repeat the request later.taxRegime. updatedAt
Important: treat
206as 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_ 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
maxAgeand 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., 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_ certificate, Issue certificates.
Frequent errors
| Status | Code | Cause | Action |
|---|---|---|---|
400 | REQUEST_ | company. or company. without company. in expand, or a value in the wrong format, including in a company. filter | Include company. in expand and fix the parameter shown in errors |
401 | API_ | Request without an API key, or a public request with query parameters, such as expand | Send the key in the Authorization header, as explained in First request |
404 | ESTABLISHMENT_ | The CNPJ is not registered with the Receita Federal | Check the CNPJ before repeating. The 404 is charged, as shown in the metering rules |
404 | COMPANY_ | No company in the cached data has the root sent to Lookup company | Look 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.set tocode SIMPLES_,NACIONAL SIMPLES_orNACIONAL_ HYBRID SIMPLES_, which can affect, for example, how taxes are shown and withheld. Use a shortNACIONAL_ SIMEI company.when the rule depends on the current opt-in, and file thetaxRegime. maxAge SIMPLES_certificate when you need a record of the check.NACIONAL_ OPTION - IBS and CBS regular regime: identify Simples Nacional optants that pay IBS, CBS or both under the regular regime, with
type.set tocode SIMPLES_, and get the start dates withNACIONAL_ HYBRID DETAILED. In Search CNPJ, usecompany.or thetaxRegime. type. code. in=SIMPLES_ NACIONAL_ HYBRID company.andtaxRegime. regularIbsStartDate. * company.filters.taxRegime. regularCbsStartDate. * - 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.set tocode SIMPLES_and apply the rules of your own operation, such as revenue or credit limits.NACIONAL_ SIMEI - 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.: the regime exists only for companies.taxRegime - Request
DETAILEDonly 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.