Delta-T Spray Suitability

Delta-T Spray Suitability

Agriculture Weather Credits / request: 3

Computes Delta-T from temperature and relative humidity and flags ideal / caution / unsuitable hours for spraying. Not a prescription.

GET https://api.apikodu.com/api/v1/agriculture/deltat
Documentation
Overview

Computes Delta-T (dry − wet bulb, Stull 2011) from temperature and relative humidity and flags upcoming hours as ideal / caution / unsuitable. Ideal band is typically 2–8 °C. 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
GET https://api.apikodu.com/api/v1/agriculture/deltat?latitude=39.92&longitude=32.87&hours=48
GET query.
Parameters
Name Type Required Default Options Description
latitude number * Required — — Point latitude -90..90. 0.1° cell.
longitude number * Required — — Point longitude.
hours integer Optional 48 — Hours ahead 1–96. Default 48.
idealMin number Optional 2 — Ideal Delta-T lower threshold °C. Default 2.
idealMax number Optional 8 — Ideal Delta-T upper threshold °C. Default 8.
cautionMax number Optional 10 — Caution band upper threshold °C. Above is unsuitable. Default 10.
includeHours boolean Optional true true false Hourly breakdown. Default true.
Response
Name Type Description
idealHours integer Hours in the ideal band.
cautionHours integer Hours in the caution band.
unsuitableHours integer Unsuitable hours (including missing data).
hoursEvaluated integer Hours evaluated.
fromTime string First hour UTC ISO.
toTime string Last hour UTC ISO.
idealMin number Ideal lower threshold used °C.
idealMax number Ideal upper threshold used °C.
cautionMax number Caution upper threshold used °C.
gridLatitude number 0.1° cell latitude.
gridLongitude number 0.1° cell longitude.
windows array Contiguous ideal hour ranges.
windows[].fromTime string Window start UTC ISO.
windows[].toTime string Window end UTC ISO.
windows[].hours integer Hours in the window.
hours array Hourly rows when includeHours=true.
hours[].time string Hour UTC ISO.
hours[].tempC number Temperature °C.
hours[].humidityPercent number Relative humidity %.
hours[].deltaT number Delta-T °C. null when humidity is outside 5–100%.
hours[].rating string ideal, caution, unsuitable or unknown.
method string Calculation method: delta-t.
source string database: tarim_hava cell.
disclaimer string Decision-support disclaimer. Not a prescription.
Errors
HTTP code Description
400 -255 latitude/longitude missing or out of range.
400 -249 hours outside 1–96 or invalid threshold order (0 ≤ idealMin < idealMax ≤ cautionMax).
400 -251 No stored weather cell for this location.
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 Cell created; Worker is filling hourly data. Retry in a minute.
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": {
    "idealHours": 21,
    "cautionHours": 9,
    "unsuitableHours": 18,
    "hoursEvaluated": 48,
    "fromTime": "2026-08-30T00:00:00Z",
    "toTime": "2026-08-31T23:00:00Z",
    "idealMin": 2.0,
    "idealMax": 8.0,
    "cautionMax": 10.0,
    "gridLatitude": 39.90,
    "gridLongitude": 32.90,
    "windows": [
      {
        "fromTime": "2026-08-30T05:00:00Z",
        "toTime": "2026-08-30T09:00:00Z",
        "hours": 5
      }
    ],
    "hours": [
      {
        "time": "2026-08-30T05:00:00Z",
        "tempC": 17.4,
        "humidityPercent": 71.0,
        "deltaT": 3.1,
        "rating": "ideal"
      },
      {
        "time": "2026-08-30T13:00:00Z",
        "tempC": 31.2,
        "humidityPercent": 28.0,
        "deltaT": 11.8,
        "rating": "unsuitable"
      }
    ],
    "method": "delta-t",
    "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. Not a pesticide prescription."
  }
}

Code samples

  
      const response = await fetch('https://api.apikodu.com/api/v1/agriculture/deltat', {
        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/deltat', 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/deltat");
      Console.WriteLine(response);
  
  
      $response = file_get_contents('https://api.apikodu.com/api/v1/agriculture/deltat', 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/deltat' \
        -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.

Get started free