# SMHI Nordic Weather Forecast (Hourly Point Data) (`vhsgreed/smhi-weather`) Actor

Hourly weather forecasts for Nordic coordinates straight from SMHI's official keyless API: temperature, wind, gusts, precipitation, weather symbol and pressure per hour. Flat one-row-per-hour output for easy import. No API key, no login, no scraping.

- **URL**: https://apify.com/vhsgreed/smhi-weather.md
- **Developed by:** [Karl Sundström](https://apify.com/vhsgreed) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Nordic Hourly Weather Forecasts — SMHI

> Independent tool; data from official Nordic public meteorological APIs. Not affiliated with SMHI or MET Norway.

Pull **hourly weather forecasts for any Nordic coordinate** straight from the official keyless meteorological institute API. Temperature, wind and gusts, precipitation, weather symbol, pressure, visibility and thunderstorm probability on every row — flat one-record-per-hour output ready for dashboards, spreadsheets and automation. No API key, no login, no browser; exports to CSV, Excel and JSON.

> **Source note (updated 2026-09-08):** SMHI retired its `pmp3g` point-forecast API (all `opendata-download-metfcst.smhi.se/api/category/pmp3g/...` paths return 404 and the category is no longer listed on the SMHI Open Data portal). This actor now uses SMHI's **snow1g version 1** point-forecast category as its primary source — despite the "snow" name it is the general point-forecast category, with full hourly series (81 steps: hourly for the first ~2 days, then ~3-hourly out to day 10). If SMHI fails for a point, the actor **automatically falls back** to MET Norway Locationforecast 2.0 (Yr, keyless with a custom User-Agent required by their terms), mapped onto the same output schema; every row records its origin in the `source` field.

### Why Nordic Weather?

- 🌡️ **One row per hour, ready to load** — flat `name, lat, lon, time, tempC, windMs, windGust, precipMm, symbol, pressure, visibilityKm, thunderstormPct, source` records, zero post-processing.
- 🇸🇪 **Brand-consistent SMHI data** — primary source is SMHI's own open-data forecast API (snow1g v1); MET Norway is only a fallback.
- 🗺️ **Any Nordic coordinates** — Stockholm, Kiruna, Reykjavík, wherever; pass a list of points in a single run.
- 🔑 **No API key** — both SMHI Open Data and MET Norway Locationforecast are keyless (MET Norway only requires an identifying User-Agent, which the actor sets).
- 🕐 **Hourly when it matters** — 81 steps from SMHI: hourly for the first ~2 days, then ~3-hourly out to day 10 (240 rows max per point).
- 💰 **Predictable cost** — cap the bill with the built-in `maxTotalChargeUsd` budget; one cheap event per delivered row.

### Use cases

Home-assistant and heat-pump automation · energy-price dashboards needing temperature drivers · agriculture and construction scheduling · travel planning across the Nordics · weather-triggered alerting and monitoring.

### What data you get?

| 🏷️ Field | Description |
| --- | --- |
| 📍 name / lat / lon | Point name (or coordinates if unnamed) and WGS84 position |
| ⏰ time | Forecast valid time, ISO 8601 UTC |
| 🌡️ tempC | Air temperature, °C |
| 💨 windMs / windGust | Wind speed and gust, m/s |
| 🌧️ precipMm | Deterministic mean precipitation amount, mm per step |
| ⛅ symbol | Weather symbol, e.g. `partly_cloudy`, `light_snowfall` (WSymb2 text from SMHI; MET symbol code in fallback rows) |
| 🔽 pressure | Air pressure at sea level, hPa |
| 👁️ visibilityKm | Visibility, km (SMHI rows only; `null` in MET fallback rows) |
| ⚡ thunderstormPct | Thunderstorm probability, % (SMHI rows only) |
| 🛰️ source | `smhi-snow1g-v1` or `met-locationforecast-2.0` |

### How to use

1. Add the actor to your Apify account and click **Run**.
2. Paste your points — e.g. `{"lat": 59.33, "lon": 18.07, "name": "Stockholm"}`.
3. Set `hours` (1–240) if the default 48 isn't right for you.
4. Export results as JSON, CSV or Excel.

### Input

```json
{
  "points": [
    { "lat": 59.33, "lon": 18.07, "name": "Stockholm" },
    { "lat": 67.86, "lon": 20.22, "name": "Kiruna" }
  ],
  "hours": 48
}
```

| Field | Type | Description | Default |
| --- | --- | --- | --- |
| `points` | array | Coordinates to forecast: `{ lat, lon, name? }` (decimal degrees; name defaults to the coordinates) | — (required) |
| `hours` | integer | Forecast rows per point, 1–240 | 48 |

### Output

```json
{
  "name": "Stockholm",
  "lat": 59.33,
  "lon": 18.07,
  "time": "2026-09-08T17:00:00Z",
  "tempC": 17.8,
  "windMs": 3.7,
  "windGust": 6.7,
  "precipMm": 0.0,
  "symbol": "cloudy",
  "pressure": 1001.8,
  "visibilityKm": 20.5,
  "thunderstormPct": 8,
  "source": "smhi-snow1g-v1"
}
```

### Support

Open an issue in the repository or message the actor owner via Apify Console.

# Actor input Schema

## `points` (type: `array`):

List of coordinates to forecast. Each point: { lat, lon, name? } (WGS84 decimal degrees; name defaults to the coordinates).

## `hours` (type: `integer`):

Number of forecast rows per point (1-240). Hourly resolution for the first ~2 days, then 6-hourly steps out to ~10 days.

## Actor input object example

```json
{
  "points": [
    {
      "lat": 59.33,
      "lon": 18.07,
      "name": "Stockholm"
    },
    {
      "lat": 67.86,
      "lon": 20.22,
      "name": "Kiruna"
    }
  ],
  "hours": 48
}
```

# Actor output Schema

## `forecasts` (type: `string`):

Dataset of hourly forecast rows (one per point-hour).

## `forecastsJson` (type: `string`):

Full dataset items as raw JSON.

## `runView` (type: `string`):

Inspect this run, its logs and storages in Apify Console.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("vhsgreed/smhi-weather").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("vhsgreed/smhi-weather").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call vhsgreed/smhi-weather --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vhsgreed/smhi-weather"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6ZGweUT8VIaCtNC21/builds/Tfsc2UXWLgwBCV9T8/openapi.json
