GET /postal_codes/:postal_code_and_country/forecast

DEPRECATED. This resource is deprecated. New use of this resource should be avoided. Existing use of this resource should be transitioned away from.

Description

Returns a collection of weather forecast data for a latitude/longitude point. :postal_code_and_country is a comma separated postal code and two-character country code (22222,US). If a US Zip Code is provided, only 5-digit codes are allowed.   Requires a subscription plan with the “read_forecast” capability to access this resource. This resource also has geospatial capabilities (such as “geo_north_america”) that must be available to the subscription plan for corresponding queries.

Resource URL

https://api.weathersource.com/v1/:api_key/postal_codes/:postal_code_and_country/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.

:postal_code_and_country

Comma separated postal code and country values (e.g. 22222,us). Any spaces in the postal code must be URL encoded as %20. The Canadian postal code "X0A 0K0" would be passed as X0A%200K0,ca. The country must be a 2-character ISO 3166-1 country code.

{{format}}

The desired response format. Allowed formats are:

  • .json

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
period optional

Identifies the class of weather forecast data.

Allowed Values: hour, day

Default Value: day

fields optional

Set response to a subset of fields within each element. 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):

Allowed Values: Comma separated list of field names

Default Value: postal_code,timestamp

Resource Information

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

Related Documentation

Example Request

GET https://api.weathersource.com/v1/{api_key}/postal_codes/22222,US/forecast.json?period=hour&fields=temp

[insert response here]