The OpenWeather connector lets your AI agent act in each user's OpenWeather account. Each user connects their own OpenWeather API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 16 tools.
- Tools
- 16
- What they doRead · write · destructive
- 16 · 0 · 016 read0 write0 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the OpenWeather connection
In AgentKit > Connections, create an OpenWeather connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'openweather'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize OpenWeather:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'openweather_current_weather_by_city_get',toolInput: { q: 'YOUR_Q' },})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "openweather"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize OpenWeather:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={"q":"YOUR_Q"},tool_name="openweather_current_weather_by_city_get",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their OpenWeather credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolopenweather_air_pollution_forecast_getGet the hourly air quality forecast for the next 4 days at a latitude and longitude.Read-onlyGet Air Pollution Forecast
Get the hourly air quality forecast for the next 4 days at a latitude and longitude. Returns the coordinates and a list of entries, each with a Unix timestamp, an air quality index from 1 (Good) to 5 (Very Poor) and concentrations in μg/m3 of CO, NO, NO2, O3, SO2, PM2.5, PM10 and NH3. Use this for future air quality. Use openweather_air_pollution_get for current readings and openweather_air_pollution_history_get for past readings.
Inputs
latnumberrequired- Latitude of the place in decimal degrees, from -90 to 90. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: 51.5073
lonnumberrequired- Longitude of the place in decimal degrees, from -180 to 180. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: -0.1276
openweather_air_pollution_getGet the current air quality at a latitude and longitude.Read-onlyGet Current Air Pollution
Get the current air quality at a latitude and longitude. Returns the coordinates and a list of entries, each with a Unix timestamp, an air quality index from 1 (Good) to 5 (Very Poor) and concentrations in μg/m3 of CO, NO, NO2, O3, SO2, PM2.5, PM10 and NH3. Use this for air quality right now. Use openweather_air_pollution_forecast_get for the coming days and openweather_air_pollution_history_get for past readings.
Inputs
latnumberrequired- Latitude of the place in decimal degrees, from -90 to 90. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: 51.5073
lonnumberrequired- Longitude of the place in decimal degrees, from -180 to 180. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: -0.1276
openweather_air_pollution_history_getGet hourly air quality readings for a time range at a latitude and longitude, from 27 November 2020 onward.Read-onlyGet Air Pollution History
Get hourly air quality readings for a time range at a latitude and longitude, from 27 November 2020 onward. Returns the coordinates and a list of entries, each with a Unix timestamp, an air quality index from 1 (Good) to 5 (Very Poor) and concentrations in μg/m3 of CO, NO, NO2, O3, SO2, PM2.5, PM10 and NH3. Use this for past air quality. Use openweather_air_pollution_get for current readings and openweather_air_pollution_forecast_get for the coming days.
Inputs
endintegerrequired- End of the time range as a Unix timestamp in seconds (UTC); must be after start. Example: 1704153600 (2024-01-02 00:00 UTC)
latnumberrequired- Latitude of the place in decimal degrees, from -90 to 90. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: 51.5073
lonnumberrequired- Longitude of the place in decimal degrees, from -180 to 180. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: -0.1276
startintegerrequired- Start of the time range as a Unix timestamp in seconds (UTC). Data is available from 27 November 2020 (1606435200). Example: 1704067200 (2024-01-01 00:00 UTC)
openweather_current_weather_by_city_getGet the current weather for a city by name.Read-onlyGet Current Weather by City
Get the current weather for a city by name. Returns the weather condition and description, temperature, feels-like temperature, min and max (the spread across stations in a large city right now, not the day's low and high; in most places they equal the current temperature), pressure, humidity, visibility, wind, cloud cover, rain and snow volume for the last hour, sunrise and sunset, the city name and its time zone offset. Use this when you only have a city name. Use openweather_current_weather_get for coordinates. OpenWeather has deprecated name lookups, so for an ambiguous name resolve it with openweather_location_search first.
Inputs
qstringrequired- City name, optionally followed by a state code (US only) and an ISO 3166 country code, separated by commas. Add the country code to avoid matching a same-named city elsewhere. Example: London,GB or Austin,TX,US
langstring- Language code for the weather description and city name in the response, such as en, fr, de, es, zh_cn or pt_br. Defaults to English. The full list is at https://openweathermap.org/current#multi. Example: fr
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
openweather_current_weather_by_zip_getGet the current weather for a zip or postal code.Read-onlyGet Current Weather by Zip Code
Get the current weather for a zip or postal code. Returns the weather condition and description, temperature, feels-like temperature, min and max (the spread across stations in a large city right now, not the day's low and high; in most places they equal the current temperature), pressure, humidity, visibility, wind, cloud cover, rain and snow volume for the last hour, sunrise and sunset, the city name and its time zone offset. Use this when you only have a postal code. Use openweather_current_weather_get for coordinates and openweather_current_weather_by_city_get for a city name. OpenWeather has deprecated name and postal-code lookups, so turn the place into coordinates first with openweather_location_search or openweather_location_by_zip_get.
Inputs
zipstringrequired- Zip or postal code followed by a comma and the ISO 3166 two-letter country code. Without a country code OpenWeather assumes the US. Example: 94040,US or E14,GB
langstring- Language code for the weather description and city name in the response, such as en, fr, de, es, zh_cn or pt_br. Defaults to English. The full list is at https://openweathermap.org/current#multi. Example: fr
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
openweather_current_weather_getGet the current weather at a latitude and longitude.Read-onlyGet Current Weather
Get the current weather at a latitude and longitude. Returns the weather condition and description, temperature, feels-like temperature, min and max (the spread across stations in a large city right now, not the day's low and high; in most places they equal the current temperature), pressure, humidity, visibility, wind, cloud cover, rain and snow volume for the last hour, sunrise and sunset, the city name and its time zone offset. Use this when you have coordinates; it is the most accurate lookup. Use openweather_current_weather_by_city_get for a city name and openweather_current_weather_by_zip_get for a postal code.
Inputs
latnumberrequired- Latitude of the place in decimal degrees, from -90 to 90. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: 51.5073
lonnumberrequired- Longitude of the place in decimal degrees, from -180 to 180. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: -0.1276
langstring- Language code for the weather description and city name in the response, such as en, fr, de, es, zh_cn or pt_br. Defaults to English. The full list is at https://openweathermap.org/current#multi. Example: fr
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
openweather_forecast_by_city_getGet the 5-day weather forecast in 3-hour steps for a city by name.Read-onlyGet 5-Day Forecast by City
Get the 5-day weather forecast in 3-hour steps for a city by name. Returns a list of up to 40 forecast steps, each with its time, temperature, feels-like temperature, pressure, humidity, weather description, cloud cover, wind, visibility, probability of precipitation and rain or snow volume, plus the city name, coordinates, time zone offset, sunrise and sunset. Use this when you only have a city name. Use openweather_forecast_get for coordinates and openweather_forecast_by_zip_get for a postal code. OpenWeather has deprecated name and postal-code lookups, so turn the place into coordinates first with openweather_location_search or openweather_location_by_zip_get.
Inputs
qstringrequired- City name, optionally followed by a state code (US only) and an ISO 3166 country code, separated by commas. Add the country code to avoid matching a same-named city elsewhere. Example: London,GB or Austin,TX,US
cntinteger- Number of 3-hour forecast steps to return, counted from the next step. The full forecast has up to 40 steps (5 days). Leave empty for all of them. Example: 8 (the next 24 hours)
langstring- Language code for the weather description and city name in the response, such as en, fr, de, es, zh_cn or pt_br. Defaults to English. The full list is at https://openweathermap.org/current#multi. Example: fr
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
openweather_forecast_by_zip_getGet the 5-day weather forecast in 3-hour steps for a zip or postal code.Read-onlyGet 5-Day Forecast by Zip Code
Get the 5-day weather forecast in 3-hour steps for a zip or postal code. Returns a list of up to 40 forecast steps, each with its time, temperature, feels-like temperature, pressure, humidity, weather description, cloud cover, wind, visibility, probability of precipitation and rain or snow volume, plus the city name, coordinates, time zone offset, sunrise and sunset. Use this when you only have a postal code. Use openweather_forecast_get for coordinates and openweather_forecast_by_city_get for a city name. OpenWeather has deprecated name and postal-code lookups, so turn the place into coordinates first with openweather_location_search or openweather_location_by_zip_get.
Inputs
zipstringrequired- Zip or postal code followed by a comma and the ISO 3166 two-letter country code. Without a country code OpenWeather assumes the US. Example: 94040,US or E14,GB
cntinteger- Number of 3-hour forecast steps to return, counted from the next step. The full forecast has up to 40 steps (5 days). Leave empty for all of them. Example: 8 (the next 24 hours)
langstring- Language code for the weather description and city name in the response, such as en, fr, de, es, zh_cn or pt_br. Defaults to English. The full list is at https://openweathermap.org/current#multi. Example: fr
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
openweather_forecast_getGet the 5-day weather forecast in 3-hour steps at a latitude and longitude.Read-onlyGet 5-Day Forecast
Get the 5-day weather forecast in 3-hour steps at a latitude and longitude. Returns a list of up to 40 forecast steps, each with its time, temperature, feels-like temperature, pressure, humidity, weather description, cloud cover, wind, visibility, probability of precipitation and rain or snow volume, plus the city name, coordinates, time zone offset, sunrise and sunset. Use this for the next 5 days on any API key. Use openweather_forecast_by_city_get for a city name, and openweather_one_call_get for hourly and 8-day daily forecasts (One Call subscription).
Inputs
latnumberrequired- Latitude of the place in decimal degrees, from -90 to 90. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: 51.5073
lonnumberrequired- Longitude of the place in decimal degrees, from -180 to 180. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: -0.1276
cntinteger- Number of 3-hour forecast steps to return, counted from the next step. The full forecast has up to 40 steps (5 days). Leave empty for all of them. Example: 8 (the next 24 hours)
langstring- Language code for the weather description and city name in the response, such as en, fr, de, es, zh_cn or pt_br. Defaults to English. The full list is at https://openweathermap.org/current#multi. Example: fr
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
openweather_location_by_zip_getFind the coordinates of a zip or postal code.Read-onlyGet Location by Zip Code
Find the coordinates of a zip or postal code. Returns the zip code, area name, lat and lon of the code's centroid, and the country code. Use this to turn a postal code into lat and lon for the coordinate-based tools. Use openweather_location_search for a place name.
Inputs
zipstringrequired- Zip or postal code followed by a comma and the ISO 3166 two-letter country code. Example: 94040,US or E14,GB
openweather_location_reverse_getFind the names of places at a latitude and longitude (reverse geocoding).Read-onlyGet Location Name by Coordinates
Find the names of places at a latitude and longitude (reverse geocoding). Returns a list of locations, each with name, local_names (the name in other languages), lat, lon, country code and state where available. Use this to name the place at given coordinates. Use openweather_location_search to go from a name to coordinates.
Inputs
latnumberrequired- Latitude in decimal degrees, from -90 to 90. Example: 51.5073
lonnumberrequired- Longitude in decimal degrees, from -180 to 180. Example: -0.1276
limitinteger- Maximum number of place names to return. Example: 5
openweather_location_searchFind the coordinates of a place by its name, with optional state and country.Read-onlySearch Locations by Name
Find the coordinates of a place by its name, with optional state and country. Returns a list of locations, each with name, local_names (the name in other languages), lat, lon, country code and state where available. Use this to turn a city name into lat and lon for the weather, forecast, One Call and air pollution tools. Use openweather_location_by_zip_get for a postal code and openweather_location_reverse_get for coordinates to a name.
Inputs
qstringrequired- Place name, optionally followed by a state code (US only) and an ISO 3166 country code, separated by commas. Example: London,GB or Springfield,IL,US
limitinteger- Maximum number of matching locations to return, from 1 to 5. Example: 5
openweather_one_call_day_summary_getGet aggregated weather for one day at a latitude and longitude, from 2 January 1979 up to 1.5 years ahead.Read-onlyGet Daily Weather Summary
Get aggregated weather for one day at a latitude and longitude, from 2 January 1979 up to 1.5 years ahead. Returns the date and time zone with cloud cover, humidity and pressure in the afternoon, total precipitation, minimum, maximum and morning, afternoon, evening and night temperatures, and the maximum wind speed and direction. Use this for a whole day's statistics, past or future. Use openweather_one_call_timemachine_get for one exact moment and openweather_one_call_get for the coming 8 days in detail. Requires the One Call API 3.0 subscription on the OpenWeather account (1,000 free calls a day); other keys get a 401 error.
Inputs
datestringrequired- The day to summarize, in YYYY-MM-DD format, from 1979-01-02 up to 1.5 years ahead. Example: 2024-07-15
latnumberrequired- Latitude of the place in decimal degrees, from -90 to 90. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: 51.5073
lonnumberrequired- Longitude of the place in decimal degrees, from -180 to 180. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: -0.1276
langstring- Language code for the weather description and city name in the response, such as en, fr, de, es, zh_cn or pt_br. Defaults to English. The full list is at https://openweathermap.org/current#multi. Example: fr
tzstring- Time zone offset to use for the day, in ±XX:XX format. Leave empty to use the time zone OpenWeather detects from the coordinates; set it only if that detection is wrong. Example: +03:00
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
openweather_one_call_getGet current weather, a 1-hour minute-by-minute forecast, a 48-hour hourly forecast, an 8-day daily forecast and government weather alerts for a latitude and longitude in one call.Read-onlyGet One Call Weather
Get current weather, a 1-hour minute-by-minute forecast, a 48-hour hourly forecast, an 8-day daily forecast and government weather alerts for a latitude and longitude in one call. Returns current, minutely, hourly, daily and alerts sections with temperature, feels-like, pressure, humidity, dew point, UV index, cloud cover, visibility, wind, precipitation and weather description; daily entries add a text summary, moon phase and min/max temperatures. Use this for a full forecast or alerts. Use exclude to drop sections you do not need. Use openweather_forecast_get when the account has no One Call subscription. Requires the One Call API 3.0 subscription on the OpenWeather account (1,000 free calls a day); other keys get a 401 error.
Inputs
latnumberrequired- Latitude of the place in decimal degrees, from -90 to 90. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: 51.5073
lonnumberrequired- Longitude of the place in decimal degrees, from -180 to 180. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: -0.1276
excludestring- Comma-separated list, without spaces, of sections to leave out of the response: current, minutely, hourly, daily, alerts. Leave empty to get all sections. Example: minutely,alerts
langstring- Language code for the weather description and city name in the response, such as en, fr, de, es, zh_cn or pt_br. Defaults to English. The full list is at https://openweathermap.org/current#multi. Example: fr
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
openweather_one_call_overview_getGet a plain-language weather summary for today or tomorrow at a latitude and longitude, generated by OpenWeather with AI.Read-onlyGet Weather Overview
Get a plain-language weather summary for today or tomorrow at a latitude and longitude, generated by OpenWeather with AI. Returns the coordinates, time zone, date, units and a weather_overview text describing the conditions and forecast for that day. Use this to give a user a short readable summary. Use openweather_one_call_get for the numbers behind it. Requires the One Call API 3.0 subscription on the OpenWeather account (1,000 free calls a day); other keys get a 401 error.
Inputs
latnumberrequired- Latitude of the place in decimal degrees, from -90 to 90. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: 51.5073
lonnumberrequired- Longitude of the place in decimal degrees, from -180 to 180. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: -0.1276
datestring- The day to summarize in YYYY-MM-DD format: only today or tomorrow, in the time zone of the coordinates. Leave empty for today. Example: 2026-11-16
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
openweather_one_call_timemachine_getGet the weather at a latitude and longitude for one moment, from 1 January 1979 up to 4 days ahead.Read-onlyGet Weather at a Point in Time
Get the weather at a latitude and longitude for one moment, from 1 January 1979 up to 4 days ahead. Returns the time zone and one data entry with temperature, feels-like, pressure, humidity, dew point, UV index, cloud cover, visibility, wind, rain or snow and weather description, plus sunrise and sunset. Use this for historical weather at a specific time. Use openweather_one_call_day_summary_get for a whole day's aggregates and openweather_one_call_get for current conditions. Requires the One Call API 3.0 subscription on the OpenWeather account (1,000 free calls a day); other keys get a 401 error.
Inputs
dtintegerrequired- The moment to get weather for, as a Unix timestamp in seconds (UTC). Any time from 1 January 1979 up to 4 days ahead. Example: 1704067200 (2024-01-01 00:00 UTC)
latnumberrequired- Latitude of the place in decimal degrees, from -90 to 90. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: 51.5073
lonnumberrequired- Longitude of the place in decimal degrees, from -180 to 180. Get it from openweather_location_search or openweather_location_by_zip_get if you only have a place name or postal code. Example: -0.1276
langstring- Language code for the weather description and city name in the response, such as en, fr, de, es, zh_cn or pt_br. Defaults to English. The full list is at https://openweathermap.org/current#multi. Example: fr
unitsstring- Units of measurement for the response: standard (Kelvin, meters/second), metric (Celsius, meters/second) or imperial (Fahrenheit, miles/hour). Defaults to standard. Example: metricone of
standardmetricimperialdefaultstandard
No tools match.