API Grátis API

Free to Use Varies (check documentation)

Overview

API Grátis is a Brazilian API aggregator that bundles multiple free utility services including CEP (postal code) lookup, CNPJ (company registry) data, vehicle plate information, and more — all under a single authentication token. Most endpoints target Brazilian government data that would otherwise require scraping official sites. The platform is designed for Portuguese-speaking developers building apps that integrate with Brazilian public data.

💡

Beginner Tip

Create a free account at apigratis.com.br to receive a Bearer token for authenticated endpoints; some simpler utilities like CEP lookup may work without authentication. All documentation is in Portuguese, so use a translation tool if needed.

Available Data

API Grátis data via REST API
JSON-formatted response data
Freely accessible without authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from API Grátis",
    "description": "Multiples services and public APIs",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

cep Brazilian postal code (CEP) in 8-digit format.
logradouro Street name for the given postal code.
bairro Neighborhood or district name.
cidade City name associated with the postal code.
uf Two-letter Brazilian state abbreviation, e.g., SP for Sao Paulo.

Implementation Example

const url = "https://apigratis.com.br/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized on all endpoints The Bearer token is missing from the Authorization header.
Add the header Authorization: Bearer YOUR_TOKEN to every request after registering at apigratis.com.br.
CNPJ not found (404 or empty data) The CNPJ number format must be 14 digits without dots, slashes, or dashes.
Strip all non-numeric characters from the CNPJ input before passing it to the endpoint.
CEP lookup returns null fields CEP codes for very new developments or rural areas may not yet be in the database.
Validate the CEP format (8 numeric digits) and show a user-friendly message when the address data is unavailable.

Matrix Score Breakdown

🌐 Reachability 0/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 44ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Development
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →