by ayi1337 · v0.0.9
QWeather API tools for Dify
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
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.
json: the original QWeather JSON responsetext: the same content as json (pretty-printed JSON string)files: not usedcode=204 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
Weather -/GeoAPI -for lightweight grouping.
In Dify, after installing the plugin, configure the provider credentials:
qweather_api_key (required): your QWeather API Keyqweather_base_url (required): your QWeather API Host (e.g. https://xxxxxx.qweatherapi.com)Where to find API Host:
Notes:
qweather_base_url). No fallback to devapi.qweather.com / geoapi.qweather.com.https://... and strip the trailing /.qweather_geo_city_lookup)/geo/v2/city/lookuplocation (required): Location keyword, coordinates, LocationID, or Adcodeadm (optional): Superior administrative divisions filterrange (optional): Search within country/region (ISO 3166 code)number (optional): Number of results (1-20, default 10)lang (optional): Response languageqweather_geo_top_city)/geo/v2/city/toprange (optional): Country/region (ISO 3166 code)number (optional): Number of results (1-20, default 10)lang (optional): Response languageqweather_geo_poi_lookup)/geo/v2/poi/lookuptype (required): POI type (scenic or TSTA)location (required): Location keyword, coordinates, LocationID, or Adcodecity (optional): Search within a given citynumber (optional): Number of results (1-20, default 10)lang (optional): Response languageqweather_geo_poi_range)/geo/v2/poi/rangetype (required): POI type (scenic or TSTA)location (required): Coordinates (longitude,latitude)radius (optional): Search radius in kilometers (1-50, default 5)number (optional): Number of results (1-20, default 10)lang (optional): Response languageqweather_weather_now)/v7/weather/nowlocation (required): LocationID or coordinateslang (optional): Response languageunit (optional): Unit system (m for metric, i for imperial)qweather_weather_daily_forecast)/v7/weather/{days}days (required): Forecast days (3d/7d/10d/15d/30d)location (required): LocationID or coordinateslang (optional): Response languageunit (optional): Unit system (m for metric, i for imperial)qweather_weather_hourly_forecast)/v7/weather/{hours}hours (required): Forecast hours (24h/72h/168h)location (required): LocationID or coordinateslang (optional): Response languageunit (optional): Unit system (m for metric, i for imperial)qweather_grid_weather_now)/v7/grid-weather/nowlocation (required): Coordinates (longitude,latitude)lang (optional): Response languageunit (optional): Unit system (m for metric, i for imperial)qweather_grid_weather_daily_forecast)/v7/grid-weather/{days}days (required): Forecast days (3d/7d)location (required): Coordinates (longitude,latitude)lang (optional): Response languageunit (optional): Unit system (m for metric, i for imperial)qweather_grid_weather_hourly_forecast)/v7/grid-weather/{hours}hours (required): Forecast hours (24h/72h)location (required): Coordinates (longitude,latitude)lang (optional): Response languageunit (optional): Unit system (m for metric, i for imperial)qweather_minutely_precipitation)/v7/minutely/5mlocation (required): Coordinates (longitude,latitude)lang (optional): Response languageqweather_indices_forecast)/v7/indices/{days}days (required): Forecast days (1d/3d)type (required): Weather indices type IDs (comma-separated)location (required): LocationID or coordinateslang (optional): Response languageqweather_astronomy_sun)/v7/astronomy/sunlocation (required): LocationID or coordinatesdate (required): Date in yyyyMMdd format (up to 60 days)qweather_astronomy_moon)/v7/astronomy/moonlocation (required): LocationID or coordinatesdate (required): Date in yyyyMMdd format (up to 60 days)lang (optional): Response languageqweather_astronomy_solar_elevation_angle)/v7/astronomy/solar-elevation-anglelocation (required): Coordinates (longitude,latitude)date (required): Date in yyyyMMdd formattime (required): Time in HHmm format (24-hour)tz (required): Time zone (e.g., 0800 or -0530)alt (required): Altitude in metersqweather_weather_alert_current)/weatheralert/v1/current/{lat}/{lon}latitude (required): Latitude (decimal, up to 2 decimal places)longitude (required): Longitude (decimal, up to 2 decimal places)localTime (optional): Return local time (true) or UTC time (false, default)lang (optional): Response languageqweather_air_quality_current)/airquality/v1/current/{lat}/{lon}latitude (required): Latitude (decimal, up to 2 decimal places)longitude (required): Longitude (decimal, up to 2 decimal places)lang (optional): Response languageqweather_air_quality_hourly_forecast)/airquality/v1/hourly/{lat}/{lon}latitude (required): Latitude (decimal, up to 2 decimal places)longitude (required): Longitude (decimal, up to 2 decimal places)localTime (optional): Return local time (true) or UTC time (false, default)lang (optional): Response languageqweather_air_quality_daily_forecast)/airquality/v1/daily/{lat}/{lon}latitude (required): Latitude (decimal, up to 2 decimal places)longitude (required): Longitude (decimal, up to 2 decimal places)localTime (optional): Return local time (true) or UTC time (false, default)lang (optional): Response languageqweather_air_quality_station)/airquality/v1/station/{LocationID}location_id (required): LocationID of the monitoring stationlang (optional): Response languageInstalled but no actions / plugin runtime not found
.venv/bin/python main.py)..env matches the latest Dify debug page values (host/port/key).Dify restart changed Debug Key
.env (REMOTE_INSTALL_KEY, and host/port if changed).Credential validation failed
qweather_base_url is your API Host (*.qweatherapi.com) from https://console.qweather.com/setting.The plugin itself does not store user data. It sends requests to QWeather and returns responses.
See PRIVACY.md for details.
PRs and issues are welcome. When adding a new tool:
tools/<name>.py (Tool implementation)tools/<name>.yaml (Tool schema: label/description/parameters)qweather.yamljson + text (stringified JSON)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.
.env.example to .envsource .venv/bin/activate
set -a
source .env
set +a
.venv/bin/python main.py
dify plugin package .
MIT