# Weather Forecast (`accelerationengg/weather-forecast`) Actor

The Weather Forecast Scraper collects daily weather data for a city, including temperature, conditions, wind, humidity, precipitation, and UV index. It supports solar forecasting, trip planning, data dashboards, and research on weather and solar patterns.

- **URL**: https://apify.com/accelerationengg/weather-forecast.md
- **Developed by:** [Acceleration](https://apify.com/accelerationengg) (community)
- **Categories:** Travel, News
- **Features:** Limited permissions
- **Stats:** 199 total users, 3 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

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

## 🌦 Weather Crawler (TimeAndDate)

### Overview

**Weather Crawler** takes a location (city name) and provides **extended 14 days weather forecast data** from **timeanddate.com** for given locations.
It extracts daily weather details such as temperature, conditions, wind, humidity, precipitation, UV index, and also enriches the data with **latitude and longitude** using the **Open-Meteo Geocoding API**.

### Where you can use it?

- Weather dashboards
- Climate research datasets
- Travel & tourism apps
- Location-aware forecasting systems

***

### Input Methods

The actor supports **multiple ways** to provide weather URLs. For example:

#### Single URL

Users can manually add one or more **TimeAndDate extended forecast URLs** in the **Start URLs** field.

**Example:**

```
https://www.timeanddate.com/weather/usa/austin/ext
```

This method is suitable for scraping a **small number of locations**.

***

#### Text File Upload (Bulk URLs)

For scraping **multiple cities at once**, users can upload a **text file** containing weather URLs.

- Each URL must be on a **new line**
- Only **TimeAndDate `/ext` weather URLs** are supported

**Example text file (`urls.txt`):**

```
https://www.timeanddate.com/weather/germany/frankfurt/ext
https://www.timeanddate.com/weather/uk/london/ext
https://www.timeanddate.com/weather/usa/new-york/ext
```

This method is ideal for:

- Bulk data collection
- Weather analysis across multiple cities
- Automation workflows

#### Example Output

Here's a sample output. As you can see, it contains all the useful attributes (explained below).

| City   | Country | Day       | Feels Like | Humidity | Latitude | Longitude | Precipitation Amount | Precipitation Chance | Temperature | UV Index | Weather                    | Wind  |
| ------ | ------- | --------- | ---------- | -------- | -------- | --------- | -------------------- | -------------------- | ----------- | -------- | -------------------------- | ----- |
| berlin | germany | Sat Jan 3 | 26 °F      | 93%      | 52.52437 | 13.41053  | 4.26"                | 72%                  | 34 / 25 °F  | 0 (Low)  | Moderate snow. Overcast.   | 8 mph |
| berlin | germany | Sun Jan 4 | 25 °F      | 90%      | 52.52437 | 13.41053  | 0.83"                | 51%                  | 34 / 23 °F  | 0 (Low)  | Light snow. Mostly cloudy. | 9 mph |

In JSON format, it would be:

```json
{
  "city": "berlin",
  "country": "germany",
  "latitude": 52.52437,
  "longitude": 13.41053,
  "day": "Sat Jan 3",
  "temperature": "34 / 25 °F",
  "weather": "Moderate snow. Overcast.",
  "feels_like": "26 °F",
  "wind": "8 mph",
  "humidity": "93%",
  "precipitation_chance": "72%",
  "precipitation_amount": "4.26\"",
  "uv_index": "0 (Low)"
}
```

***

### Data Fields Explained

Most of the attributes are optional. For reference, here is the detailed field description.

| Field                  | Description                     |
| ---------------------- | ------------------------------- |
| `city`                 | City name                       |
| `country`              | Country name                    |
| `latitude`             | Latitude of City                |
| `longitude`            | Longitude of City               |
| `day`                  | Forecast day                    |
| `temperature`          | Max / Min temperature           |
| `weather`              | Weather condition summary       |
| `feels_like`           | Feels-like temperature          |
| `wind`                 | Wind speed                      |
| `humidity`             | Humidity percentage             |
| `precipitation_chance` | Probability of precipitation    |
| `precipitation_amount` | Precipitation volume            |
| `uv_index`             | UV index & risk level           |

***

### Notes & Limitations

The actor fetches weather information only for the upcoming 14 days from the date of scraping.

***

### Notes & Limitations

The actor fetches weather information only for the upcoming 14 days from the date of scraping.

***

# Actor input Schema

## `startUrls` (type: `array`):

Weather URLs to scrape, e.g., https://www.timeanddate.com/weather/usa/austin/ext

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.timeanddate.com/weather/usa/austin/ext"
    }
  ]
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        {
            "url": "https://www.timeanddate.com/weather/usa/austin/ext"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("accelerationengg/weather-forecast").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 = { "startUrls": [{ "url": "https://www.timeanddate.com/weather/usa/austin/ext" }] }

# Run the Actor and wait for it to finish
run = client.actor("accelerationengg/weather-forecast").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 '{
  "startUrls": [
    {
      "url": "https://www.timeanddate.com/weather/usa/austin/ext"
    }
  ]
}' |
apify call accelerationengg/weather-forecast --silent --output-dataset

```

## MCP server setup

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

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/o6Vjla6MePKxZPLg1/builds/QQAghfGApmYyg6Rtg/openapi.json
