Country Flags API
DataMAINTAINED1 token / call

Country Flags API

ISO 3166 codes, localized country names, flag emoji and SVG flag URLs for every country

Flags and identity data for every country: ISO 3166-1 codes (alpha-2, alpha-3, numeric), localized country name, the flag emoji, and an SVG flag image URL. Filter by region and localize names with a single query param.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 1 token per call, so the free plan covers about 500 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "name": "United States",
  "code": "US",
  "alpha3": "USA",
  "numeric": "840",
  "region": "Americas",
  "emoji": "๐Ÿ‡บ๐Ÿ‡ธ",
  "flag_svg": "https://dataandapis.com/flags/us.svg"
}
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform โ€” anime, finance, sports, and more.

Use cases for Country Flags API

  • Show the right flag next to a country, phone prefix or language selector.

  • Convert between alpha-2, alpha-3 and numeric ISO codes in data pipelines.

  • Display country names in the user's language with one query parameter.

  • Filter countries by region for forms and reports.

Country Flags API endpoints

Every endpoint with its parameters and a real example response.

GETGet Flag By Code

https://api-country-flags.dataandapis.com/v1/flags/{code}

Path parameters

ParameterExample
codeUSRequired

Query parameters

ParameterExample
langfrOptional

Example request

curl "https://api-country-flags.dataandapis.com/v1/flags/US?lang=fr" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "name": "United States",
  "code": "US",
  "alpha3": "USA",
  "numeric": "840",
  "region": "Americas",
  "emoji": "๐Ÿ‡บ๐Ÿ‡ธ",
  "flag_svg": "https://dataandapis.com/flags/us.svg"
}

GETList Flags

https://api-country-flags.dataandapis.com/v1/flags

Query parameters

ParameterExample
langenOptional
regionEuropeOptional

Example request

curl "https://api-country-flags.dataandapis.com/v1/flags?lang=en&region=Europe" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "count": 250,
  "countries": [
    {
      "name": "United States",
      "code": "US",
      "alpha3": "USA",
      "numeric": "840",
      "region": "Americas",
      "emoji": "๐Ÿ‡บ๐Ÿ‡ธ",
      "flag_svg": "https://dataandapis.com/flags/us.svg"
    },
    {
      "name": "United Kingdom",
      "code": "GB",
      "alpha3": "GBR",
      "numeric": "826",
      "region": "Europe",
      "emoji": "๐Ÿ‡ฌ๐Ÿ‡ง",
      "flag_svg": "https://dataandapis.com/flags/gb.svg"
    }
  ]
}

Where the data comes from

Source
ISO 3166-1 reference table, Unicode CLDR names and self-hosted flag SVGs.
Freshness
Static reference data; updated with ISO changes.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
2endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses โ€” auto-completion in your IDE
  • Tracks the API in lockstep โ€” new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://api-country-flags.dataandapis.com/v1/flags/{code}',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

Country Flags API ยท X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key

Query Parameters

lang(Optional)

Path Parameters

code
import axios from 'axios';

const url = 'https://api-country-flags.dataandapis.com/v1/flags/{code}';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time โ€” we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales โ†’

Questions about Country Flags API

Ship Country Flags API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.