app icon
QWeather
0.0.9

QWeather API tools for Dify

ayi1337/qweather842 installs

QWeather Tool Plugin for Dify

Author: Ayi1337
Repository: dify-plugin-qweather

中文文档 | 日本語ドキュメント | Documentação em Português

A Dify Tool Plugin that provides a curated set of tools for calling QWeather (和风天气) APIs, so you can fetch weather and location data in Chatflow / Workflow / Agent.

This plugin is designed as a thin wrapper around QWeather’s official APIs: it forwards requests to QWeather and returns the response as-is.


Overview

  • Plugin type: Tool Plugin (Python)
  • Tools included: 20 (Weather / GeoAPI / Minutely / Indices / Astronomy / Warning / Air Quality)
  • Output:
    • : the original QWeather JSON response
    • : the same content as (pretty-printed JSON string)
    • : not used
  • QWeather response code: means “success but no data”, and is treated as success (returned without raising).

Dify currently doesn’t support multi-level tool menus. This plugin uses tool label prefixes like / for lightweight grouping.


Configuration (Provider Credentials)

In Dify, after installing the plugin, configure the provider credentials:

  • (required): your QWeather API Key
  • (required): your QWeather API Host (e.g. )

Where to find API Host:

Notes:

  • All endpoints in this plugin use the API Host (). No fallback to / .
  • You can input without scheme; the plugin will normalize it to and strip the trailing .

Tools

GeoAPI

City Lookup ()

  • Description: City search and reverse geocoding, supports multi-language and fuzzy search
  • Endpoint:
  • Parameters:
    • (required): Location keyword, coordinates, LocationID, or Adcode
    • (optional): Superior administrative divisions filter
    • (optional): Search within country/region (ISO 3166 code)
    • (optional): Number of results (1-20, default 10)
    • (optional): Response language

Top City ()

  • Description: Get a list of popular cities around the world
  • Endpoint:
  • Parameters:
    • (optional): Country/region (ISO 3166 code)
    • (optional): Number of results (1-20, default 10)
    • (optional): Response language

POI Lookup ()

  • Description: Search POI information (scenic spots, tide stations, etc.) using keywords and coordinates
  • Endpoint:
  • Parameters:
    • (required): POI type ( or )
    • (required): Location keyword, coordinates, LocationID, or Adcode
    • (optional): Search within a given city
    • (optional): Number of results (1-20, default 10)
    • (optional): Response language

POI Range ()

  • Description: Query POI information within a specified area
  • Endpoint:
  • Parameters:
    • (required): POI type ( or )
    • (required): Coordinates (longitude,latitude)
    • (optional): Search radius in kilometers (1-50, default 5)
    • (optional): Number of results (1-20, default 10)
    • (optional): Response language

Weather (City)

Real-time Weather ()

  • Description: Get real-time weather data for a city or coordinate
  • Endpoint:
  • Parameters:
    • (required): LocationID or coordinates
    • (optional): Response language
    • (optional): Unit system ( for metric, for imperial)

Daily Weather Forecast ()

  • Description: Daily weather forecast for the next 3-30 days
  • Endpoint:
  • Available Days: 3d, 7d, 10d, 15d, 30d
  • Parameters:
    • (required): Forecast days (3d/7d/10d/15d/30d)
    • (required): LocationID or coordinates
    • (optional): Response language
    • (optional): Unit system ( for metric, for imperial)

Hourly Weather Forecast ()

  • Description: Hourly weather forecast for the next 24-168 hours
  • Endpoint:
  • Available Hours: 24h, 72h, 168h
  • Parameters:
    • (required): Forecast hours (24h/72h/168h)
    • (required): LocationID or coordinates
    • (optional): Response language
    • (optional): Unit system ( for metric, for imperial)

Weather (Grid)

Grid Weather Real-time ()

  • Description: Grid-based real-time weather for coordinates (3-5km resolution)
  • Endpoint:
  • Parameters:
    • (required): Coordinates (longitude,latitude)
    • (optional): Response language
    • (optional): Unit system ( for metric, for imperial)

Grid Weather Daily Forecast ()

  • Description: Grid weather daily forecast for the next 3-7 days (3-5km resolution)
  • Endpoint:
  • Available Days: 3d, 7d
  • Parameters:
    • (required): Forecast days (3d/7d)
    • (required): Coordinates (longitude,latitude)
    • (optional): Response language
    • (optional): Unit system ( for metric, for imperial)

