Chill Hours
Agriculture Weather Credits / request: 1Weinberger chill hours: count of hourly temperatures between 0°C and baseTemp (default 7.2°C). Sub-freezing hours are not counted. Comparable to published variety chill requirements. Not a prescription.
Documentation
Overview
Weinberger chill hours model: count of hours with 0°C ≤ temperature ≤ baseTemp (default 7.2°C). Sub-freezing hours are not counted. Comparable to published variety chill requirements. Requires hourly DB. Not a prescription. Weather data © Copernicus ERA5 / ERA5-Land (contains modified Copernicus Climate Change Service information) / Open-Meteo / OpenWeather / MET Norway.
Authentication
Every request requires the x-api-key header. Credits used and remaining quota are returned in response headers (x-api-credits-used, x-api-remaining-credits, x-rate-limit-*).
Request
Parameters
| Name | Type | Required | Default | Options | Description |
|---|---|---|---|---|---|
latitude |
number | * Required | — | — | Latitude -90..90. 0.1° cell. |
longitude |
number | * Required | — | — | Longitude. |
fromDate |
string | * Required | — | — | YYYY-MM-DD |
toDate |
string | * Required | — | — | Max 366 days. |
baseTemp |
number | Optional | 7.2 |
— | Upper threshold °C, 0..20. Default 7.2. |
crop |
string | Optional | — | wheat barley maize sunflower cotton potato tomato rapeseed oats rye sugarbeet grape apple chickpea lentil |
Informational crop code. |
includeDaily |
boolean | Optional | true |
true false |
Daily breakdown. Default true. |
Response
| Name | Type | Description |
|---|---|---|
chillHours |
integer | Hours with 0°C ≤ temperature ≤ baseTemp (Weinberger). |
hoursEvaluated |
integer | Hours that have a temperature. |
hoursMissing |
integer | Expected hours in the window minus evaluated. |
baseTemp |
number | Threshold used °C. |
crop |
string | Normalized crop. Null if omitted. |
fromDate |
string | YYYY-MM-DD. |
toDate |
string | YYYY-MM-DD. |
gridLatitude |
number | 0.1° cell latitude. |
gridLongitude |
number | 0.1° cell longitude. |
daily |
array | Daily rows when includeDaily=true. |
daily[].date |
string | YYYY-MM-DD. |
daily[].hoursBelow |
integer | Hours that day with 0°C ≤ temperature ≤ baseTemp. |
daily[].tmin |
number | Day min °C. |
daily[].tmax |
number | Day max °C. |
method |
string | weinberger. |
source |
string | database. |
disclaimer |
string | Decision-support disclaimer. |
Errors
| HTTP | code | Description |
|---|---|---|
400 |
-255 |
lat/lon missing or out of range. |
400 |
-254 |
fromDate/toDate invalid or range > 366. |
400 |
-249 |
baseTemp outside 0..20. |
400 |
-250 |
Unknown crop. |
429 |
-316 |
Daily new location (cell) limit (50) reached. Previously requested locations keep working; new locations next day (UTC). Retry-After header gives seconds until end of day. |
503 |
-256 |
Hourly data not ready; Worker is filling. |
400 |
-251 |
No cell/hourly data. |
401 |
-100 |
x-api-key is missing, empty, malformed, inactive, banned, expired, IP-restricted, or not allowed for this API. |
429 |
-221 |
Per-minute request limit exceeded. Response headers: x-rate-limit-limit, x-rate-limit-remaining, x-rate-limit-reset. |
429 |
— | Package credit quota cannot cover this request. Body may be { error, limit, currentUsage, requestCost } (no code field). |
500 |
-1 |
Unexpected server error. message is a generic error text without technical details. |
Notes
- Success body is { data: { ... } }. Error body is { code, message }. code is an ApiResponseCode enum value (negative integer).
Sample response
{
"data": {
"chillHours": 842,
"hoursEvaluated": 2880,
"hoursMissing": 0,
"baseTemp": 7.2,
"crop": "apple",
"fromDate": "2025-11-01",
"toDate": "2026-02-28",
"gridLatitude": 39.90,
"gridLongitude": 32.90,
"daily": [
{
"date": "2025-11-01",
"hoursBelow": 8,
"tmin": 2.1,
"tmax": 12.4
}
],
"method": "weinberger",
"source": "database",
"disclaimer": "Decision support only. Not agronomic advice. Weather data: Copernicus ERA5 / ERA5-Land, Open-Meteo, OpenWeather, MET Norway. Contains modified Copernicus Climate Change Service information."
}
}
Code samples
const response = await fetch('https://api.apikodu.com/api/v1/agriculture/chillhours', {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
import requests
headers = {
'x-api-key': 'YOUR_API_KEY'
}
response = requests.get('https://api.apikodu.com/api/v1/agriculture/chillhours', headers=headers)
print(response.json())
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var response = await client.GetStringAsync("https://api.apikodu.com/api/v1/agriculture/chillhours");
Console.WriteLine(response);
$response = file_get_contents('https://api.apikodu.com/api/v1/agriculture/chillhours', false, stream_context_create([
'http' => [
'header' => "x-api-key: YOUR_API_KEY"
]
]));
print_r(json_decode($response, true));
curl -X GET 'https://api.apikodu.com/api/v1/agriculture/chillhours' \
-H 'x-api-key: YOUR_API_KEY'
Start building in minutes
Create a free account, get your API key and send your first request in minutes.