# Swiss Weather Forecast (MeteoSwiss) – by Postal Code (`opendata-souce2026/swiss-weather-forecast-meteoswiss`) Actor

Official MeteoSwiss local forecast for every Swiss postal code, ~150 weather stations and mountain points: daily min/max temperature, rain with uncertainty range and weather icon for 9 days, or hourly temperature, rain, wind, gusts, sunshine. Same forecast as the MeteoSwiss app. CC BY 4.0.

- **URL**: https://apify.com/opendata-souce2026/swiss-weather-forecast-meteoswiss.md
- **Developed by:** [Taylor Ford](https://apify.com/opendata-souce2026) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.

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

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

## Swiss Weather Forecast (MeteoSwiss) – by Postal Code

Get the **official weather forecast of MeteoSwiss**, Switzerland's national weather service, for **any Swiss postal code** – as clean JSON, CSV or Excel. Daily for 9 days or hourly for up to 8 days.

This is the **same local forecast that powers the MeteoSwiss app and website**. MeteoSwiss blends its high-resolution ICON-CH1/CH2 ensemble models, INCA nowcasting and ECMWF and refreshes it **every hour**. It covers:

- 📮 **every Swiss postal code** (~3,200 locations),
- 📡 **~150 MeteoSwiss weather stations**,
- 🏔️ **mountain points** such as passes, peaks and huts (e.g. Simplonpass, Gurnigelpass).

What you get:

- 🌡️ **Daily min / max temperature** and **hourly temperature** (with 10%–90% uncertainty range)
- 🌧️ **Precipitation** in mm – with a **low / high estimate** (10% and 90% quantiles) and **3-hour rain probability**
- 🌤️ **MeteoSwiss weather icon** code + icon URL (daily and 3-hourly)
- 💨 **Wind** speed, direction and **gusts**, ☀️ **sunshine minutes**, **global radiation**, ❄️ **freezing level**

Search by **postal code** (`"8001"`), **place** (`"Bern"`, `"Lugano"`, `"Geneva"`), **station** (`"BER"`) or **coordinates** (nearest point) – or get **all Swiss postal codes** in one run. No API key, no scraping, no login.

### What can I use it for?

- 🏨 **Tourism, ski & outdoor** – resorts, mountain huts, tour operators: forecasts for the exact village or pass.
- 🛒 **Retail, delivery & events** – plan staff, stock and logistics by postal code.
- ☀️ **Energy** – hourly sunshine and radiation for PV forecasts, temperature for heating demand.
- 🏗️ **Construction & agriculture** – rain, frost and wind gusts for the next days.
- 🗺️ **Nationwide datasets & maps** – one run returns the whole country by postal code.
- 📱 **Apps, dashboards & AI agents** – a reliable Swiss forecast feed without signing up for a weather API; works as a tool via the Apify MCP server (*"Will it rain in Zermatt on Saturday?"*).

### Example input

```json
{
  "locations": ["8001", "Bern", "Geneva", "Zermatt"],
  "output": "daily",
  "days": 7
}
```

Hourly, nearest point to given coordinates, with wind and sunshine:

```json
{
  "latitude": "46.02",
  "longitude": "7.75",
  "output": "hourly",
  "hours": 24,
  "hourlyFields": ["temperature", "precipitation", "weatherIcon", "wind", "gusts", "sunshine"]
}
```

All of Switzerland, daily:

```json
{ "allPostalCodes": true, "output": "daily", "days": 3 }
```

### Example output

**Daily** (one row per location and day):

```json
{
  "query": "8001",
  "location": "Zürich",
  "pointType": "postalCode",
  "postalCode": "8001",
  "stationAbbr": null,
  "pointId": "800100",
  "latitude": 47.372289,
  "longitude": 8.542189,
  "elevationM": 409,
  "date": "2026-10-10",
  "weatherIconCode": 17,
  "weatherIconUrl": "https://www.meteoswiss.admin.ch/static/resources/weather-symbols/17.svg",
  "temperatureMinC": 11.4,
  "temperatureMaxC": 15.1,
  "precipitationMm": 3.2,
  "precipitationMmLow": 2.1,
  "precipitationMmHigh": 7,
  "forecastRunAt": "2026-10-10T07:00:00.000Z"
}
```

**Hourly** (one row per location and hour, fields depend on `hourlyFields`):

```json
{
  "query": "8001",
  "location": "Zürich",
  "pointType": "postalCode",
  "postalCode": "8001",
  "time": "2026-10-10T07:00:00.000Z",
  "localDate": "2026-10-10",
  "localTime": "09:00",
  "temperatureC": 12.5,
  "precipitationMm": 0.1,
  "weatherIconCode": 114,
  "weatherIconUrl": "https://www.meteoswiss.admin.ch/static/resources/weather-symbols/114.svg",
  "forecastRunAt": "2026-10-10T07:00:00.000Z"
}
```

(Real values from the forecast run of 10 October 2026, 07:00 UTC.) A **summary** with the forecast run time, MeteoSwiss parameter codes and the locations used is saved in the key-value store under `OUTPUT`.

### Fields

| Field | Meaning |
|---|---|
| `location`, `pointType`, `postalCode`, `stationAbbr`, `pointId` | Forecast point: postal code centre, weather station or mountain point of interest |
| `latitude`, `longitude`, `elevationM`, `distanceKm` | Position of the point (`distanceKm` only when searched by coordinates) |
| `date` | Daily: Swiss calendar day (00:00–24:00 local time) |
| `time`, `localDate`, `localTime` | Hourly: timestamp as given by MeteoSwiss (UTC) and in your time zone |
| `temperatureMinC`, `temperatureMaxC` | Daily 2 m minimum / maximum temperature |
| `temperatureC`, `temperatureLowC`, `temperatureHighC` | Hourly mean temperature and its 10% / 90% quantiles |
| `precipitationMm`, `precipitationMmLow`, `precipitationMmHigh` | Precipitation total (day or hour) and its 10% / 90% quantiles |
| `precipitationProbability3hPct` | Probability of precipitation in the 3 hours |
| `weatherIconCode`, `weatherIconUrl` | MeteoSwiss pictogram (daily: daytime; hourly: preceding 3 hours) |
| `windSpeedKmh`, `windDirectionDeg`, `windGustKmh` | Hourly mean wind, direction, gust peak |
| `sunshineMin`, `globalRadiationWm2`, `freezingLevelM` | Sunshine in the hour, global radiation, zero-degree level |
| `forecastRunAt` | When MeteoSwiss computed the forecast (UTC) |

### Notes

- MeteoSwiss updates the forecast every hour; the tool always uses the latest complete run. Schedule it hourly or a few times a day for a fresh feed.
- Hourly data comes as one file per parameter for all of Switzerland (~30 MB each), so hourly runs take a little longer than daily ones – choose only the hourly fields you need.
- Place names use the MeteoSwiss point names (official locality names, e.g. *Genève*, *Luzern*); English names of the big cities work too.

### Pricing

You pay only per row returned – no monthly fee. A 7-day daily forecast for one place is 7 rows; 24 hours hourly is 24 rows.

### Source and license

Data: **MeteoSwiss** (Federal Office of Meteorology and Climatology), [local forecast open data](https://opendatadocs.meteoswiss.ch/e-forecast-data/e4-local-forecast-data) from the federal geodata portal [data.geo.admin.ch](https://data.geo.admin.ch/browser/index.html#/collections/ch.meteoschweiz.ogd-local-forecasting), published under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (see the [MeteoSwiss open data terms of use](https://opendatadocs.meteoswiss.ch/general/terms-of-use)). Please credit "Source: MeteoSwiss" when you publish the data. Weather icon links point to the MeteoSwiss website. This tool is independent and not affiliated with or endorsed by MeteoSwiss.

# Actor input Schema

## `locations` (type: `array`):

Swiss postal codes (e.g. "8001", "1201"), place names (e.g. "Bern", "Lugano", "Zermatt"; English names like "Geneva" or "Lucerne" work too), mountain points (e.g. "Simplonpass") or MeteoSwiss station abbreviations (e.g. "BER", "SMA"). A place name with several postal codes uses its lowest one.

## `latitude` (type: `string`):

Get the forecast of the nearest forecast point (postal code, station or mountain point) to this location, e.g. 46.02. Give longitude too.

## `longitude` (type: `string`):

Longitude of the location, e.g. 7.75.

## `allPostalCodes` (type: `boolean`):

Return the forecast for every Swiss postal code (~3,200 locations) in one run, e.g. for a nationwide database or map. Daily output gives about 29,000 rows; hourly output gives ~3,200 rows per forecast hour, so keep Hours ahead small.

## `output` (type: `string`):

Daily: one row per location and day (min/max temperature, precipitation with 10%-90% range, weather icon). Hourly: one row per location and hour with the fields chosen below.

## `days` (type: `integer`):

Number of days starting today, 1 to 9.

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

How far ahead the hourly forecast goes, 1 to 192 hours (8 days).

## `hourlyFields` (type: `array`):

What to include in hourly output. Each field is one large MeteoSwiss file for all of Switzerland, so pick only what you need (default: temperature, precipitation, weatherIcon). Options: temperature, temperatureRange (10%/90%), precipitation, precipitationRange (10%/90%), precipitationProbability (per 3 h), weatherIcon (per 3 h), wind (speed + direction), gusts, sunshine, radiation, freezingLevel.

## `timeZone` (type: `string`):

IANA time zone for localDate/localTime in hourly output, e.g. Europe/Zurich or UTC. The time field is always UTC; daily dates are Swiss calendar days.

## `maxLocations` (type: `integer`):

Safety limit for the number of locations from the list and coordinates (ignored when All Swiss postal codes is on).

## Actor input object example

```json
{
  "locations": [
    "8001",
    "Bern",
    "Geneva"
  ],
  "allPostalCodes": false,
  "output": "daily",
  "days": 9,
  "hours": 48,
  "hourlyFields": [
    "temperature",
    "precipitation",
    "weatherIcon"
  ],
  "timeZone": "Europe/Zurich",
  "maxLocations": 50
}
```

# Actor output Schema

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

One row per location and day (daily) or per location and hour (hourly).

## `summary` (type: `string`):

Forecast run time, MeteoSwiss parameters, locations used and row count.

# 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 = {
    "locations": [
        "8001",
        "Bern",
        "Geneva"
    ],
    "hourlyFields": [
        "temperature",
        "precipitation",
        "weatherIcon"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("opendata-souce2026/swiss-weather-forecast-meteoswiss").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 = {
    "locations": [
        "8001",
        "Bern",
        "Geneva",
    ],
    "hourlyFields": [
        "temperature",
        "precipitation",
        "weatherIcon",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("opendata-souce2026/swiss-weather-forecast-meteoswiss").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 '{
  "locations": [
    "8001",
    "Bern",
    "Geneva"
  ],
  "hourlyFields": [
    "temperature",
    "precipitation",
    "weatherIcon"
  ]
}' |
apify call opendata-souce2026/swiss-weather-forecast-meteoswiss --silent --output-dataset

```

## MCP server setup

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

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/JjhnCBRVomMYCar8b/builds/oYq9vQmb6WKnpLJS7/openapi.json
