Skip to content

Solar PV forecast

$0.004 per callUSDC via x402GET /api/solar-forecast

Solar PV forecast for any place for the next 1-16 days: plane-of-array irradiation for your panel tilt and azimuth, the expected energy for your system size and performance ratio...

Category: Live public dataTags: weather solar pv irradiance energy forecast

Try in playground →

Details

Solar PV forecast for any place for the next 1-16 days: plane-of-array irradiation for your panel tilt and azimuth, the expected energy for your system size and performance ratio, and the peak hour, by day and in total. By coordinates or place name. Cached for up to 5 minutes. ?place=Phoenix&days=7&tilt=25&capacityKw=5. Weather data by Open-Meteo.com (CC BY 4.0).

Parameters

NameTypeRequiredDescription
latnumbernoLatitude, -90 to 90 (with lon; wins over place) The example sends 33.4484.
lonnumbernoLongitude, -180 to 180 (with lat) The example sends -112.074.
placestringnoA city, town or region name instead of lat/lon, for example "Paris" or "Austin, TX" (not a street address); the answer echoes the place it resolved to Up to 100 characters.
daysnumbernoForecast days, 1-16 (default 7) The example sends 7.
tiltnumbernoPanel tilt from horizontal, 0-90 degrees (default 30) The example sends 25.
azimuthnumbernoPanel azimuth, -180 to 180 degrees: 0 faces south, -90 east, 90 west, 180 north (default 0)
capacityKwnumbernoSystem size in kW peak, 0.001-1000000 (default 1) The example sends 5.
performanceRationumbernoShare of plane-of-array energy delivered as AC, 0.1-1 (default 0.8)

Example request

curl -i "https://agent402.tools/api/solar-forecast?lat=33.4484&lon=-112.074&days=7&tilt=25&capacityKw=5"

Watch a call get paid

RequestGET /api/solar-forecast
402$0.004 USDC
SignPAYMENT-SIGNATURE
Settleon 14 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "lat": 33.4484,
  "lon": -112.074,
  "timezone": "America/Phoenix",
  "system": {
    "tilt": 25,
    "azimuth": 0,
    "capacityKw": 5,
    "performanceRatio": 0.8
  },
  "totals": {
    "irradiationKwhM2": 38.6,
    "energyKwh": 154.4,
    "days": 7
  },
  "days": [
    {
      "date": "2026-12-01",
      "irradiationKwhM2": 5.6,
      "energyKwh": 22.4,
      "peakWm2": 812,
      "peakHour": "2026-12-01T12:00"
    }
  ],
  "method": "Energy = plane-of-array irradiation (kWh/m²) x capacityKw x performanceRatio, the standard yield estimate at 1 kW/m² test conditions. It assumes no shading, snow or curtailment.",
  "source": "api.open-meteo.com (CC BY 4.0)",
  "attributionText": "Weather data by Open-Meteo.com (CC BY 4.0).",
  "sourceUrl": "https://open-meteo.com/",
  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/"
}
FieldTypeAlways presentIn the example
latnumberyes33.4484
lonnumberyes-112.074
timezonestringyesAmerica/Phoenix
systemobjectyes4 fields: tilt, azimuth, capacityKw and 1 more
totalsobjectyes3 fields: irradiationKwhM2, energyKwh, days
daysarray of objectsyes1 item in the example
methodstringyesEnergy = plane-of-array irradiation (kWh/m²) x capacityKw x performanceRatio,...
sourcestringyesapi.open-meteo.com (CC BY 4.0)
attributionTextstringyesWeather data by Open-Meteo.com (CC BY 4.0).
sourceUrlstringyeshttps://open-meteo.com/
licenseUrlstringyeshttps://creativecommons.org/licenses/by/4.0/

From an MCP client

catalog.call {
  "slug": "solar-forecast",
  "params": {
    "lat": 33.4484,
    "lon": -112.074,
    "days": 7,
    "tilt": 25,
    "capacityKw": 5
  }
}

Hosted connector (https://agent402.tools/mcp): paid in the call. Stdio package (npx -y agent402-mcp@0.19.2): pays from a wallet or AGENT402_CREDITS_KEY.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.004" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/solar-forecast?lat=33.4484&lon=-112.074&days=7&tilt=25&capacityKw=5");

Get a wallet or run npx -y agent402-mcp@0.19.2 wallet new.

The quote (Python)

import base64, json, urllib.error, urllib.request

req = urllib.request.Request("https://agent402.tools/api/solar-forecast?lat=33.4484&lon=-112.074&days=7&tilt=25&capacityKw=5", method="GET", headers={})
try:
    urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
    quote = json.loads(base64.b64decode(e.headers["PAYMENT-REQUIRED"]))
    print(e.code, [(a["network"], a["amount"]) for a in quote["accepts"]])  # the price, per chain, in base units

Part of these workflows

Guides that use this tool

Related tools