OpenWeatherMap Get Directgeocoding

1 credits/call
ae_openweathermap_get_directgeocoding

Use OpenWeatherMap to find latitude and longitude for a city or area name, with up to five matching locations.

Maps
1 credits/call

Pricing

1 credits/call
ConditionCharge
Each call1 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
qstringYesCity name, state code (only for the US) and country code divided by comma. Please use ISO 3166 country codes.—
limitintegerNoNumber of the locations in the API response (up to 5 results can be returned in the API response)—

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_directgeocoding' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "limit": 1,
    "q": "Shenzhen,CN"
  }
}'
Response exampleresponse.json
JSONPartial content
[
  {
    "country": "CN",
    "lat": 22.5445741,
    "local_names": {
      "af": "Shenzhen",
      "ar": "شنجن (الصين)",
      "az": "Şençjen",
      "ba": "Шэньчжэнь",
      "be": "Шэньчжэнь",
      "id": "Shenzhen"
    },
    "lon": 114.0545429,
    "name": "Shenzhen",
    "state": "Guangdong Province"
  }
]

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