Ir al contenido
GET /v1/list

List all flags

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/flags-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

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

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "data": {
        "count": 50,
        "flags": [
            {
                "code": "AF",
                "emoji": "🇦🇫",
                "country": "Afghanistan",
                "image_png": "https://flagcdn.com/w320/af.png",
                "image_svg": "https://flagcdn.com/af.svg",
                "attributes": {
                    "bars": 0,
                    "icon": true,
                    "text": false,
                    "stars": 1,
                    "colors": [
                        "red",
                        "green",
                        "gold",
                        "white",
                        "black"
                    ],
                    "animate": false,
                    "circles": 0,
                    "colours": 5,
                    "crosses": 0,
                    "mainhue": "green",
                    "stripes": 3,
                    "topleft": "black",
                    "botright": "green",
                    "crescent": false,
                    "quarters": 0,
                    "saltires": 0,
                    "triangle": false
                }
            },
            {
                "code": "AL",
                "emoji": "🇦🇱",
                "country": "Albania",
                "image_png": "https://flagcdn.com/w320/al.png",
                "image_svg": "https://flagcdn.com/al.svg",
                "attributes": {
                    "bars": 0,
                    "icon": false,
                    "text": false,
                    "stars": 1,
                    "colors": [
                        "red",
                        "gold",
                        "black"
                    ],
                    "animate": true,
                    "circles": 0,
                    "colours": 3,
                    "crosses": 0,
                    "mainhue": "red",
                    "stripes": 0,
                    "topleft": "red",
                    "botright": "red",
                    "crescent": false,
                    "quarters": 0,
                    "saltires": 0,
                    "triangle": false
                }
            },
            {
                "code": "DZ",
                "emoji": "🇩🇿",
                "country": "Algeria",
                "image_png": "https://flagcdn.com/w320/dz.png",
                "image_svg": "https://flagcdn.com/dz.svg",
                "attributes": {
                    "bars": 2,
                    "icon": false,
                    "text": false,
                    "stars": 1,
                    "colors": [
                        "red",
                        "green",
                        "white"
                    ],
                    "animate": false,
                    "circles": 0,
                    "colours": 3,
                    "crosses": 0,
                    "mainhue": "green",
                    "stripes": 0,
                    "topleft": "green",
                    "bot
…