Skip to content

Current Conditions

Retrieves the current weather conditions for a given country and zip/postal code.

Endpoint GET

https://api.ttgtoolbox.com/v1/weather/country_code/postal_code/current

Required path parameters

This endpoint uses the GET method and has the following required parameters.

country_coderequired

We support the following country codes.

CountryCode
United StatesUS
CanadaCA

postal_coderequired

A valid zip / postal code is required.

Optional query parameters

units

Use the units parameter to specify the units for all fields with standard units, e.g., miles or kilometers. The following units are supported:

unitsExamples
imperialmiles, fahrenheit, in. mercury
metrickilometers, celsius, pascals

Example request URL

https://api.ttgtoolbox.com/v1/weather/US/49010/current

Example request URL with optional parameter

https://api.ttgtoolbox.com/v1/weather/US/49010/current
?units=metric

Returns

A JSON object containing the current weather conditions.


Response

json
{
  "time": "2024-03-06T11:22:13-05:00",
  "timezone": "America/Detroit",
  "latitude": 42.5256,
  "longitude": -85.8661,
  "location": "Allegan, Michigan, US",
  "temperature": 44.85,
  "feels_like": 40.98,
  "humidity": 78,
  "dew_point": 38.43,
  "uv_index": 2.55,
  "clouds": 89,
  "visibility": 10000,
  "wind_speed": 7,
  "wind_deg": 36,
  "wind_direction": "NE",
  "wind_gust": 14,
  "description": "overcast clouds",
  "units": "imperial"
}