GuidesAPI Reference
Guides

How to a request a general weather report

This HERE Destination Weather API resource retrieves weather reports, weather forecasts, severe weather alerts, and daily times for sunrise, sunset, moonrise, and moonset.

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 is 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.hereapi.com/v3/report?{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.hereapi.com/v3/report
&products=observation&q=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
productsYesA parameter identifying the type of report to obtain. Comma separated values. The possible values are: * observation – current weather conditions from the eight closest locations to the specified location. * forecast7days – morning, afternoon, evening and night weather forecasts for the next seven days. * forecast7daysSimple – daily weather forecasts for the next seven days. * forecastHourly – hourly weather forecasts for the next seven days. * forecastAstronomy – 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. * nwsAlerts – all active watches and warnings for the US and Canada.
locationlocation, q, or zipCode must be present.Geographical coordinates in WGS-84-compliant format, specifying the area covered by the weather report. For example, location=41.83,-87.68 requests a report for these coordinates. Format: {lat},{lng}
The response is for the closest reporting stations to these coordinates.
qlocation, q, or zipCode must be present.Name of the location. 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.
zipCodelocation, q, or zipCode must be present.ZIP code of the location. ONLY applicable for US
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 forecastHourly.

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
lang
No
Defines the language used in the wetaher descriptions in the response. For example, the response for a query with lang=de-DE has descriptions in German.
NOTE: Place address data (city, country, state) can be translated in some cases but not alwyas. Language is not intended to be used for translation of all address fields. 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: en-US
unitsstringUnits of measurement used. Available values : metric, imperial
Default: metric, which means that metric values are used.
politicalViewNo