CNPJws
English
English
  • Overview
  • Data Models
    • Countries
    • States
    • Cities
    • Legal Natures
    • Company Sizes
    • Economic Activities
    • Corporate Qualifications
    • Partners
    • Simples Nacional and MEI
    • Establishments
    • State Registrations
    • Suframa
    • Tax Regimes
    • Registration Statuses
    • Error Messages
  • Changelog
  • API Reference
    • API - Commercial
      • Consulting CNPJ in the Commercial API
      • Consulting by CNPJ Root
      • Company Search
      • Consulting Monthly Request Consumption
      • Validating Suframa Registration
    • API - Public
      • Consulting CNPJ in the Public API
      • Validating Suframa Registration in the Public API
      • Limitations
  • BLOG
    • What is CNPJ
    • Consult CNPJ with Java
    • Consult CNPJ for Free with Excel
    • Consult CNPJ with PHP
    • Trigger to Consult CNPJ in Protheus
    • Keep Customer and Supplier Records Updated
    • Consult CNPJ with Javascript and Node.JS
    • Consult CNPJ with ADVPL (Protheus)
    • CNPJ.ws Project
Powered by GitBook
On this page

Was this helpful?

  1. API Reference
  2. API - Commercial

Consulting Monthly Request Consumption

PreviousCompany SearchNextValidating Suframa Registration

Last updated 5 months ago

Was this helpful?

In this endpoint, you can check the number of requests made per month. You must send the x_api_token header with the token or pass the token via query string in the URL.

You can also pass the token as a parameter in the URL, example:

https://comercial.cnpj.ws/consumo?token=YOUR_TOKEN

Method: GET

Endpoint: https://comercial.cnpj.ws/consumo

Attention: Queries to this endpoint also count as an API request.

Request Example

We have a package that can help you integrate with JavaScript:

yarn add consultar-cnpj
const consultarCNPJ = require("consultar-cnpj");

async function getCNPJ() {
  const token = "INFORME O SEU TOKEN DE ACESSO";

  const consumo = await consultarCNPJ.consumo(token);
  console.log(consumo);
}

Return Example

Below is an example of the JSON returned:

{
  "filtros_disponiveis": ["ano", "mes"],
  "filtros_aplicados": {},
  "ordenacao": ["ano", "mes"],
  "data": [
    {
      "mes": 9,
      "ano": 2021,
      "quantidade": 1,
      "atualizado_em": "2021-09-29T20:41:55.144Z",
      "cnpjws_usuario_id": "d046b852-XXXX-XXXX-XXXX-8dccdf11d417"
    }
  ]
}

More information
  • Request Example
  • Return Example