cnpj.ai Consulta de CNPJ API

The Consulta de CNPJ API from cnpj.ai — 1 operation(s) for consulta de cnpj.

GitHub OpenAPI

Operations 1

GET /v1/cnpj/{cnpj} Consultar cadastro da empresa #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cnpj-ai:cnpj-ai-consulta-de-cnpj-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cnpj-ai-consulta-de-cnpj-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cnpj Ai Consulta de CNPJ API
  version: 1.0.1
  description: 'Operations tagged Consulta de CNPJ across 2 of this provider''s published API definitions: cnpj-ai-v1-openapi.json, cnpj-ai-v1-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.cnpj.ai
  description: Base URL stated at https://cnpj.ai/api/docs
tags:
- name: Consulta de CNPJ
paths:
  /v1/cnpj/{cnpj}:
    get:
      tags:
      - Consulta de CNPJ
      summary: Consultar cadastro da empresa
      description: Aceita CNPJ básico (8 posições) ou completo (14, com DV válido), sem máscara. Com 8 posições, estabelecimentos contém todos os estabelecimentos da raiz. Com 14, contém somente o estabelecimento solicitado; se não existir, retorna 404. Empresa, sócios e Simples/MEI são dados da empresa em ambos os casos. Datas ISO 8601; ausências de datas são null. Cada chamada admitida consome uma unidade, inclusive 400, 404 e falhas posteriores à admissão.
      operationId: consultar_v1_cnpj__cnpj__get
      security:
      - ChaveAPI: []
      parameters:
      - name: cnpj
        in: path
        required: true
        schema:
          type: string
          title: Cnpj
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespostaCNPJ'
        '400':
          description: CNPJ inválido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespostaErro'
        '401':
          description: Chave inválida ou revogada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespostaErro'
        '404':
          description: CNPJ não encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespostaErro'
        '429':
          description: Limite da conta excedido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespostaErro'
        '503':
          description: Serviço indisponível
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespostaErro'
components:
  schemas:
    Empresa:
      properties:
        razao_social:
          type: string
          title: Razao Social
        natureza_juridica:
          $ref: '#/components/schemas/Codigo'
        qualificacao_responsavel:
          $ref: '#/components/schemas/Codigo'
        capital_social:
          anyOf:
          - type: number
          - type: 'null'
          title: Capital Social
        porte:
          $ref: '#/components/schemas/Codigo'
        ente_federativo_responsavel:
          type: string
          title: Ente Federativo Responsavel
      type: object
      required:
      - razao_social
      - natureza_juridica
      - qualificacao_responsavel
      - capital_social
      - porte
      - ente_federativo_responsavel
      title: Empresa
    Endereco:
      properties:
        tipo_logradouro:
          type: string
          title: Tipo Logradouro
        logradouro:
          type: string
          title: Logradouro
        numero:
          type: string
          title: Numero
        complemento:
          type: string
          title: Complemento
        bairro:
          type: string
          title: Bairro
        cep:
          type: string
          title: Cep
        uf:
          type: string
          title: Uf
        municipio:
          type: string
          title: Municipio
      type: object
      required:
      - tipo_logradouro
      - logradouro
      - numero
      - complemento
      - bairro
      - cep
      - uf
      - municipio
      title: Endereco
    Metadados:
      properties:
        versao:
          type: string
          title: Versao
          default: v1
        competencia:
          anyOf:
          - type: string
          - type: 'null'
          title: Competencia
        requisicao_id:
          type: string
          format: uuid
          title: Requisicao Id
      type: object
      required:
      - competencia
      - requisicao_id
      title: Metadados
    Socio:
      properties:
        nome:
          type: string
          title: Nome
        cpf_cnpj:
          type: string
          title: Cpf Cnpj
        tipo:
          type: string
          title: Tipo
        qualificacao:
          $ref: '#/components/schemas/Codigo'
        data_entrada:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Data Entrada
        faixa_etaria:
          type: string
          title: Faixa Etaria
        representante_legal:
          anyOf:
          - $ref: '#/components/schemas/Representante'
          - type: 'null'
      type: object
      required:
      - nome
      - cpf_cnpj
      - tipo
      - qualificacao
      - data_entrada
      - faixa_etaria
      - representante_legal
      title: Socio
    DetalheErro:
      properties:
        codigo:
          type: string
          title: Codigo
        mensagem:
          type: string
          title: Mensagem
      type: object
      required:
      - codigo
      - mensagem
      title: DetalheErro
    Representante:
      properties:
        nome:
          type: string
          title: Nome
        qualificacao:
          $ref: '#/components/schemas/Codigo'
      type: object
      required:
      - nome
      - qualificacao
      title: Representante
    DadosEmpresa:
      properties:
        cnpj_basico:
          type: string
          title: Cnpj Basico
        empresa:
          anyOf:
          - $ref: '#/components/schemas/Empresa'
          - type: 'null'
        estabelecimentos:
          items:
            $ref: '#/components/schemas/Estabelecimento'
          type: array
          title: Estabelecimentos
        socios:
          items:
            $ref: '#/components/schemas/Socio'
          type: array
          title: Socios
        simples:
          anyOf:
          - $ref: '#/components/schemas/Simples'
          - type: 'null'
      type: object
      required:
      - cnpj_basico
      - empresa
      - estabelecimentos
      - socios
      - simples
      title: DadosEmpresa
    Estabelecimento:
      properties:
        cnpj:
          type: string
          title: Cnpj
        cnpj_ordem:
          type: string
          title: Cnpj Ordem
        matriz_filial:
          type: string
          title: Matriz Filial
        nome_fantasia:
          type: string
          title: Nome Fantasia
        situacao_cadastral:
          $ref: '#/components/schemas/Codigo'
        data_situacao_cadastral:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Data Situacao Cadastral
        motivo_situacao_cadastral:
          $ref: '#/components/schemas/Codigo'
        data_inicio_atividade:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Data Inicio Atividade
        cnae_principal:
          $ref: '#/components/schemas/Codigo'
        cnae_secundaria:
          items:
            $ref: '#/components/schemas/Codigo'
          type: array
          title: Cnae Secundaria
        endereco:
          $ref: '#/components/schemas/Endereco'
        contato:
          $ref: '#/components/schemas/Contato'
      type: object
      required:
      - cnpj
      - cnpj_ordem
      - matriz_filial
      - nome_fantasia
      - situacao_cadastral
      - data_situacao_cadastral
      - motivo_situacao_cadastral
      - data_inicio_atividade
      - cnae_principal
      - cnae_secundaria
      - endereco
      - contato
      title: Estabelecimento
    Contato:
      properties:
        telefone1:
          type: string
          title: Telefone1
        telefone2:
          type: string
          title: Telefone2
        email:
          type: string
          title: Email
      type: object
      required:
      - telefone1
      - telefone2
      - email
      title: Contato
    RespostaCNPJ:
      properties:
        dados:
          $ref: '#/components/schemas/DadosEmpresa'
        meta:
          $ref: '#/components/schemas/Metadados'
      type: object
      required:
      - dados
      - meta
      title: RespostaCNPJ
    Codigo:
      properties:
        codigo:
          type: string
          title: Codigo
        descricao:
          type: string
          title: Descricao
      type: object
      required:
      - codigo
      - descricao
      title: Codigo
    RespostaErro:
      properties:
        erro:
          $ref: '#/components/schemas/DetalheErro'
        requisicao_id:
          type: string
          format: uuid
          title: Requisicao Id
      type: object
      required:
      - erro
      - requisicao_id
      title: RespostaErro
    Simples:
      properties:
        opcao_simples:
          type: boolean
          title: Opcao Simples
        data_opcao_simples:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Data Opcao Simples
        data_exclusao_simples:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Data Exclusao Simples
        opcao_mei:
          type: boolean
          title: Opcao Mei
        data_opcao_mei:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Data Opcao Mei
        data_exclusao_mei:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Data Exclusao Mei
      type: object
      required:
      - opcao_simples
      - data_opcao_simples
      - data_exclusao_simples
      - opcao_mei
      - data_opcao_mei
      - data_exclusao_mei
      title: Simples
  securitySchemes:
    ChaveAPI:
      type: http
      scheme: bearer
x-refined-from:
- cnpj-ai-v1-openapi.json
- cnpj-ai-v1-openapi.yml