Loading
Loading
Retrieve country and international organization flag images in PNG, WEBP, or SVG format with flat or round shapes in five size options.
Returns a binary flag image. The name, type, and shape parameters are required.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
The name, type, and shape parameters are required. format and size are optional.
namerequiredStringCountry code in ISO 3166-1 alpha-2 format for country flags, or organization identifier for organization flags. Example: US, GB, PK.
typerequiredStringType of flag to retrieve. Available values: country, organization.
shaperequiredStringShape of the flag image. Available values: flat, round.
formatoptionalStringdefault: pngImage format. Available values: png, webp, svg.
sizeoptionalStringdefault: 64pxSize of the flag image in pixels. Available values: 16px, 24px, 32px, 48px, 64px. Applicable to PNG and WEBP formats only.
A successful request returns a 200 OK response with binary image data. The Content-Type header reflects the requested format (image/png, image/webp, or image/svg+xml).
(binary)The flag image returned as binary data in the specified format (PNG, WEBP, or SVG). The Content-Type header reflects the format (image/png, image/webp, image/svg+xml).
The API uses standard HTTP status codes to indicate the success or failure of requests. For details about supported status codes and error responses, refer to the HTTP Error Codes.
Invalid country name or code.