Country Flags Scraper avatar

Country Flags Scraper

Pricing

from $9.00 / 1,000 result items

Go to Apify Store
Country Flags Scraper

Country Flags Scraper

Fetches country flags from FlagCDN and returns each as a row with a country name, ISO 3166-1 alpha-2 code, and direct PNG URLs at selected widths.

Pricing

from $9.00 / 1,000 result items

Rating

0.0

(0)

Developer

Acquisition Automation Co.

Acquisition Automation Co.

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Share

Acquisition Automation Co. Search less. Close more.

๐Ÿณ Country Flags Scraper

One row per country: the ISO 3166-1 alpha-2 code, the country name in the language you pick, and direct PNG flag URLs at the widths you ask for. Run it once, export the table, and stop hand maintaining a flag folder. No API key and no registration.

FlagCDN hosts a flag image for every country at a set of fixed widths. Getting a usable list out of it means guessing URL patterns one country at a time. This Actor builds the whole table for you: code, name and a ready URL per resolution, in a dataset you can export or read straight from the API.

Who uses itWhat they use the table for
๐Ÿง‘โ€๐Ÿ’ป DevelopersFilling a country picker, a pricing page or a shipping form with correct codes and images
๐Ÿ“Š Analysts building dashboardsPutting a flag next to a country row without storing image files
๐ŸŒ Teams working across bordersKeeping one country list with names localized to the interface language
๐Ÿ—‚ Data teamsSeeding a reference table of country codes and names as a one time job

๐Ÿ“‹ What it does

  • ๐Ÿณ Returns every country FlagCDN covers, or only the alpha-2 codes you list.
  • ๐Ÿ”ค Localizes the country name into English, Spanish, French, German, Italian, Portuguese, Chinese, Japanese or Korean.
  • ๐Ÿ“ Gives you a URL per width. Pick any subset of w80, w160, w320 and w640, and each row carries one URL per width you chose.
  • ๐Ÿ–ผ Includes a preview URL at w320, so a spreadsheet can render the flag in a cell.
  • ๐Ÿ”ข You cap the run with a single number.
  • ๐Ÿ’พ Exports to CSV, Excel, JSON or XML, from the run page or the API.

๐Ÿ“Š Output

Every country is one flat row. The fields below are what a flagUrls run returns.

FieldTypeDescription
๐Ÿ”ค countryCodestringISO 3166-1 alpha-2 code, for example AE
๐ŸŒ countryNamestringCountry name in the language requested, for example United Arab Emirates
๐Ÿ—ฃ languagestringThe language the name was returned in, for example en
๐Ÿ–ผ flagPreviewUrlstringDirect PNG link at w320, handy as a single preview column
๐Ÿ“ flagUrlsobjectOne PNG URL per requested width, keyed w80, w160, w320, w640
๐Ÿ•’ scrapedAtstringISO timestamp of collection

Example rows

{
"flagPreviewUrl": "https://flagcdn.com/w320/ad.png",
"countryCode": "AD",
"countryName": "Andorra",
"language": "en",
"flagUrls": {
"w80": "https://flagcdn.com/w80/ad.png",
"w160": "https://flagcdn.com/w160/ad.png",
"w320": "https://flagcdn.com/w320/ad.png",
"w640": "https://flagcdn.com/w640/ad.png"
},
"scrapedAt": "2026-09-14T17:29:19.983Z"
}
{
"flagPreviewUrl": "https://flagcdn.com/w320/ae.png",
"countryCode": "AE",
"countryName": "United Arab Emirates",
"language": "en",
"flagUrls": {
"w80": "https://flagcdn.com/w80/ae.png",
"w160": "https://flagcdn.com/w160/ae.png",
"w320": "https://flagcdn.com/w320/ae.png",
"w640": "https://flagcdn.com/w640/ae.png"
},
"scrapedAt": "2026-09-14T17:29:20.090Z"
}

โœจ Why choose this Actor

