# Pesquisa de CEP

> Valide endereços por CEP. Retorna os dados de endereço correspondentes ao CEP informado.

- **Consulta:** `cep`
- **Categoria:** Utilidades
- **Preço:** R$ 0,03 por consulta
- **Endpoint:** `GET https://app.fontedata.com/api/v1/consulta/cep`
- **Autenticação:** header `X-API-Key`
- **Página:** https://fontedata.com/docs/utilidades/cep

## Requisição

### cURL

```bash
curl -H "X-API-Key: SUA_CHAVE" \
  "https://app.fontedata.com/api/v1/consulta/cep?cep=01310100"
```

### Python

```python
import requests

resp = requests.get(
    "https://app.fontedata.com/api/v1/consulta/cep",
    params={"cep": "01310100"},
    headers={"X-API-Key": "SUA_CHAVE"},
    timeout=60,
)
resp.raise_for_status()
print(resp.json())
```

### Node.js

```javascript
const url = new URL("https://app.fontedata.com/api/v1/consulta/cep");

url.search = new URLSearchParams({
  "cep": "01310100"
}).toString();

const resp = await fetch(url, {
  method: "GET",
  headers: { "X-API-Key": "SUA_CHAVE" }
});

if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
```

## Parâmetros

| Nome | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| `cep` | texto | sim | CEP a ser consultado, com 8 dígitos numéricos. | `01310100` |

## Resposta

### Exemplo de resposta

```json
{
  "uf": "string",
  "cep": "string",
  "city": "string",
  "neighborhood": "string",
  "street_address": "string"
}
```

---

Página em HTML: https://fontedata.com/docs/utilidades/cep
Catálogo completo: https://fontedata.com/docs
OpenAPI (JSON): https://app.fontedata.com/api/v1/openapi.json
Conectar via MCP: https://fontedata.com/docs/mcp