Grid Weather Hourly Forecast ()

  • Description: Grid weather hourly forecast for the next 24-72 hours (3-5km resolution)
  • Endpoint:
  • Available Hours: 24h, 72h
  • Parameters:
    • (required): Forecast hours (24h/72h)
    • (required): Coordinates (longitude,latitude)
    • (optional): Response language
    • (optional): Unit system ( for metric, for imperial)

Minutely Forecast

Minutely Precipitation ()

  • Description: Minute-level precipitation forecast every 5 minutes for the next 2 hours (China only)
  • Endpoint:
  • Parameters:
    • (required): Coordinates (longitude,latitude)
    • (optional): Response language

Weather Indices

Weather Indices Forecast ()

  • Description: Get weather lifestyle indices forecast data for cities in China and worldwide
  • Endpoint:
  • Available Days: 1d, 3d
  • Parameters:
    • (required): Forecast days (1d/3d)
    • (required): Weather indices type IDs (comma-separated)
    • (required): LocationID or coordinates
    • (optional): Response language

Astronomy

Sunrise and Sunset ()

  • Description: Get sunrise and sunset times for the next 60 days at any location worldwide
  • Endpoint:
  • Parameters:
    • (required): LocationID or coordinates
    • (required): Date in yyyyMMdd format (up to 60 days)

Moon and Moon Phase ()

  • Description: Get moonrise, moonset and hourly moon phase data for the next 60 days
  • Endpoint:
  • Parameters:
    • (required): LocationID or coordinates
    • (required): Date in yyyyMMdd format (up to 60 days)
    • (optional): Response language

Solar Elevation Angle ()

  • Description: Get global solar elevation angle and azimuth at any time point
  • Endpoint:
  • Parameters:
    • (required): Coordinates (longitude,latitude)
    • (required): Date in yyyyMMdd format
    • (required): Time in HHmm format (24-hour)
    • (required): Time zone (e.g., 0800 or -0530)
    • (required): Altitude in meters

Warning

Weather Alert ()

  • Description: Get officially issued real-time severe weather alerts by coordinates
  • Endpoint:
  • Parameters:
    • (required): Latitude (decimal, up to 2 decimal places)
    • (required): Longitude (decimal, up to 2 decimal places)
    • (optional): Return local time (true) or UTC time (false, default)
    • (optional): Response language

Air Quality

Current Air Quality ()

  • Description: Current air quality (AQI) by coordinates
  • Endpoint:
  • Parameters:
    • (required): Latitude (decimal, up to 2 decimal places)
    • (required): Longitude (decimal, up to 2 decimal places)
    • (optional): Response language

Air Quality Hourly Forecast ()

  • Description: Air quality hourly forecast for the next 24 hours
  • Endpoint:
  • Parameters:
    • (required): Latitude (decimal, up to 2 decimal places)
    • (required): Longitude (decimal, up to 2 decimal places)
    • (optional): Return local time (true) or UTC time (false, default)
    • (optional): Response language

Air Quality Daily Forecast ()

  • Description: Air quality daily forecast for the next 3 days
  • Endpoint:
  • Parameters:
    • (required): Latitude (decimal, up to 2 decimal places)
    • (required): Longitude (decimal, up to 2 decimal places)
    • (optional): Return local time (true) or UTC time (false, default)
    • (optional): Response language

Monitoring Station Data ()

  • Description: Get pollutant concentration values from air quality monitoring stations
  • Endpoint:
  • Parameters:
    • (required): LocationID of the monitoring station
    • (optional): Response language

Troubleshooting

  1. Installed but no actions /

    • Remote Debug requires the local plugin process to be running continuously ().
    • Ensure matches the latest Dify debug page values (host/port/key).
  2. Dify restart changed Debug Key

    • Update (, and host/port if changed).
    • Restart the local plugin process, then reinstall/refresh the plugin in Dify.
  3. Credential validation failed


Privacy

The plugin itself does not store user data. It sends requests to QWeather and returns responses.

See for details.


Contributing

PRs and issues are welcome. When adding a new tool:

  1. Add (Tool implementation)
  2. Add (Tool schema: label/description/parameters)
  3. Register the YAML in
  4. Return outputs as + (stringified JSON)

Support / References


Installation (For Developers)

Note: This section is for plugin developers only. Regular users can install the plugin directly from the Dify Marketplace and do not need to follow these steps.

Remote Debug (recommended for development)

  1. Copy to
  2. Fill in the values from Dify "Plugin Debug" (Remote Debug) page
  3. Start the plugin process (keep it running):

Packaging (for uploading)


License

MIT

CATEGORY
Tool
TAGS
PRODUCTIVITYTRAVEL
VERSION
0.0.9
ayi1337·12/26/2025 02:46 AM
REQUIREMENTS
Tool invocation
Maximum memory
1KB