Historical Ag-Weather API
Agriculture-focused historical weather fields from blended weather and land-surface sources.
Data returned is sourced from the ERA5 datasets, along with state of the art, satellite based precipitation measurements. With this API, you can retrieve soil temperature, soil moisture, reference evapotranspiration, and more!
- Historical ag-weather data with crop-relevant fields
- Supports both field operations and model inputs
- Global coverage with blended source support
NOTICE: Data is available 10 years in the past from current date.
The following per API request limitations apply (See pricing):
- *Business / Enterprise plans: 7 days per API request.
- Other plan(s): No access
*For convenience, up to 1 month of data can be requested per API request. However, requests that exceed 7 days will count as multiple requests against the plan daily quota. Example: 30 days = 5 requests, 14 days = 2 requests.
Frequently Asked Questions
How is reference evapotranspiration calculated?
Our API uses an updated Penman-Monteith calculation based on the FAO56 methodology, with improvements that better estimate ET0 in hot and humid conditions.
Allen et al. (1998), FAO Irrigation and Drainage Paper No. 56Request Parameters
| Field | Optional/Required | Type | Data Type | Description |
|---|---|---|---|---|
lat
|
Required | query | number | Latitude component of location. |
lon
|
Required | query | number | Longitude component of location. |
start_date
|
Required | query | string | Start Date (YYYY-MM-DD or YYYY-MM-DD:HH). |
end_date
|
Required | query | string | End Date (YYYY-MM-DD or YYYY-MM-DD:HH). |
tp
|
Optional | query | string | Time period of calculation (daily [DEFAULT], or hourly). |
units
|
Optional | query | string | Convert to units. Default Metric. Options (I = Imperial, M = Metric, S = Scientific) |
key
|
Required | query | string | Your registered API key. |
Example Request
lat/lon (recommended)
https://api.weatherbit.io/v2.0/history/agweather?start_date=2026-06-08&end_date=2026-06-13&key=API_KEY&lat=35.7796&lon=-78.6382
curl -s "https://api.weatherbit.io/v2.0/history/agweather?start_date=2026-06-08&end_date=2026-06-13&key=API_KEY&lat=35.7796&lon=-78.6382"
require 'uri'
require 'net/http'
require 'json'
uri = URI("https://api.weatherbit.io/v2.0/history/agweather?start_date=2026-06-08&end_date=2026-06-13&key=API_KEY&lat=35.7796&lon=-78.6382")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = (uri.scheme == "https")
request = Net::HTTP::Get.new(uri)
response = http.request(request)
json = JSON.parse(response.body)
puts JSON.pretty_generate(json)
const https = require("https");
https.get("https://api.weatherbit.io/v2.0/history/agweather?start_date=2026-06-08&end_date=2026-06-13&key=API_KEY&lat=35.7796&lon=-78.6382", (res) => {
let raw = "";
res.on("data", (chunk) => { raw += chunk; });
res.on("end", () => {
const json = JSON.parse(raw);
console.log(JSON.stringify(json, null, 2));
});
}).on("error", (err) => {
console.error(err.message);
});
# pip install python-weatherbit
# https://pypi.org/project/pyweatherbit/
from weatherbit.api import Api
api = Api("YOUR_API_KEY")
response = api.get_history(lat='35.7796', lon='-78.6382', start_date='2026-06-08', end_date='2026-06-13', source='agweather', tp='daily').get()
print(response)
Example Response HTTP 200
{
"data": [
{
"bulk_soil_density": 1370,
"dlwrf_avg": 378.26,
"dlwrf_max": 411.5,
"dlwrf_net": 28.24,
"dswrf_avg": 94.93,
"dswrf_max": 230.25,
"dswrf_net": -78.81,
"evapotranspiration": 1.35,
"precip": 7.75,
"pres_avg": 978.9,
"revision_status": "interim",
"revision_version": "0.0",
"skin_temp_avg": 18.3,
"skin_temp_max": 22.3,
"skin_temp_min": 14.6,
"soilm_0_10cm": 26.71,
"soilm_100_200cm": 319.82,
"soilm_10_40cm": 80.47,
"soilm_40_100cm": 166.35,
"soilt_0_10cm": 17.8,
"soilt_100_200cm": 8.2,
"soilt_10_40cm": 13.6,
"soilt_40_100cm": 10.6,
"specific_humidity": 0.01159,
"temp_2m_avg": 21.8,
"timestamp_local": "2026-05-31T00:00:00",
"timestamp_utc": "2026-05-31T00:00:00",
"v_soilm_0_10cm": 0.267,
"v_soilm_100_200cm": 0.32,
"v_soilm_10_40cm": 0.268,
"v_soilm_40_100cm": 0.277,
"valid_date": "2026-05-31",
"wind_10m_spd_avg": 3.8
}
],
"lat": 41.8781,
"lon": -93.0977
}
HTTP Statuses
| Code | Description | Example |
|---|---|---|
| 200 | An AGWeather Historical Data Object. | - |
| 204 | No Data Found | - |
| 400 | Client Error |
|
| 403 | Unauthorized/No Access for current plan level |
|
| 429 | Daily or Velocity limit exceeded See rate limit guidance. |
|
| 500 | Internal Server Error |
|
Return Fields
| Field | Data Type | Description |
|---|---|---|
lat
|
number | Latitude |
lon
|
number | Longitude |
data
|
array<HistoryAGObj> | |
data[].bulk_soil_density
|
number | Bulk Soil Density |
data[].dlwrf_avg
|
number | Average Downward Longwave Radiation Flux (W/m^2) |
data[].dlwrf_max
|
number | Maximum Downward Longwave Radiation Flux (W/m^2) |
data[].dlwrf_net
|
number | Net Downward Longwave Radiation Flux (W/m^2) |
data[].dswrf_avg
|
number | Average Downward Shortwave Radiation Flux (W/m^2) |
data[].dswrf_max
|
number | Maximum Downward Shortwave Radiation Flux (W/m^2) |
data[].dswrf_net
|
number | Net Downward Shortwave Radiation Flux (W/m^2) |
data[].evapotranspiration
|
number | Reference evapotranspiration - ET0 (default mm) |
data[].precip
|
number | Accumulated liquid equivalent precipitation (default mm) |
data[].pres_avg
|
number | Average Pressure (default mb) |
data[].revision_status
|
string | Data revision status (interim or final). interim = Data subject to change |
data[].revision_version
|
string | Final data revision version |
data[].skin_temp_avg
|
number | Average Skin Temperature (Soil surface Temperature) (Default Celsius) |
data[].skin_temp_max
|
number | Maximum Skin Temperature (Soil surface Temperature) (Default Celsius) |
data[].skin_temp_min
|
number | Minimum Skin Temperature (Soil surface Temperature) (Default Celsius) |
data[].soilm_0_10cm
|
number | Soil Moisture (0-10cm depth) (default mm) |
data[].soilm_100_200cm
|
number | Soil Moisture (100-200cm depth) (default mm) |
data[].soilm_10_40cm
|
number | Soil Moisture (10-40cm depth) (default mm) |
data[].soilm_40_100cm
|
number | Soil Moisture (40-100cm depth) (default mm) |
data[].soilt_0_10cm
|
number | Soil Temperature (0-10cm depth) (default Celsius) |
data[].soilt_100_200cm
|
number | Soil Temperature (100-200cm depth) (default Celsius) |
data[].soilt_10_40cm
|
number | Soil Temperature (10-40cm depth) (default Celsius) |
data[].soilt_40_100cm
|
number | Soil Temperature (40-100cm depth) (default Celsius) |
data[].specific_humidity
|
number | Specific Humidity (kg/kg) |
data[].timestamp_local
|
string | Timestamp in local time |
data[].timestamp_utc
|
string | Timestamp UTC |
data[].temp_2m_avg
|
number | Average Temperature at 2 meters (default C) |
data[].v_soilm_0_10cm
|
number | Volumetric Soil Moisture (0-10cm depth) (fraction) |
data[].v_soilm_100_200cm
|
number | Volumetric Soil Moisture (100-200cm depth) (fraction) |
data[].v_soilm_10_40cm
|
number | Volumetric Soil Moisture (10-40cm depth) (fraction) |
data[].v_soilm_40_100cm
|
number | Volumetric Soil Moisture (40-100cm depth) (fraction) |
data[].valid_date
|
string | Valid Date |
data[].wind_10m_spd_avg
|
number | Average Wind Speed at 10 meters |