Aller au contenu
GET /v1/list

List all countries

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/gini-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/gini-api/v1/list" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/gini-api/v1/list", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/gini-api/v1/list");
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/gini-api/v1/list",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "count": 50,
        "total": 171,
        "countries": [
            {
                "max": 34.6,
                "min": 27,
                "code": "AL",
                "emoji": "🇦🇱",
                "alpha3": "ALB",
                "latest": {
                    "gini": 29.4,
                    "year": 2020
                },
                "country": "Albania",
                "history": [
                    {
                        "gini": 27,
                        "year": 1996
                    },
                    {
                        "gini": 31.7,
                        "year": 2002
                    },
                    {
                        "gini": 30.6,
                        "year": 2005
                    },
                    {
                        "gini": 30,
                        "year": 2008
                    },
                    {
                        "gini": 29,
                        "year": 2012
                    },
                    {
                        "gini": 34.6,
                        "year": 2014
                    },
                    {
                        "gini": 32.8,
                        "year": 2015
                    },
                    {
                        "gini": 33.7,
                        "year": 2016
                    },
                    {
                        "gini": 33.1,
                        "year": 2017
                    },
                    {
                        "gini": 30.1,
                        "year": 2018
                    },
                    {
                        "gini": 30.1,
                        "year": 2019
                    },
                    {
                        "gini": 29.4,
                        "year": 2020
                    }
                ]
            },
            {
                "max": 37.4,
                "min": 27.6,
                "code": "DZ",
                "emoji": "🇩🇿",
                "alpha3": "DZA",
                "latest": {
                    "gini": 27.6,
                    "year": 2011
                },
                "country": "Algeria",
                "history": [
                    {
                        "gini": 37.4,
                        "year": 1988
                    },
                    {
                        "gini": 35.3,
                        "year": 1995
                    },
                    {
                        "gini": 27.6,
                        "year": 2011
                    }
                ]
            },
            {
                "max": 51.9,
                "min": 42.7,
                "code": "AO",
                "emoji": "🇦🇴",
                "alpha3": "AGO",
                "latest": {
                    "gini": 51.3,
                    "year": 2018
                },
                "country": "Angola",
                "history": [
                    {

…