# Weather Forecast API: Any City or Coordinates Worldwide (`tudorlane/world-weather-forecast`) Actor

Current weather, hourly and 7-9 day forecast for any city name or lat/lon worldwide, from MET Norway (api.met.no). Temperature, feels-like, rain, wind, humidity, UV. Metric or imperial. Built for AI agents.

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

## Pricing

$3.00 / 1,000 weather lookups

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

## Weather Forecast API: any city or coordinates worldwide

**What it does:** Current weather, hourly and 7-9 day forecast for any city or coordinates worldwide, from MET Norway, with metric or imperial units.

**Who it's for:** Travel, events, logistics, farming and personal-assistant agents.

**Price:** Pay per event: **$0.003 per location**. Places not found are not charged. You only pay Apify for what you run; there is no monthly fee for this Actor.

Current conditions, an hourly forecast and a 7–9 day daily forecast for **anywhere on Earth**, from the Norwegian Meteorological Institute (MET Norway, api.met.no), the same model data used by yr.no.

- Look up by **city name** ("Paris", "Springfield, Illinois, US", "Munich") or **lat/lon**
- **Current**: temperature, feels-like (wind chill), condition, rain next hour, wind speed/gust/direction, humidity, pressure, cloud, UV
- **Hourly** (default next 24 h, local time) and **daily** min/max, total rain, max wind, main condition
- **Metric or imperial** (°F, mph, inches)
- Batch up to 500 locations per run

### Input

```json
{"requests": ["Tokyo", {"location": "Austin, Texas, US", "days": 3, "units": "imperial"}, {"lat": 51.5, "lon": -0.12, "hours": 6}]}
```

### Output (one row per location)

`query`, `lat`, `lon`, `timezone`, `place` (nearest named place), `current`, `hourly[]`, `daily[]`, `updated_at`, `source`.

### Pricing

Pay per event: **$0.003 per location lookup**. Errors (place not found) are not charged.

### Sources and licences

Weather data: MET Norway Locationforecast 2.0, licensed CC BY 4.0 and NLOD ("Data from MET Norway"). Requests follow MET's terms of service (identifying User-Agent, rounded coordinates, caching, low request rate). Place names: GeoNames (CC BY 4.0).

### Quick example

**Input**

```json
{
 "requests": [
  {
   "location": "London, UK"
  },
  {
   "lat": 40.7128,
   "lon": -74.006
  }
 ],
 "units": "metric"
}
```

**Output** (one dataset item, shortened)

```json
{
 "query": "London, UK",
 "lat": 51.50853,
 "lon": -0.12574,
 "timezone": "Europe/London",
 "place": {
  "name": "London",
  "admin1": "England",
  "country": "United Kingdom",
  "country_code": "GB"
 },
 "updated_at": "2026-10-21T11:23:25Z",
 "current": {
  "time_utc": "2026-10-21T12:00:00Z",
  "temperature_c": 9.9,
  "feels_like_c": 6.7,
  "wind_speed_ms": 7.5,
  "wind_gust_ms": null,
  "wind_direction_deg": 262.7,
  "humidity_pct": 87.6,
  "pressure_hpa": 999.6,
  "cloud_cover_pct": 100,
  "uv_index": null,
  "condition": "rain",
  "symbol_code": "rain",
  "precipitation_next_hour_mm": 0.7
 },
 "hourly": [
  {
   "time_local": "2026-10-21T13:00:00+01:00",
   "temperature_c": 9.9,
   "feels_like_c": 6.7,
   "wind_speed_ms": 7.5,
   "wind_gust_ms": null,
   "wind_direction_deg": 262.7,
   "humidity_pct": 87.6,
   "pressure_hpa": 999.6,
   "cloud_cover_pct": 100,
   "uv_index": null,
   "condition": "rain",
   "precipitation_mm": 0.7,
   "precip_probability_pct": null
  },
  {
   "time_local": "2026-10-21T14:00:00+01:00",
   "temperature_c": 9.8,
   "feels_like_c": 6.6,
   "wind_speed_ms": 7.3,
   "wind_gust_ms": null,
   "wind_direction_deg": 254.6,
   "humidity_pct": 87.9,
   "pressure_hpa": 1001,
   "cloud_cover_pct": 100,
   "uv_index": null,
   "condition": "light rain",
   "precipitation_mm": 0.2,
   "precip_probability_pct": null
  },
  "..."
 ],
 "daily": [
  {
   "date": "2026-10-21",
   "min_temp_c": 8.1,
   "max_temp_c": 10.8,
   "precipitation_mm": 0.9,
   "max_wind_ms": 7.5,
   "condition": "clear sky"
  },
  {
   "date": "2026-10-22",
   "min_temp_c": 8,
   "max_temp_c": 13.6,
   "precipitation_mm": 3,
   "max_wind_ms": 5.7,
   "condition": "partly cloudy"
  },
  "..."
 ],
 "source": "MET Norway Locationforecast 2.0 (api.met.no), CC BY 4.0. Place names: GeoNames CC BY 4.0",
 "error": null
}
```

### Use it from AI agents (MCP) and code

- **Apify MCP server:** add `https://mcp.apify.com/?tools=tudorlane/world-weather-forecast` to Claude, Cursor, ChatGPT connectors, VS Code or any MCP client (sign in with Apify OAuth or an API token). The Actor appears as a tool the model can call.
- **REST (sync):** `POST https://api.apify.com/v2/acts/tudorlane~world-weather-forecast/run-sync-get-dataset-items?token=YOUR_TOKEN` with the input JSON as the body; results come back in the response.
- **SDKs / no-code:** `apify-client` (Python/JS), LangChain, LlamaIndex, CrewAI, n8n, Make and Zapier integrations.

### FAQ

**Need an API key?** No.

**How many locations?** Up to 500 per run.

**Units?** `units: imperial` adds F, mph and inches.

**What if the source is down?** You get an `error` row and are not charged for it.

**Support?** Open an issue on the Actor's Issues tab.

***

Keywords: weather API, weather forecast API, hourly forecast, 7 day forecast, MET Norway, yr.no, weather for AI agents, MCP tool, Apify Actor, AI agent tool.

# Actor input Schema

## `requests` (type: `array`):

Max 500. Strings like "Tokyo" or objects {"location": "Paris, FR"} / {"lat": 40.71, "lon": -74.0, "days": 3}.

## `location` (type: `string`):

City name, optionally with region/country. Used when requests is empty.

## `units` (type: `string`):

imperial adds °F, mph and inches.

## Actor input object example

```json
{
  "requests": [
    {
      "location": "London, UK"
    },
    {
      "lat": 40.7128,
      "lon": -74.006
    }
  ],
  "units": "metric"
}
```

# Actor output Schema

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

One item per request.

## `dataset` (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 = {
    "requests": [
        {
            "location": "London, UK"
        },
        {
            "lat": 40.7128,
            "lon": -74.006
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tudorlane/world-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 = { "requests": [
        { "location": "London, UK" },
        {
            "lat": 40.7128,
            "lon": -74.006,
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tudorlane/world-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 '{
  "requests": [
    {
      "location": "London, UK"
    },
    {
      "lat": 40.7128,
      "lon": -74.006
    }
  ]
}' |
apify call tudorlane/world-weather-forecast --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tudorlane/world-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/3g89X2oP0p1GLE92C/builds/cczDgo3SsrvHOYsUI/openapi.json
