Get API Key

Welcome to the API key generation guide. This section will walk you through the process of generating an API key for our service. Please follow the instructions carefully to ensure a smooth experience.

How to Generate Your API Key:

After successfully registering, follow these steps to generate your API key:

  1. Sign up at OpenAPI Box by completing the registration process.
  2. Once registered, log in and go to the API Services section of your dashboard.
  3. Search for Country Flag API in the available services.
  4. Select the API that corresponds to your service.
  5. Look for the Generate API Key option and click it.
  6. A confirmation modal will appear. Confirm your action to proceed.
  7. Once confirmed, you will see the API key generated for your account.
  8. Click the Show API Key button to reveal your API key.
  9. Click the Copy button next to the key to copy it to your clipboard.

Country Flag API

Get access to high-quality flag images of all countries. This API provides country flags in various formats and sizes, ideal for integrating flags into your applications, websites, or dashboards.

Endpoints

POST /GET https://openapibox.com/api/countryflagapi/YOUR-API-KEY/get

Parameters
Field Name Description Required Example Values
country The Country ISO Code which country’s flag you want Yes
ISO Code Country Name
AFAfghanistan
AXÅland Islands
ALAlbania
DZAlgeria
ASAmerican Samoa
ADAndorra
AOAngola
AIAnguilla
AQAntarctica
AGAntigua and Barbuda
ARArgentina
AMArmenia
AWAruba
AUAustralia
ATAustria
AZAzerbaijan
BSBahamas
BHBahrain
BDBangladesh
BBBarbados
BYBelarus
BEBelgium
BZBelize
BJBenin
BMBermuda
BTBhutan
BOBolivia
BABosnia and Herzegovina
BWBotswana
BVBouvet Island
BRBrazil
IOBritish Indian Ocean Territory
BNBrunei Darussalam
BGBulgaria
BFBurkina Faso
BIBurundi
CVCabo Verde
KHCambodia
CMCameroon
CACanada
KYCayman Islands
CFCentral African Republic
TDChad
CLChile
CNChina
CXChristmas Island
CCCocos (Keeling) Islands
COColombia
KMComoros
CGCongo
CDCongo (Democratic Republic)
CKCook Islands
CRCosta Rica
CICôte d'Ivoire
HRCroatia
CUCuba
CYCyprus
CZCzech Republic
DKDenmark
DJDjibouti
DMDominica
DODominican Republic
ECEcuador
EGEgypt
SVEl Salvador
GQEquatorial Guinea
EREritrea
EEEstonia
SZEswatini
ETEthiopia
FKFalkland Islands
FOFaroe Islands
FJFiji
FIFinland
FRFrance
GFFrench Guiana
PFFrench Polynesia
TFFrench Southern Territories
GAGabon
GMGambia
GEGeorgia
DEGermany
GHGhana
GIGibraltar
GRGreece
GLGreenland
GDGrenada
GPGuadeloupe
GUGuam
GTGuatemala
GGGuernsey
GNGuinea
GWGuinea-Bissau
GYGuyana
HTHaiti
HMHeard Island and McDonald Islands
VAHoly See
HNHonduras
HKHong Kong
HUHungary
ISIceland
INIndia
IDIndonesia
IRIran
IQIraq
IEIreland
IMIsle of Man
ILIsrael
ITItaly
JMJamaica
JPJapan
JEJersey
JOJordan
KZKazakhstan
KEKenya
KIKiribati
KPKorea (North)
KRKorea (South)
KWKuwait
KGKyrgyzstan
LALaos
LVLatvia
LBLebanon
LSLesotho
LRLiberia
LYLibya
LILiechtenstein
LTLithuania
LULuxembourg
MOMacao
MGMadagascar
MWMalawi
MYMalaysia
MVMaldives
MLMali
MTMalta
MHMarshall Islands
MQMartinique
MRMauritania
MUMauritius
YTMayotte
MXMexico
FMMicronesia
MDMoldova
MCMonaco
MNMongolia
MEMontenegro
MSMontserrat
MAMorocco
MZMozambique
MMMyanmar
NANamibia
NRNauru
NPNepal
NLNetherlands
NCNew Caledonia
NZNew Zealand
NINicaragua
NENiger
NGNigeria
NUNiue
NFNorfolk Island
MKNorth Macedonia
MPNorthern Mariana Islands
NONorway
OMOman
PKPakistan
PWPalau
PSPalestinian Territories
PAPanama
PGPapua New Guinea
PYParaguay
PEPeru
PHPhilippines
PNPitcairn Islands
PLPoland
PTPortugal
PRPuerto Rico
QAQatar
RERéunion
RORomania
RURussia
RWRwanda
BLSaint Barthélemy
SHSaint Helena
KNSaint Kitts and Nevis
LCSaint Lucia
MFSaint Martin
PMSaint Pierre and Miquelon
VCSaint Vincent and the Grenadines
WSSamoa
SMSan Marino
STSao Tome and Principe
SASaudi Arabia
SNSenegal
RSSerbia
SCSeychelles
SLSierra Leone
SGSingapore
SXSint Maarten
SKSlovakia
SISlovenia
SBSolomon Islands
SOSomalia
ZASouth Africa
GSSouth Georgia and the South Sandwich Islands
SSSouth Sudan
ESSpain
LKSri Lanka
SDSudan
SRSuriname
SJSvalbard and Jan Mayen
SESweden
CHSwitzerland
SYSyria
TWTaiwan
TJTajikistan
TZTanzania
THThailand
TLTimor-Leste
TGTogo
TKTokelau
TOTonga
TTTrinidad and Tobago
TNTunisia
TRTurkey
TMTurkmenistan
TCTurks and Caicos Islands
TVTuvalu
UGUganda
UAUkraine
AEUnited Arab Emirates
GBUnited Kingdom
USUnited States
UMUnited States Minor Outlying Islands
UYUruguay
UZUzbekistan
VUVanuatu
VEVenezuela
VNVietnam
VGVirgin Islands (UK)
VIVirgin Islands (US)
WFWallis and Futuna
EHWestern Sahara
YEYemen
ZMZambia
ZWZimbabwe
file_type The type of file (flag image) you want to use. Can be `jpg`, `png`, or `svg`. No
Demo Code Examples

<img src="https://openapibox.com/api/countryflagapi/YOUR-API-KEY/get?country=Country-ISO-CODE" alt="Bangladesh Flag">

        

// Java Example for countryflagapi (Android)
import android.widget.ImageView;
import com.squareup.picasso.Picasso;

public class countryflagapiExample {
    public static void main(String[] args) {
        ImageView imageView = findViewById(R.id.imageView1); // Replace with your ImageView ID
        String apiUrl = "https://openapibox.com/api/countryflagapi/YOUR-API-KEY/get?country=Country-ISO-CODE";

        // Use Picasso library to set the image from the URL
        Picasso.get().load(apiUrl).into(imageView);
    }
}


        

Example Responses


It Will Return The Country's Image


{
  "code": 1111,
  "message": "Country ISO Code Parameter is Required"
}

{
  "code": 1112,
  "message": "Invalid Country ISO Code"
}

{
  "code": 1002,
  "message": "Invalid API Key"
}