Back to API Ninjas in Excel
SheetXAI logo
API Ninjas logo
API Ninjas · Excel Guide

Bulk-Enrich a Country List With GDP, Unemployment, and Population Data in Excel

The Scenario

You are an economist at a research firm. You have 80 country names in column A of an Excel workbook, the Countries tab. The model requires current GDP, unemployment rate, and population for each country. The research director wants a first draft by Thursday. It is Monday morning.

The bad version of this week:

  • You download a World Bank GDP CSV, find 200+ countries, decipher the column structure
  • You VLOOKUP your 80 countries — twelve don't match the naming convention
  • You go to a separate IMF source for unemployment because the World Bank data has gaps
  • By Tuesday you have GDP for 68 countries and unemployment for 51
  • The model goes in Thursday with 29 countries marked "N/A — data pending."

The clean version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Excel workbook. It reads your country list and calls the API Ninjas country data endpoints for each row, writing GDP, unemployment, and population back to the workbook.

Open the SheetXAI sidebar and type:

For each country name in column A of the Countries tab, fetch GDP, unemployment rate, and population from API Ninjas and write the values into columns B, C, and D.

SheetXAI calls the API Ninjas endpoint for each country and writes three fields per row. Missing data is flagged rather than left silently blank.

What You Get

A complete country dataset ready for the risk scoring model:

  • Column B: GDP — in USD
  • Column C: Unemployment rate — as a percentage
  • Column D: Population — current estimate

Eighty countries, three fields each, one prompt. No CSV downloads, no naming convention reconciliation.

What If the Data Is Not Quite Ready

Country research workbooks accumulate edge cases. SheetXAI handles them inline.

When country names don't match the API standard

Your workbook uses "USA" and "UK" but the API expects "United States" and "United Kingdom."

Normalize country names in column A of the Countries tab to API Ninjas standard format and write into column B. Then fetch GDP, unemployment, and population into columns C, D, and E.

When you want population projections alongside current figures

The model needs a 5-year growth estimate, not just current headcount.

Look up current and forecast population figures for every country in the Countries tab and add 2026 population into column E, growth rate into column F, and urban population percentage into column G.

When you want to rank countries by GDP for a tiering model

The risk model groups countries into three tiers.

After filling GDP data in column B, sort by column B descending. Add a "Tier" column at column E: "Tier 1" for GDP above $1 trillion, "Tier 2" for $100B to $1T, "Tier 3" for below $100B.

When the full model prep run is one prompt

Eighty countries, normalize naming, GDP, unemployment, population, growth rate, urban percentage, GDP tier classification, and sort by GDP.

Normalize country names in column A of the Countries tab and write into column B. Fetch GDP into column C, unemployment into column D, population into column E, population growth rate into column F, and urban population percentage into column G via API Ninjas. Classify each country in column H as "Tier 1," "Tier 2," or "Tier 3" by GDP. Sort by column C descending. Flag any row where GDP data is missing in column I.

The pattern: normalization, multiple API fields per row, a derived classification, and sorting all in one instruction.

Try It

Get the 7-day free trial of SheetXAI and open any country list workbook, then ask SheetXAI to enrich it with economic data using API Ninjas. The API Ninjas integration is included in every SheetXAI plan. See also how to refresh commodity and currency data in Excel or the API Ninjas in Excel overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more