# Weather — Current Conditions & Forecast (Open-Meteo) (`omao/weather`) Actor

Get current weather and a multi-day forecast for any city or coordinates: temperature, humidity, wind, precipitation and daily highs/lows. Powered by Open-Meteo. No API key, no anti-bot.

- **URL**: https://apify.com/omao/weather.md
- **Developed by:** [Marouane Oulabass](https://apify.com/omao) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.72 / 1,000 locations

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

## Weather — Current Conditions & Multi-Day Forecast (Open-Meteo)

**Get current weather and a multi-day forecast for any city or coordinates — as clean JSON.** Pass city names or `lat,lon` pairs and get back a tidy row per location: temperature, feels-like, humidity, wind, precipitation and daily highs/lows. Powered by Open-Meteo — no API key, no anti-bot.

> AI-agent ready: this Actor is callable and payable by AI agents via [x402](https://docs.apify.com/platform/integrations/x402) (USDC on Base), no Apify account required.

A simple, reliable weather API for apps, dashboards, logistics and automation.

### Who uses this

- 🌦️ **Apps & dashboards** — show live conditions and forecasts.
- 🚚 **Logistics & operations** — plan around weather across many locations.
- 📊 **Analysts & researchers** — build weather datasets on a schedule.
- 🌾 **Agriculture & events** — track conditions for planning.
- 🧑‍💻 **Developers** — a clean weather endpoint by city or coordinates.

### What you get — one clean row per location

| Field | Description |
|---|---|
| `location` + `country` | Resolved place |
| `latitude` + `longitude` + `timezone` | Geo & timezone |
| `temperature` + `apparentTemperature` | Current & feels-like temp |
| `humidity` + `precipitation` | Humidity & precipitation |
| `weather` + `weatherCode` | Condition label & code |
| `windSpeed` + `windDirection` | Wind |
| `isDay` | Day/night flag |
| `daily` | Multi-day forecast (highs/lows, precip) |
| `units`, `currentTime`, `scrapedAt` | Units & provenance |

### Example

**Input**

```json
{ "locations": ["Paris", "40.71,-74.01"], "forecastDays": 5 }
```

**Output (one item)**

```json
{
  "location": "Paris", "country": "France",
  "latitude": 48.8534, "longitude": 2.3488, "timezone": "Europe/Paris",
  "temperature": 21.4, "apparentTemperature": 20.8,
  "humidity": 62, "precipitation": 0.0,
  "weather": "Partly cloudy", "windSpeed": 12.3, "isDay": 1
}
```

### Why this actor

- ✅ **City *or* coordinates** — names are geocoded automatically.
- 📅 **Current + forecast** — up to 16 days of daily highs/lows.
- 🌍 **Anywhere** — global coverage, localized timezone.
- ⚡ **Fast & affordable** — pay only per location returned. No key, no anti-bot.
- 🧹 **Clean output** — normalized JSON with units.

### Input options

- `locations` *(required)* — city names or `lat,lon` coordinates.
- `forecastDays` — days of daily forecast (1–16).

### FAQ

**City or coordinates?** Both — city names are geocoded automatically; or pass `lat,lon`.

**How many forecast days?** Up to 16 — set `forecastDays`.

**Which data source?** Open-Meteo, a free, reliable weather API.

**How fresh is the data?** Live from Open-Meteo on every run.

**Can I export to CSV/Excel/Google Sheets?** Yes — the dataset exports to JSON, CSV, Excel and HTML, or pull it via the API.

**What does it cost?** Pay-per-location — you're only charged for locations actually returned.

***

*Tip: schedule this on your key locations to build your own weather-history dataset.*

# Actor input Schema

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

City names (geocoded automatically) or coordinates as 'lat,lon'.

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

Number of days of daily forecast to include (1-16).

## `healthCheckMode` (type: `boolean`):

Internal monitoring: fetch a canary location and FAIL if broken (no billing).

## Actor input object example

```json
{
  "locations": [
    "London",
    "New York",
    "48.85,2.35"
  ],
  "forecastDays": 3,
  "healthCheckMode": false
}
```

# Actor output Schema

## `weather` (type: `string`):

Current conditions and daily forecast for each location.

# 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": [
        "Paris"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("omao/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 = { "locations": ["Paris"] }

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "Paris"
  ]
}' |
apify call omao/weather --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=omao/weather",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GSqPdOVvgWAvKx4Vi/builds/Ugx3HTGUquB1ecbuH/openapi.json
