AMap高德地图 icon

AMap高德地图

Get information from AMap

Overview

This node integrates with the AMap (Gaode Map) API to retrieve weather information for a specified city. It supports fetching real-time weather conditions as well as weather forecasts. This is useful in scenarios where you need up-to-date weather data for applications such as travel planning, event scheduling, or location-based services.

For example, you can use this node to get the current temperature, humidity, and weather description of a city by providing its city code. This allows workflows to dynamically respond to weather changes.

Properties

Name Meaning
城市编码 The city code representing the location for which to fetch weather data. Example: "110000" for Beijing.

Output

The node outputs JSON data containing weather information retrieved from the AMap API. For the "获取实况天气" (Get Real-time Weather) operation, the output includes current weather details such as temperature, humidity, weather condition descriptions, wind information, and other relevant meteorological data for the specified city.

No binary data is produced by this node.

Dependencies

  • Requires an API key credential for the AMap service.
  • The node makes HTTP GET requests to the AMap REST API endpoint at https://restapi.amap.com/v3/weather/weatherInfo.
  • The API request includes query parameters specifying the city code and requests base weather data (extensions=base).
  • The node expects the response in JSON format.

Troubleshooting

  • Invalid or missing city code: Ensure the city code provided is correct and recognized by the AMap API. An incorrect code may result in empty or error responses.
  • API authentication errors: Verify that the API key credential is correctly configured and has permissions to access the weather API.
  • Network issues or API downtime: If the node fails to connect or times out, check network connectivity and AMap service status.
  • Unexpected response format: If the output JSON structure changes due to API updates, the node might not parse data correctly. Review API documentation for any changes.

Links and References

Discussion