Agriculture API New

Agriculture API: growing degree days, ET0 and crop water use, spray windows, frost, disease and blight risk for up to 14 days. Business plan and above.

Agriculture API method returns farming indicators for any location for up to 14 days ahead, in json or xml: growing degree days (GDD), rainfall, reference evapotranspiration (ET0) and crop water use, water balance, chill hours, frost and heat stress hours, leaf wetness, disease risk, potato blight Smith Periods and hour-by-hour spray windows with Delta-T.

Choose a crop to use its default base temperature and crop coefficient, or set your own. Pass a season start date to get season-to-date totals from our historical weather. Data is hourly for the first 5 days and 3 hourly after that.

Available on Business plan and above. Keys on other plans receive error code 2009. The daily soil block is included for Enterprise plan users.


Example request

https://api.weatherapi.com/v1/agriculture.json?key=<YOUR_API_KEY>&q=52.2,0.12&days=7&crop=wheat&season_start=2026-03-01

Request parameters

Parameter Required Description
key Yes Your API key.
q Yes Location. Same formats as other APIs. Lat,lon of the field is recommended.
days No Number of forecast days, 1 to 14. Default 1.
crop No Crop preset that sets gdd_base, gdd_upper, kc and heat_threshold: wheat, barley, maize (or corn), soybean, potato, rice, cotton, tomato, sunflower, grape or none. Default: none (reference grass, base 10 °C).
gdd_base No Base temperature for growing degree days in °C, -10 to 40. Default from crop.
gdd_upper No Upper temperature cut-off for growing degree days in °C, 0 to 50 and above gdd_base. Default from crop.
kc No Crop coefficient used for crop water use (ETc = ET0 x kc), 0 to 2. Default: FAO-56 mid-season value for the crop.
heat_threshold No Air temperature in °C at or above which hours count as heat stress, 15 to 50. Default from crop.
season_start No Season start date (yyyy-MM-dd) within the last 366 days. Adds season-to-date totals from historical weather up to yesterday.

Crop presets

crop gdd_base (°C) gdd_upper (°C) kc heat_threshold (°C)
wheat 0 30 1.15 30
barley 0 30 1.15 30
maize / corn 10 30 1.20 35
soybean 10 30 1.15 35
potato 7 30 1.15 30
rice 10 30 1.20 35
cotton 15.6 32 1.20 35
tomato 10 30 1.15 32
sunflower 6.7 30 1.00 35
grape 10 35 0.85 35
none 10 30 1.00 32

The response contains the Location object, a crop object (the values used), a season object (when season_start is given) and a forecast object.

forecast -> forecastday: Parent element, one per day

forecastday -> day: daily totals and risks

forecastday -> hour: one element per forecast period


season element

Field Data Type Description
start string Season start date
end string Last day included (yesterday)
days int Number of days with historical data
gdd decimal Growing degree days for the season so far
rain_mm decimal Rainfall in mm
et0_mm decimal Reference evapotranspiration in mm
etc_mm decimal Crop water use in mm (ET0 x kc)
water_balance_mm decimal Rain minus crop water use in mm (negative = deficit)

day element

Field Data Type Description
maxtemp_c / mintemp_c decimal Maximum and minimum air temperature in °C
gdd decimal Growing degree days for the day (capped-average method)
gdd_cumulative decimal Running total: season GDD (if season_start is given) plus forecast days so far
rain_mm decimal Rainfall in mm
et0_mm decimal Reference evapotranspiration (FAO-56) in mm
etc_mm decimal Crop water use in mm (ET0 x kc)
water_balance_mm decimal Rain minus crop water use in mm
chill_hours decimal Hours between 0 and 7.2 °C
frost_hours decimal Hours at or below 0 °C
hard_frost_hours decimal Hours at or below -2 °C
heat_stress_hours decimal Hours at or above heat_threshold
leaf_wet_hours decimal Hours with wet leaves (humidity 90% or more, or rain)
disease_risk string low, moderate or high. Generic fungal disease pressure from wet-leaf hours at 10 to 30 °C (6+ moderate, 10+ high)
smith_period int 1 = Yes 0 = No
Potato late blight Smith Period: this day and the day before both had a minimum of 10 °C or more and 6+ hours of humidity 90% or more
spray_good_hours decimal Hours rated good for spraying
spray_marginal_hours decimal Hours rated marginal for spraying
soil object Enterprise only: soil_temp_5cm, soil_moisture_5cm, soil_moisture_25cm (m³/m³), paw (plant-available water) and workable_hours

hour element

