GET /points/{{latitude}},{{longitude}}/forecast

Description

Returns up to 15 days of daily weather forecast data or 240 hours of hourly weather forecast data for a latitude/longitude point.

Our patented OnPoint™ system uniquely derives contiguous data for every possible latitude/longitude location. This resource is globally available, everywhere there is landmass (except Antartica).

Requires a subscription plan with the “read_forecast” and “access_points” capabilities to access this resource.

This resource is not available to free 30-day developer plans. However, postal code forecast is available. Please email sales@weathersource.com or call (844) 813-2617 if you need access to this resource.

Resource URL

https://api.weathersource.com/v1/{{api_key}}/points/{{latitude}},{{longitude}}/forecast.{{format}}

Resource URL Replacement Parts

{{api_key}}

Your API Key. If you do not have an API key, you may sign up for a free developer account 30-day trial.

{{latitude}}

A latitude value (e.g. 38.8552) between -90° and 90°.

{{longitude}}

A longitude value (e.g. -77.0513) between -180° (West) and 180° (East).

{{format}}

The desired response format. Allowed formats are:

  • json
  • csv

Parameters


Warning: Undefined array key "private" in /var/www/html/wp-content/themes/developer.weathersource.com/single-resource.php on line 108

Warning: Undefined array key "private" in /var/www/html/wp-content/themes/developer.weathersource.com/single-resource.php on line 110

Warning: Undefined array key "private" in /var/www/html/wp-content/themes/developer.weathersource.com/single-resource.php on line 108

Warning: Undefined array key "private" in /var/www/html/wp-content/themes/developer.weathersource.com/single-resource.php on line 110

Warning: Undefined array key "private" in /var/www/html/wp-content/themes/developer.weathersource.com/single-resource.php on line 108

Warning: Undefined array key "private" in /var/www/html/wp-content/themes/developer.weathersource.com/single-resource.php on line 110

Warning: Undefined array key "private" in /var/www/html/wp-content/themes/developer.weathersource.com/single-resource.php on line 108

Warning: Undefined array key "private" in /var/www/html/wp-content/themes/developer.weathersource.com/single-resource.php on line 110
timestamp_eq optional

A response condition that returns a single element matching a timestamp.

timestamp_eq or timestamp_between may be provided, but not both.

All timestamps are assumed local to the request location unless a UTC offset is provided (as part of the ISO 8601 format).

The returned timestamp may not equal the provided value, but will be representative of the value. For example, if the period parameter is set to hour and the provided timestamp is for 8:15 a.m., the returned element will be for the 8 a.m. hour.

Allowed Values: ISO 8601 timestamp

Example Value: 2018-10-12T08:00-07:00 or 2018-10-12

timestamp_between optional

A response condition that returns a range of elements between the provided a timestamps.

timestamp_eq or timestamp_between may be provided, but not both.

Response latency is reduced with tightly defined date ranges.

All timestamps are assumed local to the request location unless a UTC offset is provided (as part of the ISO 8601 format).

The returned timestamp may not equal the provided value, but will be representative of the value. For example, if the period parameter is set to hour and the provided timestamp is for 8:15 a.m., the returned element will be for the 8 a.m. hour.

Allowed Values: Two comma separated ISO 8601 timestamps

Default Value: The full date range of the current forecast.

Example Value: 2018-10-12T08:00-07:00,2018-10-13T08:00-07:00

period optional

Identifies the class of weather observations (i.e. weather for a day or for an hour).

Allowed Values: hour, day

Default Value: day

fields optional

Set response to a subset of fields within each element.

For fastest response times, limit the fields to those required.

Available field names:

The Hour class of weather data fields (period parameter is set to hour):

The Day class of weather data fields (period parameter is set to day):

Field groups (available for day and hour periods):

Allowed Values: Comma separated list of field names

Default Value: all

Resource Information

API Versions v1
Rate Limited? Yes
Requires Authentication? Yes
Response Formats JSON
JSONP
CSV
HTTP Method GET

Related Documentation

Example Request

GET https://api.weathersource.com/v1/{{api_key}}/points/38.8552,-77.0513/forecast.json?period=day&fields=allMeta,tempMax

[{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-06-29T00:00:00-04:00","tempMax":88.3},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-06-30T00:00:00-04:00","tempMax":90.8},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-07-01T00:00:00-04:00","tempMax":88.9},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-07-02T00:00:00-04:00","tempMax":90.6},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-07-03T00:00:00-04:00","tempMax":91.1},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-07-04T00:00:00-04:00","tempMax":86.9},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-07-05T00:00:00-04:00","tempMax":87.2},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-07-06T00:00:00-04:00","tempMax":82.1},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-07-07T00:00:00-04:00","tempMax":94},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-07-08T00:00:00-04:00","tempMax":86.1},{"latitude":"38.8552","longitude":"-77.0513","timestamp":"2017-07-09T00:00:00-04:00","tempMax":64.4}]