Vai al contenuto
GET /v1/regions

Brazil federative units (states)

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/brazil-stats-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/brazil-stats-api/v1/regions" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/brazil-stats-api/v1/regions", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/brazil-stats-api/v1/regions");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/brazil-stats-api/v1/regions",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "count": 27,
        "source": "IBGE localidades",
        "states": [
            {
                "id": 12,
                "name": "Acre",
                "region": {
                    "id": 1,
                    "name": "Norte",
                    "acronym": "N"
                },
                "acronym": "AC"
            },
            {
                "id": 27,
                "name": "Alagoas",
                "region": {
                    "id": 2,
                    "name": "Nordeste",
                    "acronym": "NE"
                },
                "acronym": "AL"
            },
            {
                "id": 16,
                "name": "Amapá",
                "region": {
                    "id": 1,
                    "name": "Norte",
                    "acronym": "N"
                },
                "acronym": "AP"
            },
            {
                "id": 13,
                "name": "Amazonas",
                "region": {
                    "id": 1,
                    "name": "Norte",
                    "acronym": "N"
                },
                "acronym": "AM"
            },
            {
                "id": 29,
                "name": "Bahia",
                "region": {
                    "id": 2,
                    "name": "Nordeste",
                    "acronym": "NE"
                },
                "acronym": "BA"
            },
            {
                "id": 23,
                "name": "Ceará",
                "region": {
                    "id": 2,
                    "name": "Nordeste",
                    "acronym": "NE"
                },
                "acronym": "CE"
            },
            {
                "id": 53,
                "name": "Distrito Federal",
                "region": {
                    "id": 5,
                    "name": "Centro-Oeste",
                    "acronym": "CO"
                },
                "acronym": "DF"
            },
            {
                "id": 32,
                "name": "Espírito Santo",
                "region": {
                    "id": 3,
                    "name": "Sudeste",
                    "acronym": "SE"
                },
                "acronym": "ES"
            },
            {
                "id": 52,
                "name": "Goiás",
                "region": {
                    "id": 5,
                    "name": "Centro-Oeste",
                    "acronym": "CO"
                },
                "acronym": "GO"
            },
            {
                "id": 21,
                "name": "Maranhão",
                "region": {
                    "id": 2,
                    "name": "Nordeste",
                    "acronym": "NE"
                },
                "acronym": "MA"
            },
            {
                "id": 51,
                "name": "Mato Grosso",
                "region": {
                    "id": 5,
                    "name":
…