Weather API Developer's Guide

Report

This resource retrieves weather reports, weather forecasts, severe weather alerts and moon and sun rise and set information.

Requests against this resource use the HTTP GET method. The report criteria are specified by means of query parameters, which must include a report product and a location.

A location can be defined by one of the following parameters:

  • latitude and longitude – geographical coordinates indicating the location for which to obtain a report; the response is for the closest locations to these coordinates
  • name – name of a city, town or location for which to obtain a report
  • zipcode – ZIP code of the area for which to obtain a report covers

Each search request must conform to the following pattern:

.../weather/1.0/report.{format}?{parameter}={value}...

Request Example

The code block below shows a report request that specifies the report product as observation and uses a city name (name) to define the search area:


https://weather.cit.api.here.com/weather/1.0/report.xml
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&product=observation&name=Berlin

Request Parameters

The table below documents both mandatory and optional request parameters supported by the report resource.

Parameter Required Description
app_id Yes

A 20-byte Base64 URL-safe encoded string used for authentication of the client application.

You must include an app_id and app_code with every request. For information about how to get an app_id assigned to you, see Acquiring Credentials.

app_code Yes

A 20-byte Base64 URL-safe encoded string used for authentication of the client application.

You must include an app_id and app_code with every request. For information about how to get an app_id assigned to you, see Acquiring Credentials.

product Yes

A parameter identifying the type of report to obtain.

The possible values are as follows:

  • observation – current weather conditions from the eight closest locations to the specified location
  • forecast_7days – morning, afternoon, evening and night weather forecasts for the next seven days.
  • forecast_7days_simple – daily weather forecasts for the next seven days
  • forecast_hourly – hourly weather forecasts for the next seven days
  • forecast_astronomy – information on when the sun and moon rise and set, and on the phase of the moon for the next seven days
  • alerts – forecasted weather alerts for the next 24 hours
  • nws_alerts – all active watches and warnings for the US and Canada
latitude and longitude latitude and longitude, name or zipcode must be present

Geographical coordinates in WGS-84-compliant format, specifying the area covered by the weather report. For example, latitude=41.83&longitude=-87.68 requests a report for these coordinates.

The response is for the closest reporting stations to these coordinates.

name latitude and longitude, name or zipcode must be present

Name of a city. If there is more than one match for the name, then the most populous location is in the response. Country, state and street name can be added to this parameter.

For example, the response for name=Berlin, USA is a report for the city of Berlin, New Hampshire, the response for name=Berlin, IL is a report for the city of Berlin, Illinois, and the response for name=Berlin is a report for the city of Berlin, Germany.

zipcode latitude and longitude, name or zipcode must be present

ZIP code of the location.

This parameter is supported only for locations in the United States of America.

hourlydate No

Date for which hourly forecasts are to be retrieved. The format is YYYY-MM-DD or YYYY-MM-DDThh:mm:ss

Available only when the product parameter is set to forecast_hourly

If you set hourlydate for a date and time in the past or more than seven days in the future, the response does not contain any information. If you set hourlydate to the current date, the response contains hourly forecasts for the current date, including some forecasts before when you sent the query depending on the data in the system. If you set hourlydate to a future date, the response contains hourly forecasts for the entire day.

oneobservation No

Boolean, if set to true, the response only includes the closest location.

Only available when the product parameter is set to observation.

Default: false

language No

Defines the language used in the descriptions in the response. For example, the response for a query with language=german has descriptions in German.

For a list of the supported languages, see Supported Languages.

If the language specified is not supported, the response contains descriptions in English.

Default: english

metric No

Boolean, defines whether metric or imperial units are used in the response.

If set to false, the response contains imperial units (feet, inch, Fahrenheit, miles).

Default: true

Response to this Request

For the response to weather report requests, see Report Response.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.