/v1/filter
Filter flags by colour, hue or symbol
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
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_..."}
)
Example response
A real response from this endpoint, captured by the latest 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
…