GET
Base URL: https://api.openflags.net. All routes are GET-only — see REST API Docs for why.
Health check
cli
GET https://api.openflags.net/api/v1/healthList flags (paginated)
page defaults to 1, page_size defaults to 20 (max 100).
cli
GET https://api.openflags.net/api/v1/flags?page=1&page_size=20Get a single flag by ISO 3166 code
cli
GET https://api.openflags.net/api/v1/flags/:iso_codeReturns 404 {"error": "Flag not found"} if the code doesn't exist.
Search flags
cli
GET https://api.openflags.net/api/v1/search?q=:termList flags for a country
cli
GET https://api.openflags.net/api/v1/countries/:iso/flagsRandom flag (JSON)
cli
GET https://api.openflags.net/api/v1/flags/randomRandom flag image (direct SVG)
cli
GET https://api.openflags.net/api/v1/flags/random/imageStatic flag / coat-of-arms SVG
cli
GET https://api.openflags.net/flags/:country_iso/flag.svg
GET https://api.openflags.net/flags/:country_iso/:region_iso/flag.svgPNG conversion
size in pixels, defaults to 128, max 512.
cli
GET https://api.openflags.net/flags-png/:country/*path?size=128For runnable curl examples of each of these, see Available Routes / cURL.