The Scenario
You are an economist at a research firm. You have just been handed a new project: build a multi-factor country risk scoring model. The input data is 80 country names in column A of a Google Sheet. The model requires current GDP, unemployment rate, and population for each country before you can write a single formula.
The research director wants a first draft of the model by Thursday. It is Monday morning.
The bad version of this week:
- You open the World Bank data portal, search for GDP by country, download a CSV
- The CSV has 200+ countries and a column structure you have to decipher
- You VLOOKUP your 80 countries, find twelve don't match the World Bank 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 and the naming convention problem is still not resolved
- 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 spreadsheet. It reads your country list and calls the API Ninjas country data endpoints for each row, writing GDP, unemployment, and population back to the columns you name.
Open the SheetXAI sidebar and type:
For each country name in column A, 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. If a country returns no data, it flags the row so you know which ones to investigate instead of leaving them silently blank.
What You Get
A complete country dataset ready for the risk scoring model:
- Column B: GDP — in USD, from API Ninjas
- 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, no missing rows.
Need population growth rate and urban population percentage for the demographic overlay? Ask in the same prompt.
What If the Data Is Not Quite Ready
Country research sheets accumulate edge cases. SheetXAI handles them inline.
When country names don't match the API Ninjas standard
Your sheet uses "USA" and "UK" but the API expects "United States" and "United Kingdom."
Normalize the country names in column A to API Ninjas standard format before fetching data. Write the normalized name into column B, then fill GDP, unemployment, and population into columns C, D, and E.
When you want population projections alongside current figures
The model needs a 5-year population growth estimate, not just current headcount.
Look up current and forecast population figures for every country in my sheet 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 based on GDP.
After filling GDP data in column B, sort the sheet 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 in one instruction before Thursday.
Normalize country names in column A to API Ninjas standard format and write into column B. Fetch GDP into column C, unemployment rate 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" (GDP > $1T), "Tier 2" ($100B–$1T), or "Tier 3" (< $100B). Sort the sheet 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 so the dataset is model-ready by Monday afternoon.
Try It
Get the 7-day free trial of SheetXAI and open any country list or geographic research sheet, 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 prices and currency rates or the API Ninjas in Google Sheets overview.
