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
3mo 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 →
sentinel-hub.com API
Access satellite imagery from around the world and retrieve spectral band data, timestamps, and geographic coverage information to analyze Earth observation data. Process and generate statistics from satellite images for your specific areas of interest using powerful image processing tools.
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.
api.nasa.gov API
Access NASA's suite of open data APIs — including the Astronomy Picture of the Day, Near Earth Object tracking, DONKI space weather events, EPIC Earth imagery, Mars weather, the NASA Image and Video Library, the Exoplanet Archive, and EONET natural events.
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.
breckenridge.com API
Check real-time snow conditions, weather forecasts, lift operations, and trail status at Breckenridge Ski Resort to plan your day on the mountain. View live mountain cameras and get up-to-the-minute updates on slopes, lifts, and weather before you head out.
surfline.com API
Check real-time surf conditions, forecasts for waves and wind, tide predictions, and live camera feeds from thousands of surf spots around the world. Browse spots by geographic region and access detailed weather data to plan your perfect surfing session.
ingres.iith.ac.in API
Access groundwater resource estimation data across India at multiple geographic levels—from national summaries down to block-level details—and search specific locations to track groundwater availability and assessment trends. View historical assessment years and generate reports to analyze groundwater resources by state, district, or region.
zoom.earth API
Search Zoom Earth for places and get live environmental data including weather forecasts by coordinates, satellite imagery timestamps, active tropical storm tracks, active fires, and current platform status.