Field Data Type Description
time_epoch / time int / string End of the period (unix UTC and local yyyy-MM-dd HH:mm)
period_hours decimal Length of the period: 1 for the first 5 days, 3 after that
temp_c, humidity, dewpoint_c decimal Air temperature, relative humidity and dew point
wind_kph, gust_kph decimal Wind speed and gust
precip_mm decimal Precipitation for the period in mm
et0_mm, etc_mm decimal Reference evapotranspiration and crop water use for the period in mm
delta_t decimal Delta-T in °C (air temperature minus wet-bulb temperature). 2 to 8 is the ideal spraying range
leaf_wet int 1 = Yes 0 = No
Leaves likely wet
spray string good, marginal or poor
spray_reason string Why the period is not good: rain (rain now or in the next ~2 hours), wind (above 15 km/h, or above 20 km/h / gusts above 30 km/h for poor), evaporation (Delta-T above 8, or above 10 for poor), temperature (below 5 or above 30 °C), inversion_risk (wind below 3 km/h), high_humidity (Delta-T below 2). Empty when good

Example response (shortened to two hours)

                            {
    "location": {
        "name": "London",
        "region": "City of London, Greater London",
        "country": "United Kingdom",
        "lat": 51.52,
        "lon": -0.11,
        "tz_id": "Europe/London",
        "localtime_epoch": 1791021600,
        "localtime": "2026-10-03 11:00"
    },
    "crop": {
        "name": "wheat",
        "gdd_base": 0.0,
        "gdd_upper": 30.0,
        "kc": 1.15,
        "heat_threshold": 30.0
    },
    "season": {
        "start": "2026-09-23",
        "end": "2026-10-02",
        "days": 10,
        "gdd": 140.0,
        "rain_mm": 20.0,
        "et0_mm": 20.3,
        "etc_mm": 23.4,
        "water_balance_mm": -3.4
    },
    "forecast": {
        "forecastday": [
            {
                "date": "2026-10-03",
                "date_epoch": 1790985600,
                "day": {
                    "maxtemp_c": 18.0,
                    "mintemp_c": 6.0,
                    "gdd": 12.0,
                    "gdd_cumulative": 152.0,
                    "rain_mm": 0.0,
                    "et0_mm": 2.18,
                    "etc_mm": 2.5,
                    "water_balance_mm": -2.5,
                    "chill_hours": 5.0,
                    "frost_hours": 0.0,
                    "hard_frost_hours": 0.0,
                    "heat_stress_hours": 0.0,
                    "leaf_wet_hours": 1.0,
                    "disease_risk": "low",
                    "smith_period": 0,
                    "spray_good_hours": 17.0,
                    "spray_marginal_hours": 7.0
                },
                "hour": [
                    {
                        "time_epoch": 1791014400,
                        "time": "2026-10-03 09:00",
                        "period_hours": 1.0,
                        "temp_c": 12.0,
                        "humidity": 70.0,
                        "dewpoint_c": 6.0,
                        "wind_kph": 9.0,
                        "gust_kph": 14.4,
                        "precip_mm": 0.0,
                        "et0_mm": 0.066,
                        "etc_mm": 0.076,
                        "delta_t": 3.2,
                        "leaf_wet": 0,
                        "spray": "good",
                        "spray_reason": ""
                    },
                    {
                        "time_epoch": 1791028800,
                        "time": "2026-10-03 13:00",
                        "period_hours": 1.0,
                        "temp_c": 17.2,
                        "humidity": 53.0,
                        "dewpoint_c": 7.7,
                        "wind_kph": 9.0,
                        "gust_kph": 14.4,
                        "precip_mm": 0.0,
                        "et0_mm": 0.275,
                        "etc_mm": 0.316,
                        "delta_t": 5.6,
                        "leaf_wet": 0,
                        "spray": "good",
                        "spray_reason": ""
                    }
                ]
            }
        ]
    }
}
                        

Notes

  • Growing degree days use the capped-average method: the daily maximum is capped at gdd_upper and the minimum is raised to gdd_base.
  • ET0 uses the FAO-56 Penman-Monteith method. Crop coefficients are FAO-56 mid-season values; set kc yourself for other growth stages.
  • Disease risk is a generic indicator from leaf wetness and temperature, not a model for a specific disease. Spray ratings follow common label guidance; always follow the product label.

Quick and Easy Signup for Weather API

WeatherAPI.com makes it super easy to integrate our realtime, daily, hourly and 15 min interval weather forecast data, historical weather, marine weather, bulk request, air quality data, pollen, evapotranspiration, autocomplete, time zone, astronomy and sports data into your new or existing project.