API Documentation

Authentication

Authenticate your requests by including your API key as a key query parameter.

HTTP
GET https://api.frostdates.com/frost-dates?key=YOUR_API_KEY&location=london,uk

Get your API key from the API Keys page.

Base URL

https://api.frostdates.com

GET /frost-dates

Returns frost dates, USDA hardiness zone, and optional average temperatures for a location.

Parameters

ParameterTypeRequiredDescription
keystringYesYour API key
locationstringYesLocation query (city name, postal code, or lat/long)
incavgtempsbooleanNoInclude monthly average min/max temperatures

Response

JSON
{
  "location": {
    "latitude": 51.5,
    "longitude": -0.1,
    "areaName": "London",
    "country": "United Kingdom",
    "region": "Greater London"
  },
  "frostDates": {
    "airFrost": {
      "first": { "day": 310, "month": 11, "dateString": "6 November" },
      "last": { "day": 95, "month": 4, "dateString": "5 April" }
    },
    "lightGroundFrost": {
      "first": { "day": 285, "month": 10, "dateString": "12 October" },
      "last": { "day": 120, "month": 4, "dateString": "30 April" }
    },
    "hardGroundFrost": {
      "first": { "day": 335, "month": 12, "dateString": "1 December" },
      "last": { "day": 65, "month": 3, "dateString": "6 March" }
    }
  },
  "usdaZone": "8b"
}

Frost Types

TypeThresholdDescription
airFrost0°CTemperature at which exposed plants are damaged
lightGroundFrost-2°CLight frost at ground level affecting tender plants
hardGroundFrost-5°CHard freeze damaging most plants

GET /search-locations

Search for locations by name. Returns a list of matching locations with coordinates.

Parameters

ParameterTypeRequiredDescription
keystringYesYour API key
querystringYesSearch query (min 3 characters)

Response

JSON
[
  {
    "areaName": "New York",
    "country": "United States of America",
    "region": "New York",
    "latitude": "40.714",
    "longitude": "-74.006",
    "population": "8175133"
  }
]

GET /test-locations

Returns the list of 10 free test locations. These locations can be queried unlimited times without a paid subscription and don't count against your quota. No authentication required.

HTTP
GET https://api.frostdates.com/test-locations

Use the query field value as the location parameter in the /frost-dates endpoint.

Available Test Locations

LocationQuery ValueHemisphere
Fairbanks, Alaskafairbanks, alaskaNorthern
Winnipeg, Canadawinnipeg, canadaNorthern
Chicago, USAchicago, usaNorthern
London, UKlondon, ukNorthern
Tokyo, Japantokyo, japanNorthern
Nairobi, Kenyanairobi, kenyaEquatorial
SingaporesingaporeEquatorial
Cape Town, South Africacape town, south africaSouthern
Sydney, Australiasydney, australiaSouthern
Buenos Aires, Argentinabuenos aires, argentinaSouthern

Rate Limits & Quotas

PlanPriceDailyMonthlyRate Limit
Starter$19/mo1002,00010/min
Pro$49/mo50010,00030/min
Business$99/mo1,00030,00060/min

Response Headers

Successful developer requests include these headers:

HeaderDescription
X-RateLimit-LimitPer-minute rate limit
X-Quota-Daily-LimitDaily request limit
X-Quota-Daily-RemainingRemaining daily requests
X-Quota-Monthly-LimitMonthly request limit
X-Quota-Monthly-RemainingRemaining monthly requests

Error Codes

StatusMeaningExample
400Bad RequestMissing or invalid parameters
401UnauthorizedMissing or invalid API key
403ForbiddenNo paid subscription (non-test location)
404Not FoundLocation not found or insufficient climate data
429Too Many RequestsDaily, monthly, or per-minute limit exceeded
500Internal ErrorServer-side error

All error responses return JSON:

JSON
{ "error": "Description of the error." }

Code Examples

curl

bash
curl "https://api.frostdates.com/frost-dates?key=YOUR_API_KEY&location=london,uk"

JavaScript (fetch)

javascript
const API_KEY = 'YOUR_API_KEY';
const location = 'london,uk';

const response = await fetch(
  `https://api.frostdates.com/frost-dates?key=${API_KEY}&location=${encodeURIComponent(location)}`
);

if (!response.ok) {
  const error = await response.json();
  throw new Error(error.error);
}

const data = await response.json();
console.log(data.frostDates.airFrost);
console.log('USDA Zone:', data.usdaZone);

Python (requests)

python
import requests

API_KEY = "YOUR_API_KEY"
location = "london,uk"

response = requests.get(
    "https://api.frostdates.com/frost-dates",
    params={"key": API_KEY, "location": location}
)

response.raise_for_status()
data = response.json()

print(f"USDA Zone: {data['usdaZone']}")
print(f"First air frost: {data['frostDates']['airFrost']['first']['dateString']}")
print(f"Last air frost: {data['frostDates']['airFrost']['last']['dateString']}")

Embeddable Widget

Don't want to build a custom integration? Use our drop-in widget to add international frost date lookups to any website with just two lines of HTML. Covers locations worldwide. Free to use with a "Powered by frostdates.com" link, or remove branding with a paid API plan.