What you get
Six fields, every rowCode, name, language, preview, URL set and timestamp. Nothing to clean.
No credentialsFlagCDN is public. No key, no account, no quota.
Names in nine languagesOne input switch, not a translation job.
No image hostingRows carry URLs, so nothing lands in your storage bucket.
You pay per rowNo subscription. Around 250 countries and territories is a one time cost.

๐Ÿš€ How to use it

  1. Create a free Apify account. New accounts start with $5 of credit.
  2. Open the Actor and select Try for free.
  3. Leave countries empty for everything, or list the alpha-2 codes you want.
  4. Pick language, mode and the resolutions you need, and set maxItems.
  5. Select Start, then export from the Dataset tab as CSV, Excel, JSON or XML.

A first run:

{
"maxItems": 10,
"mode": "flagUrls",
"language": "en",
"resolutions": ["w80", "w160", "w320", "w640"]
}

Four countries, names in Spanish, one width:

{
"countries": ["US", "MX", "CO", "ES"],
"mode": "flagUrls",
"language": "es",
"resolutions": ["w320"],
"maxItems": 10
}

โš™๏ธ Input

FieldRequiredDescription
countriesNoISO 3166-1 alpha-2 codes to keep. Empty returns everything available
modeNoflagUrls for the full PNG URL set, or codes for the compact name and code reference. Default flagUrls
languageNoLanguage for the country name: en, es, fr, de, it, pt, zh, ja, ko. Default en
resolutionsNoPNG widths to include, any subset of w80, w160, w320, w640. Applies in flagUrls mode
maxItemsNoHow many flags to collect per run. Default 10

๐Ÿ’ฐ Pricing

Pay per result. No subscription, and no Apify platform usage on top.

Apify planFreeBronzeSilverGoldPlatinumDiamond
Per country row$0.012$0.011$0.010$0.009$0.009$0.009
Rows collectedCost on the Free plan
100$1.20
250$3.00
1,000$12.00

Free plan runs return up to 10 rows as a preview. Any paid Apify plan lifts that to 1,000,000 per run.

๐Ÿ”Œ Integrate with any app

The dataset is available through the Apify API as soon as the run finishes. Use run-sync-get-dataset-items for a one-shot call, webhooks to trigger what happens next, or the Make, Zapier, Airbyte and LangChain integrations listed on the Actor page.

๐Ÿค– Use with an AI agent

Give an agent live access to the flag table over the Model Context Protocol:

$claude mcp add --transport http apify "https://mcp.apify.com?tools=acquistion-automation/flagcdn-country-flags-scraper"

Then ask it in plain language for a country's flag URL and have it read the result back.

โ“ Frequently asked questions

Does a row contain the image itself? No. Each row carries links to PNG files hosted by FlagCDN, so nothing is copied into your storage.

What does codes mode return? The compact name and code reference rather than the full URL set. Use flagUrls when you want a link per width, which is what the example rows above show.

Which widths can I ask for? w80, w160, w320 and w640. Pick any subset in resolutions, and each row gets one URL per width you picked.

How do I get only the countries I care about? List their alpha-2 codes in countries. Leaving it empty returns every country and territory FlagCDN covers.

Do I need a proxy? No. Requests and retries are handled inside the Actor and included in the price.

What can I export? CSV, Excel, JSON and XML from the run page, or JSON straight from the API.

๐Ÿ”— More from Acquisition Automation Co.

About Acquisition Automation Co.

We build automation for people buying businesses. The repetitive part of an acquisition search, checking listings, pulling public records, tracking owners and assets, is work a machine should do, so the buyer's time goes into judging deals instead of collecting them.

We add new Actors regularly. If there is a source you need and do not see here, tell us.

๐Ÿ†˜ Support

Open an issue in the Issues tab of this Actor with your run ID, the input you used, and what you expected to get back.

โš ๏ธ Disclaimer

This Actor is independent and is not affiliated with, endorsed by, or sponsored by FlagCDN. It collects only publicly available data. You are responsible for using that data in compliance with the source's terms of service and applicable law.