Discover/smhi.se API
live

smhi.se APIsmhi.se

Access SMHI weather forecasts, current conditions, observations, and active warnings for any Swedish location. 5 endpoints covering 10-day hourly data.

Endpoints
5
Updated
4mo ago
Try it
The city or place name to search for (e.g. 'Stockholm', 'Göteborg').
api.parse.bot/scraper/59cbac26-14c5-46e0-8e23-da063f04e411/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/59cbac26-14c5-46e0-8e23-da063f04e411/search_locations?query=Stockholm' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 5 totalclick to expand

Search for locations in Sweden by name. Returns a list of matching places with geonameid, coordinates, and administrative metadata. Results include nearby cities for larger metro areas.

Input
ParamTypeDescription
queryrequiredstringThe city or place name to search for (e.g. 'Stockholm', 'Göteborg').
Response
{
  "type": "object",
  "fields": {
    "data": "array of location objects with geonameid, place, lat, lon, type, municipality, county, country, district, population",
    "status": "string, always 'success'"
  },
  "sample": {
    "data": [
      {
        "lat": 59.3294681359869,
        "lon": 18.0626392364502,
        "type": [
          "PPLC"
        ],
        "place": "Stockholm",
        "county": "Stockholms län",
        "country": "Sverige",
        "district": "Stockholms domkyrkodistrikt",
        "timezone": "Europe/Stockholm",
        "geonameid": 2673730,
        "population": 1253309,
        "municipality": "Stockholm"
      }
    ],
    "status": "success"
  }
}

About the smhi.se API

The SMHI API provides 5 endpoints for retrieving meteorological data across Sweden, including 10-day hourly forecasts, current conditions, MESAN model observations, and active weather warnings. The get_forecast endpoint alone returns three levels of forecast breakdown — 10-day, 24-hour, and 6-hour — along with temperature, precipitation, wind, and weather symbol codes. Location lookup is handled by search_locations, which returns geonameids needed by all other endpoints.

Location Search and Identifiers

All forecast and observation endpoints require a geonameid, which you obtain from search_locations. Pass a Swedish place name as the query parameter and you get back an array of matching locations, each with geonameid, lat, lon, municipality, county, district, and population. Larger metro areas also include nearby cities in the result set. Hold on to the geonameid — every other endpoint in this API is keyed off it.

Forecast and Current Conditions

get_forecast accepts a geonameid and returns a data object with a place metadata block plus three forecast arrays: forecast10d (hourly data for the next 10 days), forecast24h (24-hour summaries), and a 6-hour breakdown. Each forecast entry carries temperature, precipitation, wind fields, and wSymb2 weather symbol codes. get_current_weather returns a lighter response focused on the next hour: t (temperature in Celsius), wSymb2, refTime (ISO reference timestamp), and place metadata — useful for dashboards that only need a single current reading.

Observations and Warnings

get_analysis returns MESAN model analysis data — gridded observational output rather than a forecast. The response includes approvedTime, referenceTime, and a days array with hourly measurements covering temperature, wind, humidity, and visibility for recent hours. This is the right endpoint when you need what actually happened rather than what was predicted.

get_warnings takes no parameters and returns all currently active weather warnings across Sweden. Each warning object includes warningLevel, eventDescription, affectedAreas, approximateStart, approximateEnd, geographic polygons, and descriptions in both Swedish and English. If no warnings are active the array is empty.

Common use cases
  • Display a 10-day hourly weather widget for any Swedish city using get_forecast temperature and precipitation fields
  • Trigger alerts in a logistics app when get_warnings returns warnings with high warningLevel values
  • Show real-time temperature and weather symbol on a transit or event app using get_current_weather
  • Compare MESAN model observations against forecast data to validate prediction accuracy over past hours
  • Build a location autocomplete for Swedish places backed by search_locations results including municipality and county metadata
  • Render warning area polygons on a map using the geographic data returned by get_warnings
  • Power a climate monitoring dashboard using humidity and visibility fields from get_analysis
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does SMHI have an official developer API?+
Yes. SMHI publishes open data APIs at opendata.smhi.se, including meteorological observations, forecasts, and climate data under open license terms. The Parse SMHI API exposes forecast, current conditions, MESAN analysis, and warnings endpoints sourced from smhi.se.
What does `get_analysis` return that `get_forecast` does not?+
get_analysis returns MESAN model output — observed and analyzed weather measurements for recent hours, including humidity and visibility alongside temperature and wind. get_forecast is forward-looking, covering the next 10 days. The approvedTime and referenceTime fields in get_analysis let you know exactly when the observational run was approved and what reference period it covers.
Does the API cover locations outside Sweden?+
search_locations is scoped to Swedish places and returns Swedish administrative metadata (municipality, county). No non-Swedish locations are exposed. You can fork this API on Parse and revise it to add coverage from another source if you need Nordic or European locations.
Can I retrieve historical weather data through this API?+
Not currently. The endpoints cover current conditions (get_current_weather), the 10-day forward forecast (get_forecast), recent observational hours (get_analysis), and active warnings (get_warnings). Long-range historical climate records are not exposed. You can fork this API on Parse and revise it to add a historical data endpoint pointing at SMHI's open data archive.
How fresh is the data returned by `get_warnings`?+
Each warning object includes approximateStart and approximateEnd ISO timestamps. If no warnings are currently active the array returned is empty. There is no pagination — all active warnings for all of Sweden are returned in a single response.
Page content last updated . Spec covers 5 endpoints from smhi.se.
Related APIs in WeatherSee all →
metoffice.gov.uk API
Access detailed UK weather forecasts, real-time lightning tracking, and weather warnings from the Met Office. Search locations to retrieve hourly, daily, regional, and long-range predictions, and monitor storm activity with spot forecasts across any geographic area.
weatherunderground.com API
Get real-time weather data and 10-day forecasts for any location, with access to current conditions like temperature, humidity, and wind speed. Search for locations and receive detailed weather narratives to plan your day or week ahead.
meteo.pl API
Get detailed weather forecasts with temperature, pressure, wind, precipitation, and cloud data for any location using multiple weather models (UM, GFS) from Poland's Institute of Meteorology and Water Management. Search locations and access available forecasts to plan ahead with comprehensive meteorological information.
weatherspark.com API
Get historical weather data, current METAR reports, and monthly climate summaries for any location by searching WeatherSpark's comprehensive weather database. Access detailed weather insights including temperature trends, precipitation patterns, and atmospheric conditions to power weather-dependent applications and analysis.
accuweather.com API
Get real-time weather conditions, multi-day forecasts, and health alerts for any location worldwide. Search cities and access detailed data including allergen information and air quality to plan your activities with confidence.
openweathermap.org API
Search for cities and retrieve live weather conditions and forecasts (current, minutely precipitation, hourly and daily) by coordinates or by city name.
weatherforecast.com API
Get detailed 12-day weather forecasts for any location worldwide, with temperature, wind, rain, humidity, and UV index data updated three times daily. Search locations and retrieve comprehensive weather information suitable for travel planning, research, and general forecasting needs.
bom.gov.au API
Get accurate weather forecasts for Australian cities with temperature, precipitation, UV index, and conditions from the Bureau of Meteorology. Search for any location and retrieve multi-day forecasts to plan your activities with confidence.