Daily Observed Weather by Geolocation

You are here:
< All Topics
image_pdfDownload as PDF

Understanding the recent and long-term daily weather is critical for making in-season decisions. This API opens the weather attributes that matter most to agriculture. Historical access varies based on API subscription. For dates past your account’s limit, use the Norms API to get multi-year averages.

Note: Most aWhere customers reference locations by a registered field ID. At this time, all our supporting resources and code samples are geared for these use cases. If you need assistance using this API please contact your aWhere representative.

API Request

API Endpoints

▶ HTTP VERBS AND URIS

GET /v2/weather/locations/{latitude},{longitude}/observations
  • The default observations endpoint will return the last 7 days of data for the location.
GET /v2/weather/locations/{latitude},{longitude}/observations/{singleDate}
GET /v2/weather/locations/{latitude},{longitude}/observations/{startDate},{endDate}
  • Use either a single date or a start and end date to return any number of days of data.
  • When selecting a range of days, by default 10 days will be included on each page of the list, but you can change this with query string parameters.

▶ PARAMETERS

PARAMETERDESCRIPTIONVALID VALUES
{latitude}The decimal-notation latitude of the location for which you want weather data.A number
{longitude}The decimal-notation longitude of the location for which you want weather data.A number
{singleDate}A single date, for which the API will return just one day’s worth of observed weather for the location. This day must be yesterday or earlier.A date formatted as YYYY-MM-DD
{startDate}
and
{endDate}
Two dates separated by a comma, implying the start and end date of a range. The API will return data for all the days between those dates (inclusive). Both dates must yesterday or earlier.Dates formatted as YYYY-MM-DD

Query String Parameters

QUERY PARAMETER NAMEDESCRIPTIONVALID VALUES
limitThe number of results to include in each response. Used in conjunction with offset to paginate.

Applies only when requesting more than one day.
An integer number up to 10 for all users.
offsetThe number of objects to skip before returning objects. Used in conjunction with offset to paginate. For example, if limit=10 and offset=10, then the API will return the second page of results.

Applies only when requesting more than one day.
An integer up to the total number of results.
sortThis API can sort its results by date, descending or ascending, when this parameter is used and set to date. See Sorting Conventions for more information.

Applies only when requesting more than one day.
date
propertiesOnly include these properties in the daily data. If not specified, then all properties are included by default. Any properties not specified are always included, and all child properties of a selection are included. Separate multiple choices with a comma. For example if you specify temperatures you will get min, max, and units.

Applies to all endpoints.
location
temperatures
precipitation
solar
relativeHumidity
wind
unitsBy default, the API will return metric units (e.g., Celsius, millimeters, etc). When set to usa:
-temperatures are returned in Fahrenheit
-precipitation is returned in inches
-wind speed is returned in miles per hour
The API response includes properties that indicate the units for each temperature attribute. This parameter applies to all endpoints.
usa
metric

Request Body

None

HTTP Headers

Remember to always send your OAuth2 Access Token in the Authorization header (see Authentication). This API doesn’t require any additional headers.

API Response

Response HTTP Status Codes and Headers

This API returns standard HTTP status codes and headers for aWhere APIs. Additionally, when requesting multiple days of data, the API returns a Content-Range header which is another way to know how many results are being shown and the total number of results. It looks like this:

Content-Range: observations {start}-{end}/{total}

Response Body

▶ FORMAT

{
 "observations":[{
    "date":"{date}",
    "location":":{
        "latitude":{latitude},
        "longitude":{longitude}
        },
    "temperatures":{ 
        "max":{maxTemp},
        "min":{minTemp}, 
        "units":"{tempUnits}"
        },
    "precipitation":{
        "amount":{precipitation},
        "units":"{precipUnits}"
        },
    "solar":{
        "amount":{solar},
        "units":"{solarEnergy}"
        },
    "relativeHumidity":{ 
        "max":{maxHumidity},
        "min":{minHumidity}
        },
    "wind":{ 
        "dayMax":{dayMaxWind},
        "morningMax":{morningMaxWind}, 
                "average":{averageWind},               
        "units":"{windUnits}"
        },
    "_links":{ 
        "self":{"href":"{dailySelfLink}"}

        }
    },{ 
        ... repeat ... 
    }
 ],
 "_links":{
    "self":{"href":"{list_self}"},
    "next":{"href":"{next_page}"},
    "prev":{"href":"{previous_page}"},"}
 }
}

Note: When requesting just a single day of data, the response is only a single day’s object, shown here as the first object in the observations array.

▶ PROPERTY DESCRIPTIONS

NAMEDESCRIPTION
dateThe date for which the weather attributes apply. Each day in the requested range is an object in the observations array.
locationThe location the weather is for, echoing the supplied latitude and longitude.
temperaturesThe daily high and low temperature at the location, plus a property that describes the temperature units (e.g., “F” for Fahrenheit or “C” for Celsius). You can change the units with the units query string parameter.
precipitationThe amount of rain that fell in this location on this day, with the units (either “mm” or millimeters or “in” for inches). You can change the units with the units query string parameter.
solarThe solar energy received that day. There is a units child property, but its value will always be in Watt hours per square meter (Wh/m^2).
relativeHumidityThe daily high and low relative humidity at the location. The units are always in percent.
windThe day’s highest wind speed, highest wind speed measured in the morning hours, and average wind speed with the units (either “m/sec” for meters per second, or “mph” for miles per hour) recorded at 10m. You can change the units with the units query string parameter.
{dailySelfLink}The URI you can use to retrieve a specific day’s weather (useful for caching a response).
{list_self}The URI used to generate the list, which includes any current pagination parameters
{next_page}The URI used to get the next page of results, using the same limit used for this request (default is 10). If there are no more results this property is not included.
{previous_page}The URI used to get the previous page of results, using the same limit used for this request (default is 10). If you’re at the beginning of the list this property is not included.
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents