# Switzerland Weather Data – Swiss Weather Stations (MeteoSwiss) (`friedl/meteoswiss-weather-data`) Actor

Weather station data for Switzerland (10-min, hourly, daily) from MeteoSwiss open government data: temperature, precipitation, wind, humidity, pressure, sunshine, with station coordinates and altitude. Today and current year. Delta mode for new values. Wetterdaten Schweiz.

- **URL**: https://apify.com/friedl/meteoswiss-weather-data.md
- **Developed by:** [Friedrich K](https://apify.com/friedl) (community)
- **Categories:** Developer tools, Other
- **Security:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## MeteoSwiss Weather Data (SwissMetNet)

Swiss weather station measurements from the Open Government Data (OGD) published by MeteoSwiss, as clean JSON/CSV records. One record per **station x timestamp** with normalized fields and station metadata (name, canton, coordinates, altitude).

### What it does / use cases

- Current conditions and today's 10-minute curve for any of the ~160 automatic SwissMetNet stations (Zurich, Bern, Geneva, Saentis, Lugano, ...).
- Hourly and daily values for the current year (1 January up to yesterday) for analytics, energy/solar/agriculture models, insurance, logistics, dashboards.
- Monitoring: run on a schedule in **delta mode** and receive only new measurements.

### Input

```json
{
  "stations": ["BER", "SMA", "GVE"],
  "granularity": "10min",
  "period": "now",
  "latestOnly": false,
  "mode": "delta",
  "maxResults": 1000
}
```

| Field | Description |
|---|---|
| `stations` | Station abbreviations (BER, SMA, GVE, SAE, TAE, LUG, ...). Empty = all stations (one HTTP request per station, ~1 s each, so a full run takes a few minutes). |
| `granularity` | `10min`, `hourly` or `daily`. |
| `period` | `now` = since midnight UTC today (10min/hourly); `recent` = 1 January of the current year up to yesterday. Daily data is only available as `recent`. |
| `since` | Optional ISO date/time (UTC); older records are skipped. |
| `latestOnly` | Only the newest record with data per station (current conditions). |
| `mode` | `all` or `delta` (only new/changed records since the last run with the same input). |
| `maxResults`, `deltaStateName` | Result cap (charged events); optional name for the delta state. |

Records are emitted newest first per station. `maxResults` is a global cap: with many stations and `recent` data, the first stations fill it, so use `since`, `latestOnly` or a station list.

### Output (one item)

```json
{
  "id": "SMA_2026-10-06T08:10:00Z",
  "stationId": "SMA", "stationName": "Zürich / Fluntern", "canton": "ZH",
  "lat": 47.377, "lon": 8.566, "altitudeM": 556,
  "timestamp": "2026-10-06T08:10:00Z", "granularity": "10min",
  "temperatureC": 13.9, "temperatureMinC": null, "temperatureMaxC": null, "dewPointC": 12.1,
  "humidityPct": 88.4, "precipitationMm": 0, "windSpeedKmh": 3.2, "windGustKmh": 3.2,
  "windDirectionDeg": 210, "pressureHpa": 955.3, "pressureQnhHpa": 1022.1, "pressureQffHpa": 1022.6,
  "sunshineMin": 4, "globalRadiationWm2": 312,
  "units": { "temperatureC": "°C", "...": "..." },
  "source": { "name": "MeteoSwiss Open Government Data (SwissMetNet)", "license": "CC BY 4.0", "attribution": "..." },
  "fetchedAt": "2026-10-06T08:37:20.880Z"
}
```

(Illustrative values; coordinates rounded.) Timestamps are UTC and equal the `reference_timestamp` published by MeteoSwiss. Missing measurements are `null`. Min/max temperature exist for hourly and daily only. Wind speed/gust are km/h; daily precipitation covers 06:00-06:00 UTC; `sunshineMin` is minutes of sunshine within the interval.

### Pricing

Pay-per-event: you are charged per result (event `result`, see the Pricing tab for the current price per 1,000 results). Platform usage is included.

### Delta mode

With `mode: "delta"` the actor stores a hash per record id (`stationId_timestamp`) in a named key-value store of your account. The next run with the same input (or the same `deltaStateName`) returns only records that are new or changed, so scheduled runs only pay for fresh measurements.

### Free plan

Users on the Apify Free plan are limited to **50 results per run**. Paid plans have no limit beyond `maxResults`.

### Data source, license, attribution

Data: MeteoSwiss Open Government Data, collection `ch.meteoschweiz.ogd-smn` on the Swiss federal STAC API (data.geo.admin.ch), licensed **CC BY 4.0** (commercial use allowed). **Attribution required: "Source: MeteoSwiss" (Quelle: MeteoSchweiz).** Terms: https://opendatadocs.meteoswiss.ch/general/terms-of-use . Every item carries the attribution in `source`.

### Disclaimer

This actor is not affiliated with, endorsed or supported by MeteoSwiss or the Swiss Confederation. Data is provided as-is, without warranty; measurements are partly unverified real-time values and may be corrected later. Not for safety-critical use.

### Impressum / Legal notice

Anbieter dieses Actors (Angaben gemäß § 5 DDG) / Provider of this actor:

Friedrich Köhler\
Spatzenweg 7\
04720 Döbeln\
Deutschland\
E-Mail: actorcreater_010@web.de

# Actor input Schema

## `stations` (type: `array`):

MeteoSwiss station abbreviations (e.g. BER, TAE, SMA, ZUE, GVE). Leave empty for all ~160 SwissMetNet stations (one request per station, ~1 s each).

## `granularity` (type: `string`):

Measurement interval.

## `period` (type: `string`):

"now": since midnight UTC today (10min/hourly). "recent": 1 January of the current year up to yesterday. Daily values only exist as "recent".

## `since` (type: `string`):

Only return records at or after this date/time (ISO, e.g. 2026-09-01 or 2026-09-01T12:00:00Z, UTC).

## `latestOnly` (type: `boolean`):

Return only the most recent record with data for each station (current conditions).

## `mode` (type: `string`):

'all' returns every record. 'delta' returns only records that are new or changed since the last run with the same input (state is kept in your account's key-value store).

## `maxResults` (type: `integer`):

Maximum number of results (= charged events) per run. Users on the Apify Free plan are limited to 50 results per run.

## `deltaStateName` (type: `string`):

Name for the delta state, e.g. "daily-monitor". Leave empty to derive it from the input. Use different names to run independent monitors.

## Actor input object example

```json
{
  "stations": [
    "BER",
    "SMA"
  ],
  "granularity": "10min",
  "period": "now",
  "latestOnly": false,
  "mode": "all",
  "maxResults": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "stations": [
        "BER",
        "SMA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("friedl/meteoswiss-weather-data").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 = { "stations": [
        "BER",
        "SMA",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("friedl/meteoswiss-weather-data").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 '{
  "stations": [
    "BER",
    "SMA"
  ]
}' |
apify call friedl/meteoswiss-weather-data --silent --output-dataset

```

## MCP server setup

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

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/jC7ehxzfxW6qBeFp8/builds/4EcrWuRXb565yl8Db/openapi.json
