Back to APIVerve in Excel
SheetXAI logo
APIVerve logo
APIVerve · Excel Guide

Add Air Quality Data to a City List in a an Excel workbook

2026-05-14
5 min read

The Scenario

You're on the sales territory team at a health-tech startup. Someone on the leadership team had the idea, during last week's pipeline review, that territory prioritisation should account for air quality — regions with persistent poor AQI might correlate with higher healthcare demand, or might create field logistics challenges. You have 150 prospect cities in column A of an Excel workbook. The ask is to add the current AQI and a health recommendation for each one before the next territory planning session on Thursday.

You've never hit an air quality API before. You don't know the endpoint. You have no script infrastructure set up.

The bad version:

  • Find the APIVerve air quality endpoint, figure out the query parameter format (city name? coordinates? a city ID?), and test it against a couple of rows.
  • Write or run a script that loops over all 150 rows, handles the ones with non-ASCII characters in the city name, and parses the nested response object to extract the AQI value and the health status string.
  • Paste 150 AQI values into column B and 150 health recommendations into column C, checking that each one landed in the right row.

Thursday is coming whether or not the script is ready. And you're supposed to be doing territory analysis, not data engineering.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Excel workbook. It reads your city list and, through its built-in APIVerve integration, it can fetch current air quality data for every city and write the AQI and health recommendation into the columns you specify.

Look up the air quality for every city in my Excel sheet and add the AQI score, main pollutant, and health status next to each row

What You Get

  • The AQI score, main pollutant, and health status populated for all 150 cities.
  • Cities that APIVerve cannot resolve noted in the relevant columns rather than left blank.
  • Thursday's territory planning session has its input data ready.

What If the Data Is Not Quite Ready

City names have inconsistent formatting or country context is missing

Standardise the city names in column A — trim whitespace and fix obvious misspellings — then fetch the AQI, main pollutant, and health status from APIVerve for each one, using the country name in column B to disambiguate if needed

Some cities are duplicated in the list

Deduplicate the city list in column A (mark duplicates in column D), then fetch AQI and health recommendation for each unique city and write to columns B and C

You also want to flag high-AQI cities automatically

For each city in column A, fetch the AQI score and health status from APIVerve, write to columns B and C, and flag any city with AQI above 150 in column D as "Priority Review"

Full territory enrichment in one shot

Trim city names in column A, deduplicate and mark extras in column E, fetch current AQI score, main pollutant, and health status from APIVerve for each unique city, write results to columns B, C, and D, then flag any city with AQI above 150 as "Priority Review" in column F

The flag condition is part of the same request — no need to add it as a second pass.

Try It

Get the 7-day free trial of SheetXAI and open your territory city workbook, then ask SheetXAI to pull the current AQI for every location. You can also enrich airline names with IATA codes or see everything the APIVerve integration supports.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more