SFOLN

Catalogue / Data utilities

Weather Forecast API

sfoln/weather-forecast · Developer tools, Automation, Travel

Weather forecast API for any list of place names or coordinates: current conditions, a daily forecast of up to 10 days and optional hourly steps, with temperature, feels-like, rain, wind, UV and sunrise/sunset in local time. MET Norway data. $1 per 1,000 locations.

About

What it does

Weather Forecast API returns current conditions plus a daily forecast of up to 10 days (and optional hourly steps) for any list of place names or coordinates in one call. Forecasts come from MET Norway, the Norwegian Meteorological Institute (the forecasts behind yr.no), for any point on Earth. Place names are geocoded automatically, and every record is in the location's own time zone with readable conditions ("Light rain showers"), feels-like temperature, UV index and sunrise/sunset. Built for logistics and field-service planning, travel and event apps, agriculture dashboards and AI agents that need a reliable weather answer.

Price

Price per delivered record

EventPricePer 1,000Charged for
Location forecast
weather-forecast
$0.001$1 / 1,000Charged once per location for which current conditions and the daily (and optional hourly) forecast were returned.

Apify free plan: up to 10 items per run. Paid plans have no per-run cap; set maxTotalChargeUsd to cap spend.

Run

Call it from code, an agent or the Console

curl · synchronous run, rows in the response
curl -X POST "https://api.apify.com/v2/actors/sfoln~weather-forecast/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"locations":["Berlin","40.7128,-74.0060"]}'
mcp.json · hosted Apify MCP server
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=sfoln/weather-forecast"
    }
  }
}
asynchronous run · for large batches
POST https://api.apify.com/v2/actors/sfoln~weather-forecast/runs?maxTotalChargeUsd=1
GET  https://api.apify.com/v2/actor-runs/{runId}            # until status is SUCCEEDED
GET  https://api.apify.com/v2/datasets/{defaultDatasetId}/items?format=json

Authenticate with an Apify API token. MCP clients can instead sign in with OAuth when prompted. Example prompt for an agent: What is the 7-day weather forecast for Berlin and New York? Include daily highs, lows and how much rain to expect.

Input

Input fields

List places or coordinates (one per line). Each location produces one dataset record with current conditions and a daily (optionally hourly) forecast.

FieldTypeDefaultMeaning
locations *arrayrequiredLocations
One per line: a place name ("Berlin", "Paris, France") or "latitude,longitude" ("40.7128,-74.0060"). Via the API you can also pass objects like {"latitude": 52.52, "longitude": 13.41, "name": "Office"} or {"place": "Springfield", "countryCode": "US"}. Accounts on the Apify free plan can process up to 10 locations per run.
daysinteger7Forecast days
Calendar days to return, today included. The forecast reaches about 10 days ahead, so values above 10 return the whole forecast (10 days). Range 1–16.
hourlybooleanfalseInclude hourly forecast
Add an `hourly` array: one entry per forecast step (hourly for about the first 2.5 days, then every 6 hours) with temperature, feels-like, humidity, precipitation, conditions and wind.
unitsstring"metric"Units
metric = °C, km/h, mm · imperial = °F, mph, inch. One of "metric", "imperial".
timezonestring"auto"Time zone
auto (default) = each location's own time zone: days and times are local there. Or one IANA time zone for every location, e.g. UTC or Europe/Berlin.
maxLocationsinteger1000Max locations
Safety cap on how many locations are processed in this run. Range 1–10000.
concurrencyinteger5Concurrency
How many locations are processed in parallel. Range 1–10.
includeRawbooleanfalseInclude raw upstream response
Attach the unmodified MET Norway forecast (GeoJSON) to each record (larger output).
Example input
{
  "locations": [
    "Berlin",
    "40.7128,-74.0060"
  ]
}

Output

One record per input item

Records land in the run's dataset; a synchronous call returns them directly. Each has a status (ok is charged; everything else is free) and a charged flag. The run's OUTPUT record totals items and charges.

