Daily Observed Weather

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. By default you are allowed access of up to 30 months of data (beyond that, use the Norms API to get multi-year averages).

On This Page...

API Request

API Endpoints

HTTP Verbs and URIs

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

Parameters

Parameter Description Valid Values
{fieldId} The ID of the field location for which you want weather. A string
{singleDate} A single date, for which the API will return just one day's worth of observed weather for the field 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 Name Description Valid Values
limit The 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 120
offset The number of objects to skip before returning objects. Used in conjunction with limit to paginate. For example, if limit=50 and offset=50, then the API will be returning the second page of results.

Applies only when requesting more than one day.
An integer up to the total number of results.
sort This 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
properties Only 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.
temperatures
precipitation
solar
relativeHumidity
wind
units By 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: {start}-{end}/{total} fields

Response Body

Format

{
 "observations":[{
    "date":"{date}",
    "location":":{
        "latitude":{latitude},
        "longitude":{longitude},
        "fieldId":"{fieldId}",
        },
    "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}"},
        "curies":[{
            "name":"awhere",
            "href":"http://awhere.com/rels/{rel}",
            "templated":true
            }],
        "awhere:field":{"href":"{fieldLink}"}

        }
    },{ 
        ... repeat ... 
    }
 ],
 "_links":{
    "self":{"href":"{list_self}"},
    "next":{"href":"{next_page}"},
    "prev":{"href":"{previous_page}"},"},
    "curies":[{
        "name":"awhere",
        "href":"http://awhere.com/rels/{rel}",
        "templated":true
        }],
    "awhere:field":{"href":"{fieldLink}"}
 }
}

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

Name Description
date The date for which the weather attributes apply. Each day in the requested range is an object in the observations array.
location The location the weather is for, including the geolocation and repeating the supplied Field ID.
temperatures The daily high and low temperature at the field 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.
precipitation The 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.
solar The 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).
relativeHumidity The daily high and low relative humidity at the field location. The units are always in percent.
wind The 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). 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).
awhere:field The URI you can use to retrieve the field location information.
{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 50). 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 50). If you're at the beginning of the list this property is not included.