Current weather and forecast for single location
Location specification
The location of the weather data is the only parameter that is required and must be specified. There are two ways to do this:
- Specify the GPS coordinates of the location using the parameters
latandlon. - OR specify the name of the place using the parameter
place_id. To obtain theplace_idfor the location you want, please use endpoints/find_places_prefix(search by prefix) or/find_places(search by full name).
Note: For mountains, it is usually better to specify the place_id rather than the lat and lon. When you use place_id, you are guaranteed to receive forecasts for the precise elevation of the peak. When you specify the coordinates, the elevation can be less precise.
Sections
The endpoint can return multiple sections of data. To obtain the best performance, we advise only requesting the sections you actually need. The available sections are as follows:
- Current weather situation
- Hourly forecast (for 24/48/96/168 hours, depending on the tier)
- Daily forecast (for 7/10/30 days, depending on the tier)
- Minutely precipitation forecast (for 60 minutes in the following hour, only for higher tiers)
- Weather alerts (only for higher tiers)
By default, only the current and hourly sections are returned. The division into daily parts (morning, afternoon and evening) is only available for the first 7 days of the forecast. For details regarding available parameters, see the parameter description below.
Notes
- For a detailed description of variables (e.g. icons), please consult ⚠️ ⚠️ in Documentation or
Schemaof the response (link next to Example value in the Responses section below). - Variables can be instantaneous, averaged, or accumulated over certain time. For example,
precipitationforecast provides the precipitation accumulated until the next hour (data with timestamp as12:00:00is rain accumulated from12:00:00to13:00:00). - Do not make any assumptions about the number and ordering of the variables. New variables and sections may be introduced in the future. Always check the data are present before you try to use them.
- The response contains an
Expiresheader, which defines the point at which the API response will not change for the same request. We highly recommend using this to avoid unnecessary requests and increase the performance of your app. - Meteosource API supports HTTP compression. To enable it, simply add an
Accept-Encoding: gzipheader to your request. - When daylight saving time starts, one hourly record will be missing (typically
2:00:00 AM). When daylight saving time ends, the hourly forecast will contain two records with duplicate times (typically2:00:00 AM). - The detailed description of weather alerts is only available in English. The alert category is translated into selected language.