FieldTypeMeaning
inputstring | objectInput
The parsed location input.
locationstring | nullLocation
Resolved place label ("Berlin, State of Berlin, Germany"), the given name, or "lat,lng". e.g. "Berlin, State of Berlin, Germany"
resolvedPlaceobject | nullResolved place
Geocoding match for place-name inputs: name, latitude, longitude, country, countryCode, admin1, timezone, elevation, population.
latitudenumber | nullLatitude
Latitude of the forecast point (4 decimals).
longitudenumber | nullLongitude
Longitude of the forecast point (4 decimals).
elevationnumber | nullElevation (m)
Altitude the forecast temperatures refer to (the place's elevation, else MET Norway's terrain model).
timezonestring | nullTimezone
IANA time zone of all days and times in the record.
timezoneAbbreviationstring | nullTZ abbreviation
e.g. CEST, EDT or GMT+9.
utcOffsetSecondsinteger | nullUTC offset (s)
Current offset of the time zone from UTC.
timezoneSourcestring | nullTimezone source
geocoder (the place's zone) | nearest_place (coordinates: zone of the nearest populated place) | input (the timezone input) | default (UTC).
unitsobject | nullUnits
{ temperature, windSpeed, precipitation } unit labels.
currentobject | nullCurrent conditions
The current forecast hour: time, temperature, apparentTemperature, dewPoint, relativeHumidity, precipitation, weatherCode, symbolCode, weatherText, cloudCover, windSpeed, windDirection, windGusts, pressure, uvIndexClearSky, isDay.
dailyarrayDaily forecast
Per local calendar day: date, tempMax, tempMin, precipitationSum, precipitationProbabilityMax, weatherCode, symbolCode, weatherText, windMax, windGustMax, uvIndexMax, sunrise, sunset, hoursCovered.
hourlyarrayHourly forecast
Only when `hourly` is enabled: one entry per forecast step (hourly, later 6-hourly): time, periodHours, temperature, apparentTemperature, dewPoint, relativeHumidity, precipitation, precipitationProbability, weatherCode, symbolCode, weatherText, windSpeed, windDirection, windGusts, cloudCover, uvIndexClearSky.
forecastDaysinteger | nullForecast days
Number of days in `daily`.
forecastStartstring | nullForecast start
Local time of the first forecast step.
forecastEndstring | nullForecast end
Local time of the last forecast step (about 10 days ahead).
forecastUpdatedAtstring | nullForecast updated
When MET Norway last updated this forecast (ISO, UTC).
attributionstring | nullAttribution
Weather data from MET Norway (api.met.no), CC BY 4.0.
statusstringStatus
ok | not_found | error | skipped_invalid | skipped_budget | skipped_free_plan e.g. "ok"
chargedbooleanCharged
Whether this record incurred a pay-per-event charge.
chargedEventstring | nullCharged event
weather-forecast when charged.
sourcestringSource
metno
fetchedAtstringFetched at
ISO timestamp.
warningsarray | nullWarnings
Non-fatal notes (a geocoding fallback, fewer days than requested).
errorobject | nullError
{ code, message, provider?, status? } when status is not ok.
Example record
Example record
{
  "input": {
    "kind": "place",
    "place": "New York"
  },
  "location": "New York, United States",
  "resolvedPlace": {
    "name": "New York",
    "latitude": 40.71427,
    "longitude": -74.00597,
    "country": "United States",
    "countryCode": "US",
    "admin1": "New York",
    "timezone": "America/New_York",
    "elevation": 10,
    "population": 8804190
  },
  "latitude": 40.7128,
  "longitude": -74.006,
  "elevation": 28,
  "timezone": "America/New_York",
  "timezoneAbbreviation": "EDT",
  "utcOffsetSeconds": -14400,
  "timezoneSource": "geocoder",
  "units": {
    "temperature": "°C",
    "windSpeed": "km/h",
    "precipitation": "mm"
  },
  "current": {
    "time": "2026-10-14T19:00",
    "temperature": 23,
    "apparentTemperature": 23,
    "dewPoint": 19.7,
    "relativeHumidity": 81.1,
    "precipitation": 0,
    "weatherCode": 2,
    "symbolCode": "partlycloudy_night",
    "weatherText": "Partly cloudy",
    "cloudCover": 71.1,
    "windSpeed": 16.6,
    "windDirection": 260.2,
    "windGusts": null,
    "pressure": 1011.1,
    "uvIndexClearSky": 0,
    "isDay": false
  },
  "daily": [
    {
      "date": "2026-10-16",
      "tempMax": 23.9,
      "tempMin": 12.7,
      "precipitationSum": 6.7,
      "precipitationProbabilityMax": null,
      "weatherCode": 81,
      "symbolCode": "rainshowers_day",
      "weatherText": "Rain showers",
      "windMax": 21.6,
      "windGustMax": null,
      "uvIndexMax": 4.5,
      "sunrise": "2026-10-16T07:08",
      "sunset": "2026-10-16T18:14",
      "hoursCovered": 24
    }
  ],
  "hourly": [
    {
      "time": "2026-10-14T19:00",
      "periodHours": 1,
      "temperature": 23,
      "apparentTemperature": 23,
      "dewPoint": 19.7,
      "relativeHumidity": 81.1,
      "precipitation": 0,
      "precipitationProbability": null,
      "weatherCode": 2,
      "symbolCode": "partlycloudy_night",
      "weatherText": "Partly cloudy",
      "windSpeed": 16.6,
      "windDirection": 260.2,
      "windGusts": null,
      "cloudCover": 71.1,
      "uvIndexClearSky": 0
    }
  ],
  "forecastDays": 3,
  "forecastStart": "2026-10-14T19:00",
  "forecastEnd": "2026-10-23T20:00",
  "forecastUpdatedAt": "2026-10-14T19:17:47Z",
  "attribution": "Weather data from MET Norway (api.met.no), CC BY 4.0",
  "status": "ok",
  "charged": true,
  "chargedEvent": "weather-forecast",
  "source": "metno",
  "fetchedAt": "2026-10-14T23:38:02.000Z"
}

FAQ

Questions

How far ahead does the forecast go?
About 10 days: hourly steps for roughly the first 2.5 days, then 6-hour steps. Ask for up to 10 days; larger values return the whole forecast.
Which time zone are the dates and times in?
The location's own time zone by default (from the place name, or for coordinates the zone of the nearest populated place). Set timezone to UTC or any IANA zone to use that instead.

Machine-readable

This page for agents