GuidesAPI Reference
Guides

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:

https://weather.cc.api.here.com/weather/1.0/report.{format}?{parameter}={value}...

Request example

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

/https://weather.cc.api.here.com/weather/1.0/report.xml
&product=observation&name=Berlin
-H "Authorization: Bearer {YOUR_TOKEN}"
📘

Note

This example uses a token to authenticate your request. For the available authentication options, see the Identity and Access Management Developer Guide.

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

Request parameters

ParameterRequiredDescription
app_id-legacyYesxs:string
A 20-byte Base64 URL-safe encoded string used for the authentication of the client application. For more information on authentication, see the Identity and Access Management Developer Guide.

If you use the app ID/app code option, you need to include an app_id and app_code with every request. For more information on authentication, see the Identity and Access Management Developer Guide.
app_code-legacyYesxs:string A 20-byte Base64 URL-safe encoded string used for the authentication of the client application. For more information on authentication, see the Identity and Access Management Developer Guide. If you use the app ID/app code option, you need to include an app_id and app_code with every request. For more information on authentication, see the Identity and Access Management Developer Guide.
productYesA parameter identifying the type of report to obtain. The possible values are: * 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 longitudelatitude, 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&amplongitude=-87.68 requests a report for these coordinates.
The response is for the closest reporting stations to these coordinates.
namelatitude, 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.
zipcodelatitude, longitude, name, or zipcode must be present.ZIP code of the location.
hourlydateNoDate 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 prior forecasts 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.
oneobservationNoBoolean, 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 weather descriptions in the response. For example, the response for a query with language=german has descriptions in German.
NOTE: Location data (city, country, state) can be translated in some cases but not alwyas. Language is not intended to be used for translation of location data. City in case is weather station name is not translated

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
metricbooleanWhether the values in the report use metric or Imperial units.
Default: true, which means that metric values are used.
languageNo