Aller au contenu
GET /v1/filter

Filter flags by colour, hue or symbol

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/flags-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/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_..."}
)

Exemple de réponse

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

{
    "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
     
…