Vai al contenuto
GET /v1/filter

Filter flags by colour, hue or symbol

Provalo dal vivo

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

Intestazioni personalizzate (facoltative)
api.oanor.com/flags-api

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

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

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

{
    "data": {
        "count": 4,
        "flags": [
            {
                "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",
                    "botright": "white",
                    "crescent": true,
                    "quarters": 0,
                    "saltires": 0,
                    "triangle": false
                }
            },
            {
                "code": null,
                "emoji": null,
                "country": "Comorro Islands",
                "image_png": null,
                "image_svg": null,
                "attributes": {
                    "bars": 0,
                    "icon": false,
                    "text": false,
                    "stars": 4,
                    "colors": [
                        "green",
                        "white"
                    ],
                    "animate": false,
                    "circles": 0,
                    "colours": 2,
                    "crosses": 0,
                    "mainhue": "green",
                    "stripes": 0,
                    "topleft": "green",
                    "botright": "green",
                    "crescent": true,
                    "quarters": 0,
                    "saltires": 0,
                    "triangle": false
                }
            },
            {
                "code": "MR",
                "emoji": "🇲🇷",
                "country": "Mauritania",
                "image_png": "https://flagcdn.com/w320/mr.png",
                "image_svg": "https://flagcdn.com/mr.svg",
                "attributes": {
                    "bars": 0,
                    "icon": false,
                    "text": false,
                    "stars": 1,
                    "colors": [
                        "green",
                        "gold"
                    ],
                    "animate": false,
                    "circles": 0,
                    "colours": 2,
                    "crosses": 0,
                    "mainhue": "green",
                    "stripes": 0,
                    "topleft": "green",
                    "botright": "green",
                    "crescent": true,
                    "quarters": 0,
                    "saltires": 0,
                    "triangle": false
     
…