Back to Stormglass.io in Google Sheets
SheetXAI logo
Stormglass.io logo
Stormglass.io · Google Sheets Guide

Fetch a 48-Hour Weather Forecast for Every Coordinate in a Google Sheet

2026-05-14
5 min read

The Scenario

You're a marine logistics coordinator, and you have twenty port coordinates sitting in columns A and B of a Google Sheet. Your job this morning is to produce a departure feasibility report — which vessels can clear the harbor in the next 48 hours given current wave height, wind speed, and air temperature forecasts at each location.

The bad version:

  • Open the Stormglass developer console, run an API call for coordinate one, read the JSON response, transcribe wave height, wind speed, and air temperature into the right cells in row 2.
  • Repeat for coordinates two through twenty, keeping track of which tab open in your browser matches which row in the sheet.
  • Notice that row fourteen returned a null for wave height and spend ten minutes figuring out whether the coordinate is malformed or the data simply doesn't exist at that resolution.

Your harbor master needs this report before the morning briefing. That's twenty API lookups, twenty sets of three values, and one undocumented null — all before 8 AM.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads your coordinate data, understands that columns A and B are latitude and longitude, and through its built-in Stormglass.io connection it can query the 48-hour weather forecast for every row in one shot — then write the results back into the adjacent columns directly. No script. No terminal. You just ask.

For each latitude/longitude pair in columns A and B, fetch the next 48-hour Stormglass weather forecast and write wave height, wind speed, and air temperature into columns C, D, and E. If a coordinate returns no data, write "No forecast available" in column F.

What You Get

  • Column C filled with wave height values (meters) for each port, sourced from the Stormglass hourly forecast averaged over the 48-hour window.
  • Column D filled with wind speed values (m/s) for the same window.
  • Column E filled with air temperature values (°C).
  • Any row where Stormglass returns incomplete data gets a note in column F — no silent blanks.

What If the Data Is Not Quite Ready

The coordinates are in decimal degrees but mixed with DMS-formatted entries

Some rows in your sheet store coordinates as "48°51'N, 2°21'E" while others use plain decimal values. Stormglass expects decimals.

Convert any DMS-formatted coordinates in columns A and B to decimal degrees, then fetch the next 48-hour Stormglass weather forecast for each row and write wave height, wind speed, and air temperature into columns C, D, and E.

You only want forecasts for ports flagged as "Active" in column G

Running forecasts for every row including decommissioned ports wastes API quota and clutters the report.

For rows where column G says "Active," fetch the 48-hour Stormglass weather forecast for the lat/lng in columns A and B and write wave height, wind speed, and air temperature into columns C, D, and E. Skip rows where column G is anything else.

The coordinates live in a separate "Ports" tab and results go into "Forecast Report"

Your coordinate master list lives on one tab, and the operations team reads a separate report tab.

Read all coordinate rows from the Ports tab (columns A and B), fetch the 48-hour Stormglass weather forecast for each, and write each port name (column C in Ports), wave height, wind speed, and air temperature as a new row in the Forecast Report tab.

Full cleanup, filter, and forecast in one shot

Your sheet has 35 coordinate rows, but 8 are duplicates, 3 have DMS formatting, and only the rows marked "Departure Ready" in column H need forecasts for the handoff deck.

Remove duplicate coordinate rows, convert any DMS entries in columns A and B to decimal degrees, then for rows where column H says "Departure Ready," fetch the 48-hour Stormglass weather forecast and write wave height, wind speed, and air temperature into columns C, D, and E. Flag rows where Stormglass returns no data in column F.

The underlying principle: asking for data cleanup and the API fetch in a single prompt means SheetXAI handles the conditional logic in one pass rather than in two separate steps you have to coordinate by hand.

Try It

Get the 7-day free trial of SheetXAI and open any Google Sheet with a list of port or site coordinates, then ask it to pull 48-hour Stormglass forecasts across every row. The Stormglass.io integration is included in every SheetXAI plan. You might also look at pulling tide extremes by coordinate or the full Stormglass.io overview for other data types this integration supports.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more