Search API Connector Documentation
Import OpenWeatherMap Data to Google Sheets
We'll first get an API key from OpenWeatherMap, and then set up a request to pull in weather forecast details from OpenWeatherMap to your spreadsheet.
- Before You Begin
- Part 1: Get your OpenWeatherMap API Key
- Part 2: Pull Data from OpenWeatherMap to Sheets
- Part 3: Create a Custom API Request
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your OpenWeatherMap API Key
- If you haven't already, sign up for an account at https://home.openweathermap.org/users/sign_up
- Once you have an account, click your name to open the account menu and navigate to the API keys section.
- There should be a default API key already created for you (if not, you can click the 'Generate' button to make a new one). Keep it handy as we'll need it shortly. That's it! You now have access to OpenWeatherMap.
- OpenWeatherMap takes some time to recognize newly created API keys, so take a little break before moving to the next section.
Part 2: Pull Data from OpenWeatherMap to Sheets
The easiest way to get started with the OpenWeatherMap API is through API Connector’s built-in integration.
- Select OpenWeatherMap from the drop-down list of applications
- Choose an endpoint. We’ll start with
/geo/1.0/directto get latitude/longitude coordinates for a location, since OpenWeatherMap needs those for its data requests.
- In the parameters section, enter your API key into the
appidparameter, and enter your location of interest into the
- Select a destination sheet, name your request, and click Run. Note the values returned under lat and lon.
- Plug those lat/lon values into other endpoints to see weather data for your location.
Part 3: Create a Custom API Request
Alternatively, you can create a custom request instead of using API Connector’s built-in integration, using any of the endpoints and parameters shown in the API documentation. To create a custom request, add the complete URL into the request URL field.
To easily convert your preset request to a custom request, click Output Options > More Options > Add Request URL. This will print your URL into your sheet where you can copy and paste it into a custom request.
Part 4: API Documentation
Official API documentation: https://openweathermap.org/appid