Enrichments /
No-Code Enrichment with
Enrich Coordinates Using OpenWeather API to Load Current and Historical Air Pollution Data
Sign Up Free

Use OpenWeather API to load Air Pollution Metrics for Any Location

OpenWeather is a team of IT experts and data scientists focused on deep weather data science. For each point on the globe, OpenWeather provides historical, current and forecasted weather data via APIs.The Open Weather Air Pollution API returns current, forecast and historical air pollution metrics for any coordinates (latitude and longitude) that you supply.

openweather API Air Pollution API

Provider Website: https://openweathermap.org
Provider Enrichment Docs: https://openweathermap.org/api/air-pollution
Endpoint: curl http://api.openweathermap.org/data/2.5/air_pollution?lat=40.6943&lon=-73.9249&appid=your-api-key
Token / Registration Required: Yes

How To Enrich A Spreadsheet With Open Weather Air Pollution API:

For this example, my data looks like this. It is a list of the latitude and longitude of American cities.

data to enrich with openweather api

Step 1. In Gigasheet, head to the Enrichments function and select Custom Enrichment. First we paste in the HTTP request from Open Weather.

paste in the Air Pollution API from openweather api

Step 2. On the next screen we’ll insert 2 column variables from our Gigasheet sheet for the prompt. In this case, we highlight the lat, “40.6943” and the lng “-73.9249”, in the input, and then select our lat and lng column and click +Insert Column Reference. We also need to highlight the “your-api-key” and paste our real key from Open Weather. Then click Next.

customize the openweather api request in gigasheet

ready to execute the openweather api Air Pollution enrichment

Step 3. In this screen we see a preview of the results. Gigasheet makes requests for the first three rows and shows the Open Weather response. At this point select the fields you want to be inserted into your sheet. We recommend hitting Select All since you can easily delete columns in Gigasheet.

preview of results from the openweather api for Air Pollution

Step 4. Finally, confirm the number of requests is to your liking, and when ready click Run to kickoff the custom enrichment process. It’s ok to leave or close the sheet; the custom enrichment will keep running and you’ll receive an email once the job has been completed. You can monitor the progress of your enrichment, or cancel the job at the top of the sheet. 

confirm execution of the openweather api using Gigasheet

Step 5. Once completed, Gigasheet will send a completion toast and refresh the page. The result will show generation of new columns based on the Open Weather Air Pollution API. Open Weather has added the AQI and other fields for each location of interest. 

air pollution data added using openweather api
Try it Out

The ease of a spreadsheet with the power of a data warehouse.

No Code
No Database
No Training
Sign Up, Free Forever