# Mountain Forecast Scraper (`crawlerbros/mountain-forecast-scraper`) Actor

Scrape mountain weather forecasts from Mountain-Forecast.com for 100,000+ peaks worldwide. Search peaks by name, browse by country, or paste a forecast URL - get 6-day outlooks at each summit elevation band with temperatures, wind, feels-like, cloud base, freezing level and snowfall.

- **URL**: https://apify.com/crawlerbros/mountain-forecast-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Mountain Forecast Scraper

Scrape **mountain weather forecasts** from [Mountain-Forecast.com](https://www.mountain-forecast.com) — detailed 6-day outlooks for 100,000+ named peaks worldwide, at summit / mid / base elevations. Search peaks by name, browse every peak in a country or mountain range, or paste a specific forecast URL. HTTP-only against the site's static pages. No auth, no proxy.

### What this actor does

- **Four modes:** `search` (by peak name), `browseByCountry` (198 countries), `browseByRange` (85 mountain ranges), `byUrl` (direct forecast URL)
- **Mountain ranges:** every range on the site's `/mountain_ranges` index — small ranges (e.g. Greenland, Pennines) list peaks directly; huge ranges (e.g. Alps, Andes) are walked subrange-by-subrange automatically
- **Elevation bands:** summit + mid + base levels per peak (2–7 bands), each with its own forecast table, tagged with `elevationGroup` (`top` / `mid` / `bot`)
- **Per-period metrics:** temperature (max/min), feels-like wind chill, wind speed & direction, cloud base, freezing level, snowfall (cm) and rainfall (mm) for every AM / PM / night period
- **Rolling 6-day outlook** with plain-language "Days 1–3" / "Days 4–6" summaries
- **Filters:** forecast horizon (1/3/6 days), keyword on peak name, optional all-elevation records
- **Peak metadata:** coordinates, country, mountain range / region, summit altitude, canonical `peakUrl`
- **Empty fields are omitted**

### Data source

Data is scraped from **Mountain-Forecast.com** — a long-running public mountain weather service covering 100,000+ named peaks worldwide. Forecast pages are static public HTML; search uses the site's public `/location_search` JSON endpoint. No authentication, cookies, or proxy required. This is a third-party actor — it is not affiliated with Mountain-Forecast.com.

### Output per peak forecast

- `peakName`, `countryName`, `countryIso`, `mountainRange`, `region`
- `latitude`, `longitude`, `summitAltitude`, `peakUrl`
- `elevation` — the elevation band this forecast belongs to
- `elevationBands[]` — every band of the peak (`elevation`, `label` such as "Mountain Peak" / "Base", `elevationGroup`)
- `daySummaries[]` — "Days 1–3 Weather Summary" and "Days 4–6 Weather Summary" texts
- `days[]` — one entry per forecast day (`date`, `dayName`, `periods[]`):
  - `period` — `AM` / `PM` / `night`
  - `phrase` — weather description (clear, snow shwrs, risk tstorm, …)
  - `tempMax`, `tempMin`, `feelsLike` — °C
  - `windSpeed` (km/h), `windDirection`
  - `cloudBase` (m), `freezingLevel` (m), `snow` (cm), `rain` (mm)
  - `sunrise`, `sunset` (local times)
- `sourceUrl`, `recordType: "peakForecast"`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` / `browseByCountry` / `browseByRange` / `byUrl` |
| `searchQuery` | string | `matterhorn` | Peak name, city or hut (mode=search) |
| `country` | string | `CH` | ISO 3166-1 alpha-2 country — all 198 countries on the site (mode=browseByCountry). Also narrows `search` and `byUrl` results to peaks the site lists in that country |
| `mountainRange` | string | `alps` | Mountain range slug — all 85 ranges on the site (mode=browseByRange) |
| `startUrl` | string | Matterhorn forecast | Forecast or peak page URL (mode=byUrl) |
| `forecastDays` | int | `6` | Forecast horizon: `1` / `3` / `6` days |
| `containsKeyword` | string | – | Keep only peaks whose name contains this substring |
| `includeAllElevations` | bool | `false` | Emit one record per elevation band (not just the summit) |
| `maxItems` | int | `10` | Hard cap (1–100) |

#### Example: search a peak

```json
{
  "mode": "search",
  "searchQuery": "mont blanc",
  "forecastDays": 3,
  "maxItems": 5
}
```

#### Example: browse every peak in a country

```json
{
  "mode": "browseByCountry",
  "country": "CH",
  "maxItems": 20
}
```

#### Example: browse a mountain range

```json
{
  "mode": "browseByRange",
  "mountainRange": "greater-himalaya",
  "maxItems": 20
}
```

#### Example: all elevation bands of one peak

```json
{
  "mode": "search",
  "searchQuery": "matterhorn",
  "includeAllElevations": true,
  "maxItems": 10
}
```

#### Example: scrape a specific forecast URL

```json
{
  "mode": "byUrl",
  "startUrl": "https://www.mountain-forecast.com/peaks/Matterhorn/forecasts/4478"
}
```

### Limitations

- **Site's country attribution** — the `country` value filters peaks by the country the site itself lists them under. Border peaks (e.g. Klein Matterhorn on the Swiss-Italian border) may be attributed to the neighbouring country.
- **6-day rolling outlook** — the source publishes a rolling 6-day forecast (the summary texts mention days 1–7); `forecastDays` accepts `1`, `3` or `6`.
- **Three periods per day** — AM / PM / night; there are no hourly values on the free pages.
- **Period-level omissions** — fields like `sunrise`, `rain`, or `cloudBase` appear only on the periods where the source reports a value.
- **Some country pages have no peaks** — a few countries (e.g. Barbados) publish no peaks and return a clean status message.

### Use cases

- **Mountaineering & expedition planning** — pull summit-level wind, temperature and snowfall outlooks before a climb
- **Ski resorts & heli-ski ops** — track freezing level and fresh snow across candidate peaks
- **Trail & hiking apps** — enrich hike databases with live per-elevation weather
- **Outdoor gear brands** — contextualize product demand against mountain conditions
- **Climate / mountain research** — build longitudinal datasets of high-altitude conditions
- **Tourism dashboards** — power peak-condition widgets for destination sites

### FAQ

**What's the data source?**  [Mountain-Forecast.com](https://www.mountain-forecast.com), a long-running mountain weather service covering 100,000+ named peaks. This is a third-party actor using the site's public pages; it is not affiliated with Mountain-Forecast.com.

**Why 6 days, not 7?**  The source's free forecast table publishes a rolling 6-day outlook (the summary texts mention days 1–7). `forecastDays` accepts `1`, `3` or `6` to control how many days are emitted.

**How do I browse a whole range like the Alps?**  Large ranges list their subranges first; the actor follows every subrange page automatically (up to `maxItems`). Small ranges list their peaks directly.

**Can I use any country on the site?**  Yes — the `country` dropdown covers all 198 country pages the site publishes, from Afghanistan to Zimbabwe. A few (e.g. Barbados) have no peaks and return a clear status message.

**Are the periods hourly?**  No — the source's free view is three periods per day: AM, PM and night. Each period carries its own temperature, wind, precipitation and cloud values.

**What if a period has no data?**  Empty values are omitted entirely — e.g. `sunrise` only appears on the period where the site shows it, and `rain`/`cloudBase` appear only when the source reports a value.

**Does the summit forecast page cover lower elevations?**  Every peak page exposes 2–7 elevation bands. By default the actor emits the summit forecast; flip `includeAllElevations` to `true` for one record per band.

**Are coordinates and ranges real?**  Yes — latitude/longitude and the mountain range/region come straight from each peak's page.

**How fresh is the data?**  Mountain-Forecast.com updates forecasts continuously; every run scrapes the live page at run time.

# Actor input Schema

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

What to fetch.

## `searchQuery` (type: `string`):

Peak name (or city / hut) to search, e.g. `matterhorn`, `mont blanc`, `everest` (mode=search).

## `country` (type: `string`):

ISO 3166-1 alpha-2 country code to browse peaks for (mode=browseByCountry).

## `mountainRange` (type: `string`):

Mountain range to browse peaks for (mode=browseByRange). Ranges with a huge peak count are walked subrange-by-subrange.

## `startUrl` (type: `string`):

Full forecast or peak page URL, e.g. `https://www.mountain-forecast.com/peaks/Matterhorn/forecasts/4478` (mode=byUrl).

## `forecastDays` (type: `integer`):

How many forecast days to include per peak (the site provides a rolling 6-day outlook).

## `containsKeyword` (type: `string`):

Only keep peaks whose name (or country) contains this substring, case-insensitive.

## `includeAllElevations` (type: `boolean`):

Emit a separate record for every elevation band of the peak (summit, mid, base) instead of only the summit forecast.

## `maxItems` (type: `integer`):

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "matterhorn",
  "country": "CH",
  "mountainRange": "alps",
  "startUrl": "https://www.mountain-forecast.com/peaks/Matterhorn/forecasts/4478",
  "forecastDays": 6,
  "includeAllElevations": false,
  "maxItems": 10
}
```

# Actor output Schema

## `peakForecasts` (type: `string`):

Dataset containing all scraped peak weather forecast records.

# 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 = {
    "mode": "search",
    "searchQuery": "matterhorn",
    "country": "CH",
    "mountainRange": "alps",
    "startUrl": "https://www.mountain-forecast.com/peaks/Matterhorn/forecasts/4478",
    "forecastDays": 6,
    "includeAllElevations": false,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/mountain-forecast-scraper").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 = {
    "mode": "search",
    "searchQuery": "matterhorn",
    "country": "CH",
    "mountainRange": "alps",
    "startUrl": "https://www.mountain-forecast.com/peaks/Matterhorn/forecasts/4478",
    "forecastDays": 6,
    "includeAllElevations": False,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/mountain-forecast-scraper").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 '{
  "mode": "search",
  "searchQuery": "matterhorn",
  "country": "CH",
  "mountainRange": "alps",
  "startUrl": "https://www.mountain-forecast.com/peaks/Matterhorn/forecasts/4478",
  "forecastDays": 6,
  "includeAllElevations": false,
  "maxItems": 10
}' |
apify call crawlerbros/mountain-forecast-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/mountain-forecast-scraper"
        }
    }
}

```

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/u7Tqd0KNKrezR6220/builds/zM0gvjy6QrCguey5X/openapi.json
