Overview

API Grátis offers a suite of APIs for accessing public Brazilian datasets, enabling developers to integrate various types of information directly into their software applications. The platform is designed for scenarios requiring real-time data lookups, such as validating personal and business information, automating data retrieval for Brazilian entities, and enriching application data. Core offerings include consultations for CPF (Cadastro de Pessoas Físicas), CNPJ (Cadastro Nacional da Pessoa Jurídica), CEP (Código de Endereçamento Postal), and vehicle license plates (placa).

The service targets developers and technical buyers who need to incorporate official or publicly available Brazilian data into their systems. Use cases range from e-commerce platforms validating customer addresses and tax IDs, financial services performing identity verification, to logistics companies optimizing delivery routes based on postal codes. The API provides structured data responses, facilitating programmatic integration with minimal parsing requirements.

API Grátis is built on a RESTful architecture, utilizing standard HTTP methods for requests and JSON for responses. This approach aligns with common web API design principles, making it accessible for developers familiar with modern web development practices. The platform provides code examples in multiple programming languages, including Node.js and PHP, to assist with initial setup and integration. Adherence to data protection regulations like GDPR is noted, addressing concerns regarding the handling of personal data.

The service's utility is particularly pronounced in operations within Brazil, where accurate and current public data is essential for compliance, business operations, and service delivery. By abstracting the complexities of accessing disparate public databases, API Grátis aims to streamline development efforts for applications requiring this type of localized data. For instance, an application might use the CEP consultation to auto-fill address fields, or the CNPJ lookup to verify a business's legal status. The availability of a free tier allows for initial testing and integration before committing to a paid plan, supporting a tiered approach to usage based on request volume.

Alternative services like BrasilAPI also offer access to public Brazilian data, demonstrating a market need for such aggregation services. The choice between services often depends on specific endpoint availability, pricing models, and developer experience. API Grátis positions itself as a direct solution for specific public data consultation needs within the Brazilian context.

Key features

  • Consult CPF: Access public information associated with a Cadastro de Pessoas Físicas number.
  • Consult CNPJ: Retrieve public data for a Cadastro Nacional da Pessoa Jurídica number, including company status and address.
  • Consult CEP: Look up address details based on a Código de Endereçamento Postal (Brazilian postal code).
  • Consult License Plate (Placa): Obtain public information related to a Brazilian vehicle license plate.
  • Consult FIPE Table: Access values from the Fundação Instituto de Pesquisas Econômicas (FIPE) table for vehicle pricing.
  • Consult NCM: Retrieve details for Nomenclatura Comum do Mercosul (NCM) codes, used in customs and trade.
  • Consult Holidays: Get information on national and regional holidays in Brazil.
  • RESTful API: Utilizes standard HTTP methods and JSON responses for data exchange.
  • Multi-language SDKs: Provides client libraries for Node.js, PHP, Python, Ruby, Go, Java, and C#.

Pricing

API Grátis offers a free tier for initial development and testing, with paid plans scaled by request volume. Pricing is subject to change; the table below reflects information as of May 2026. For the most current details, refer to the API Grátis pricing page.

Plan Monthly Requests Price (R$/month) Features
Free Up to 300 R$ 0.00 Basic access for testing and low-volume usage.
Basic Up to 5,000 R$ 49.90 Increased request limits for small applications.
Pro Up to 15,000 R$ 99.90 Suitable for growing applications with moderate traffic.
Premium Up to 50,000 R$ 249.90 Designed for high-volume applications and businesses.
Enterprise Custom Custom Tailored solutions for large-scale operations with specific needs.

Common integrations

API Grátis can be integrated into various application types and platforms. The primary method of integration is through direct HTTP requests to its RESTful endpoints. The provided SDKs facilitate integration into common programming environments.

  • Web Applications: Integrate into front-end or back-end web applications built with frameworks like Node.js (Express), PHP (Laravel), Python (Django/Flask), or Ruby on Rails for real-time data validation and enrichment.
  • CRM Systems: Connect with CRM platforms like Salesforce or Freshworks CRM to validate customer addresses (CEP) or business details (CNPJ) during lead entry or account management.
  • E-commerce Platforms: Use CEP consultation during checkout for address auto-completion and fraud prevention.
  • Logistics and Delivery Systems: Enhance route planning and delivery verification by integrating CEP and license plate data.
  • Financial Services: Incorporate CPF and CNPJ lookups for identity verification and background checks, adhering to compliance requirements.
  • Data Automation Workflows: Utilize platforms like Tray.io or Zapier to automate data retrieval and updates across various systems based on API Grátis data.

Alternatives

  • BrasilAPI: An open-source project offering a collection of APIs for various Brazilian public data sources.
  • Open Source Brazil APIs: A GitHub repository aggregating different open-source initiatives for Brazilian public data.
  • ViaCEP: A specialized API focused primarily on Brazilian postal code (CEP) lookup.

Getting started

To begin using API Grátis, developers typically register for an API key and then make HTTP requests to the desired endpoints. The following Node.js example demonstrates how to make a simple request to consult a CEP (postal code). This example assumes an API key is available and replaces YOUR_API_KEY with an actual key.

const fetch = require('node-fetch');

async function consultCEP(cep) {
  const apiKey = 'YOUR_API_KEY'; // Replace with your actual API key
  const url = `https://apigratis.com.br/api/v1/cep/${cep}?apikey=${apiKey}`;

  try {
    const response = await fetch(url);
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    const data = await response.json();
    console.log(`CEP ${cep} data:`, data);
    return data;
  } catch (error) {
    console.error(`Error consulting CEP ${cep}:`, error);
  }
}

// Example usage:
consultCEP('01001000'); // Example CEP for São Paulo downtown

This code snippet initializes a request to the CEP endpoint, includes the API key as a query parameter, and logs the JSON response. Developers should refer to the API Grátis documentation for specific endpoint details, request parameters, and response structures for other services like CPF or CNPJ consultation.