OpenWeatherMap Get Current Weather

1 credits/call
ae_openweathermap_get_current_weather

Get current weather conditions from OpenWeatherMap using latitude and longitude. City or postal-code locations must first be converted to coordinates, and results can use standard, metric, or imperial units in JSON, XML, or HTML format.

Weather
1 credits/call

Pricing

1 credits/call
ConditionCharge
Each call1 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
latnumberYesRequired latitude of the location in decimal degrees. Resolve a city or area name with openweathermap_get_directgeocoding before calling this operation.—
lonnumberYesRequired longitude of the location in decimal degrees. Resolve a city or area name with openweathermap_get_directgeocoding before calling this operation.—
langstringNoYou can use this parameter to get the output in your language.—
modeenum (xml | html)NoResponse format. Possible values are 'xml' and 'html'. If you don't use the mode parameter format is JSON by default.—
unitsenum (standard | metric | imperial)NoUnits of measurement. 'standard', 'metric' and 'imperial' units are available. If you do not use the units parameter, standard units will be applied by default.standard

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_openweathermap_get_current_weather' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "lat": 35.68,
    "lon": 139.65,
    "units": "metric"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "base": "stations",
  "clouds": {
    "all": 20
  },
  "cod": 200,
  "coord": {
    "lat": 35.68,
    "lon": 139.65
  },
  "id": 1862143,
  "name": "Horinouchi"
}

This example shows part of the response. Copied content is valid JSON.