# Solar Irradiance and PV Power Forecast API with TMY: Solcast (`nabeelbaghoor/solar-irradiance-pv-forecast-api`) Actor

Solar irradiance API for GHI, DNI, DHI, GTI and weather plus rooftop and utility PV power: 14 day forecasts, live estimated actuals, history from 2007, TMY P50 to P95 and horizon angles for any latitude and longitude through the Solcast API. Bring your own key.

- **URL**: https://apify.com/nabeelbaghoor/solar-irradiance-pv-forecast-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Developer tools, Business, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 irradiance, weather or pv power periods

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

## Solar Irradiance and PV Power Forecast API with TMY: Solcast

Get solar irradiance (GHI, DNI, DHI, GTI), weather and PV power forecasts, live estimated actuals, historical time series and typical meteorological years for any latitude and longitude through the Solcast API with your own key, as clean rows you can export to CSV, Excel or JSON.

Solcast, a DNV company, models solar radiation from weather satellites and numerical weather models worldwide. This actor wraps its read endpoints for irradiance and weather, rooftop PV power, advanced PV power and terrain horizon angles, in live, forecast, historic and TMY flavours. Use it for solar farm and rooftop PV production forecasting, energy trading and grid balancing, solar resource assessment and bankability studies, PVsyst and SAM model inputs, performance monitoring against expected yield, and weather driven analytics. Bring your own API key.

BYOK, not live tested: every route, parameter and response field comes from Solcast's own API documentation at docs.solcast.com.au (its OpenAPI document and endpoint reference), and every route was probed on 2026-10-30 with an invalid key. The actor has not been run against a live Solcast key.

### What it does

- **Irradiance and weather forecast**: up to 14 days ahead at 5 to 60 minute periods, with GHI, DNI, DHI, GTI, clear sky irradiance, cloud opacity, air and dewpoint temperature, humidity, wind at 10 m and 100 m, precipitation, snow, albedo, PM2.5, PM10, CAPE and weather type, plus 10th and 90th percentile GHI, DNI, DHI, GTI and cloud opacity.
- **Live irradiance and weather**: satellite derived estimated actuals for the past 7 days, near real time.
- **Historic irradiance and weather**: any window of up to 31 days per request from 2007-01-01 to 7 days ago, with time zone control.
- **TMY irradiance and weather**: a typical meteorological year built from 2007 to 2025, at P50, P75, P90 or P95, with optional GHI and DNI weighting.
- **Rooftop PV power**: live, forecast (with P10 and P90), historic and TMY power in kW for a simple system defined by capacity, tilt, azimuth, install date and loss factor.
- **Advanced PV power**: live, forecast (with P10 and P90), historic and TMY power for a detailed utility scale or commercial PV site already configured in your Solcast account, by resource ID, with availability, export constraint, dust and snow soiling and tracker overrides.
- **Horizon angles**: the terrain horizon around a location from a 90 m elevation model, up to 360 azimuth sections.
- **Two row layouts**: one row per period, or one row per location or site with every period plus min, max and mean per parameter, GHI irradiation in kWh/m2 and PV energy in kWh.
- **Pay only for results**: empty answers and refused lookups become a free row that says why, never charged.

### How to get your own key

1. Sign in to, or sign up for, the Solcast Toolkit at toolkit.solcast.com.au. Solcast offers commercial plans and limited free access for research and hobby use; your plan decides which products (irradiance, rooftop PV, advanced PV) and how many requests you get.
2. Copy your API key (a UUID) from the Toolkit and paste it into the API key field, or set the DATA_API_KEY environment secret.
3. To test without spending requests, use a Solcast unmetered location: the prefilled -33.8567,151.2152 (Sydney Opera House), or 36.0997,-112.1124 (Grand Canyon), 51.1788,-1.8262 (Stonehenge), with advanced PV resource ID ba75-e17a-7374-95ed for Sydney.

### Input

| Field | Modes | Notes |
| --- | --- | --- |
| `mode` | all | `forecastIrradiance`, `liveIrradiance`, `historicIrradiance`, `tmyIrradiance`, `forecastRooftopPv`, `liveRooftopPv`, `historicRooftopPv`, `tmyRooftopPv`, `forecastAdvancedPv`, `liveAdvancedPv`, `historicAdvancedPv`, `tmyAdvancedPv`, `horizonAngles` |
| `locations` | irradiance, rooftop PV, horizon | one `latitude,longitude` per line, up to 1,000 |
| `resourceIds` | advanced PV | PV site resource IDs from your Solcast account |
| `outputParameters` | irradiance and PV | dropdown of documented parameters; empty means the API default |
| `period` | irradiance and PV | PT5M to PT60M (TMY PT15M to PT60M) |
| `hours` | live and forecast | up to 168 live, 336 forecast |
| `start`, `end`, `duration` | historic | ISO 8601; end or duration within 31 days |
| `timeZone` | historic, TMY | utc, longitudinal or an offset such as 10 |
| `probability`, `ghiWeight`, `dniWeight` | TMY | P50 to P95; weights add up to 1 |
| `capacityKw`, `installDate`, `lossFactor` | rooftop PV | capacity is required |
| `tilt`, `azimuth` | irradiance, rooftop PV | degrees; azimuth from true north, east is -90 |
| `arrayType` | irradiance | fixed or horizontal single axis tracker, for GTI |
| `applySnowSoiling` | PV | snow loss override, 0 to 1 |
| `applyDustSoiling`, `applyAvailability`, `applyConstraint`, `applyTrackerInactive` | advanced PV | site overrides |
| `terrainShading` | irradiance and PV | terrain shading from a 90 m elevation model |
| `azimuthIntervals` | horizon | 1 to 360, default 36 |
| `rowLayout` | irradiance and PV | `periods` or `series` |
| `maxResults` | all | most rows returned and charged, default 500 |
| `requestsPerMinute` | all | pacing, default 30 |
| `apiKey` | all | your Solcast API key, stored as a secret |

### Output

One row per period by default. Illustrative live irradiance row (values from Solcast's documented example, not a live response):

```json
{
    "mode": "liveIrradiance",
    "recordType": "period",
    "product": "irradiance",
    "dataType": "live",
    "found": true,
    "query": "-33.8567,151.2152",
    "latitude": -33.8567,
    "longitude": 151.2152,
    "resourceId": null,
    "periodEnd": "2026-08-27T07:00:00.0000000Z",
    "period": "PT30M",
    "ghi": 103,
    "dni": 403,
    "dhi": null,
    "gti": null,
    "airTemp": 15,
    "cloudOpacity": null,
    "pvPowerKw": null,
    "values": { "air_temp": 15, "dni": 403, "ghi": 103, "period_end": "2026-08-27T07:00:00.0000000Z", "period": "PT30M" }
}
```

PV rows fill `pvPowerKw`, and forecast PV rows also `pvPower10Kw` and `pvPower90Kw`. In the `series` layout each row adds `pointCount`, `firstPeriodEnd`, `lastPeriodEnd`, `stats` (min, max and mean per parameter), `ghiMean`, `ghiMax`, `ghiIrradiationKwhM2`, `airTempMean`, `pvPowerMaxKw`, `energyKwh` and `points` (every period). Horizon rows hold `azimuthIntervals`, `horizonAngleMax`, `horizonAngleMean` and `horizonAngles`, a list of `{ "azimuth": -180, "angle": 3.711284 }` pairs.

### Pricing

Pay per event, only for rows that carry real Solcast data:

| Event | Price |
| --- | --- |
| Irradiance, weather or PV power period | $0.005 |
| Whole time series for one location or site (series layout) | $0.02 |
| Horizon angle profile | $0.01 |

Your Solcast plan and its request quota apply on top. Each location or resource is one Solcast request, whatever the layout. For long windows such as a full TMY, the series layout is far cheaper than one row per period.

### FAQ

#### What is the Solcast API?

The Solcast API from Solcast Pty Ltd, a DNV company, serves solar irradiance, weather and PV power data for any location worldwide, derived from geostationary weather satellites and numerical weather models. It covers live estimated actuals, forecasts up to 14 days ahead, history from 2007 and typical meteorological years.

#### Do I need my own Solcast API key?

Yes. This actor is bring your own key: it sends your Solcast API key in the Authorization Bearer header to api.solcast.com.au and never stores or logs it. Without a key the run ends cleanly with a message saying how to add one.

#### What is the difference between GHI, DNI, DHI and GTI?

GHI is global horizontal irradiance, the total sunlight on a flat surface. DNI is direct normal irradiance from the sun's beam. DHI is diffuse horizontal irradiance scattered by the sky. GTI is global tilted irradiance on a panel with your tilt and azimuth, or on a single axis tracker. All are in W/m2.

#### What is a TMY and which probability should I pick?

A typical meteorological year is one representative year of hourly or sub hourly weather built from many years of data, used in PVsyst, SAM and bankability studies. P50 is the median year; P90 and P95 are conservative years that are exceeded 90 and 95 percent of the time.

#### Rooftop PV or advanced PV?

Rooftop PV needs only coordinates and capacity, and suits homes and small commercial systems. Advanced PV models a detailed site (trackers, inverters, export limits) that you first configure in your Solcast account, and you read it by its resource ID. This actor reads both but never creates or edits sites.

#### How far back and ahead does the data go?

Forecasts reach 14 days ahead. Live estimated actuals cover the past 7 days. Historic data runs from 2007-01-01 to 7 days ago, at most 31 days per request; split longer studies into several runs.

#### Can I test without using my quota?

Yes. Solcast lists unmetered locations, such as the Sydney Opera House at -33.8567,151.2152, that do not count against your requests when the coordinates match to four decimal places.

#### What do I pay?

$0.005 per period row, $0.02 per whole series row and $0.01 per horizon profile, plus your own Solcast plan. Refused and empty lookups are free.

### Keyword map

solar irradiance API, solar forecast API, PV power forecast API, GHI DNI DHI data, global tilted irradiance, solar radiation data API, TMY data download, typical meteorological year P50 P90, historical solar irradiance, live solar estimated actuals, rooftop solar forecast, utility scale PV forecast, Solcast API, horizon angle terrain shading, PVsyst weather file data, solar resource assessment.

### Routes and verification

| Mode | Route | Probe with invalid key (twice) |
| --- | --- | --- |
| Irradiance and weather | GET /data/live, /data/forecast, /data/historic, /data/tmy + /radiation_and_weather | 401 on live |
| Rooftop PV power | GET /data/live, /data/forecast, /data/historic, /data/tmy + /rooftop_pv_power | 401 on forecast |
| Advanced PV power | GET /data/live, /data/forecast, /data/historic, /data/tmy + /advanced_pv_power | 401 on TMY |
| Horizon angles | GET /data/geographic/horizon_angle | 401 |
| Invented control routes | GET /data/live/sunshine_index, /data/outlook/radiation_and_weather | 404 HTML Not Found |

Every request sends `format=json` and the key in the documented `Authorization: Bearer` header, never in a URL or a log line. The soiling (Kimber, HSU), grid aggregation, premium PV and wind forecast endpoints, and all site, measurement and schedule management endpoints, are not wrapped.

### Licensing and data use

This actor works only with your own Solcast API key, and your agreement with Solcast applies. Solcast's terms allow use for your own internal business purposes, and do not allow reselling the data or sharing your API key. This actor is not affiliated with or endorsed by Solcast or DNV.

# Actor input Schema

## `mode` (type: `string`):

Each mode calls one documented Solcast read endpoint. Irradiance and rooftop PV modes take coordinates; advanced PV modes take the resource ID of a PV site already set up in your Solcast account; horizon angles take coordinates. Your Solcast plan must include the product.

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

Irradiance, rooftop PV and horizon modes. One latitude,longitude pair in decimal degrees per line. -33.8567,151.2152 (Sydney Opera House) is a Solcast unmetered test location that does not use up your requests.

## `resourceIds` (type: `array`):

Advanced PV modes. The resource ID of each PV power site configured in your Solcast account, one per line. ba75-e17a-7374-95ed is the unmetered Sydney test site.

## `outputParameters` (type: `array`):

Optional. The variables to return. Irradiance modes take the weather and irradiance parameters (percentiles ending in 10 or 90 only on the forecast); rooftop PV modes take pv_power_rooftop; advanced PV modes take pv_power_advanced. Leave empty for the API default set. The prefilled irradiance set is ignored by PV modes.

## `period` (type: `string`):

Optional. Length of each period. The API default is 30 minutes (60 minutes for TMY); TMY accepts 15 minutes or longer.

## `hours` (type: `integer`):

Optional, live and forecast modes. Hours of data to return: up to 168 for live estimated actuals and 336 (14 days) for forecasts.

## `start` (type: `string`):

Historic modes, required. yyyy-mm-dd or an ISO 8601 date-time such as 2026-01-01T00:00Z, on or after 2007-01-01. Without a time zone the time zone below applies, else UTC.

## `end` (type: `string`):

Historic modes. yyyy-mm-dd or an ISO 8601 date-time within 31 days of the start. Set this or the duration.

## `duration` (type: `string`):

Historic modes. ISO 8601 duration of up to 31 days, such as P1D, P7D, P31D or PT12H. Set this or the end.

## `timeZone` (type: `string`):

Optional, historic and TMY modes. utc, longitudinal, or a UTC offset from -13 to 13 in 0.25 hour steps, such as 10 or -5.5.

## `probability` (type: `string`):

Optional, TMY modes. The probability of exceedance year to build: P50 is the median year, P90 a year exceeded 90 percent of the time.

## `ghiWeight` (type: `number`):

Optional, TMY modes. Weight of GHI when selecting the typical months. Set together with the DNI weight; the two must add up to 1.

## `dniWeight` (type: `number`):

Optional, TMY modes. Weight of DNI when selecting the typical months. Set together with the GHI weight; the two must add up to 1.

## `capacityKw` (type: `number`):

Rooftop PV modes, required. The capacity of the inverter (AC) or the modules (DC), whichever is greater, in kilowatts. For example 5 for a 5 kW home system.

## `tilt` (type: `number`):

Optional, irradiance and rooftop PV modes. Panel tilt off horizontal: 0 is flat, 90 vertical. The API picks a latitude based default when empty.

## `azimuth` (type: `number`):

Optional, irradiance and rooftop PV modes. Direction the panels face from true north, positive anticlockwise: -90 is east, 135 southwest. Defaults to facing the equator.

## `arrayType` (type: `string`):

Optional, irradiance modes. Mounting geometry used for GTI: fixed, or a horizontal single axis tracker.

## `installDate` (type: `string`):

Optional, rooftop PV modes. yyyy-mm-dd installation date, used to estimate ageing losses when no loss factor is given.

## `lossFactor` (type: `number`):

Optional, rooftop PV modes. Non temperature losses as a decimal from 0 to 1; the API default is 0.90.

## `applySnowSoiling` (type: `number`):

Optional, PV modes. Replaces the dynamic snow soiling loss with this decimal, such as 0 right after the snow was cleared.

## `applyDustSoiling` (type: `number`):

Optional, advanced PV modes. Replaces the site's average dust soiling loss with this decimal.

## `applyAvailability` (type: `number`):

Optional, advanced PV modes. Share of the site's AC capacity generating during the period; 50 percent availability halves the returned power.

## `applyConstraint` (type: `number`):

Optional, advanced PV modes. A cap on total AC output, applied like a site export limit.

## `applyTrackerInactive` (type: `boolean`):

Optional, advanced PV modes. Treat trackers as stowed flat (zero rotation). Only affects sites with tracking.

## `terrainShading` (type: `boolean`):

Optional. Adjust irradiance for the surrounding terrain from a 90 m elevation model (beam blocked by hills, reduced sky view).

## `azimuthIntervals` (type: `integer`):

Horizon angles mode. How many equal sections the full circle is split into, up to 360; 36 gives one angle every 10 degrees.

## `rowLayout` (type: `string`):

One row per period (timestamp with its values), or one row per location or site holding every period with point count, first and last period, min, max and mean per parameter, irradiation in kWh/m2 and PV energy in kWh.

## `maxResults` (type: `integer`):

The most rows this run returns and charges for. A 7 day forecast at 30 minutes is 336 period rows per location; a TMY at 60 minutes is 8,760.

## `requestsPerMinute` (type: `integer`):

Pacing for calls to Solcast. Throttled calls are retried after the Retry-After pause.

## `apiKey` (type: `string`):

Your API key from the Solcast Toolkit (a UUID). Stored as a secret, sent only in the Authorization Bearer header to api.solcast.com.au and never logged. You can instead set the DATA_API_KEY environment secret.

## Actor input object example

```json
{
  "mode": "forecastIrradiance",
  "locations": [
    "-33.8567,151.2152"
  ],
  "outputParameters": [
    "ghi",
    "dni",
    "dhi",
    "air_temp",
    "cloud_opacity"
  ],
  "period": "",
  "start": "2026-01-01",
  "duration": "P1D",
  "probability": "",
  "arrayType": "",
  "applyTrackerInactive": false,
  "terrainShading": false,
  "azimuthIntervals": 36,
  "rowLayout": "periods",
  "maxResults": 500,
  "requestsPerMinute": 30
}
```

# Actor output Schema

## `records` (type: `string`):

One row per period, series or horizon profile the chosen mode read.

# 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": [
        "-33.8567,151.2152"
    ],
    "outputParameters": [
        "ghi",
        "dni",
        "dhi",
        "air_temp",
        "cloud_opacity"
    ],
    "start": "2026-01-01",
    "duration": "P1D"
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/solar-irradiance-pv-forecast-api").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": ["-33.8567,151.2152"],
    "outputParameters": [
        "ghi",
        "dni",
        "dhi",
        "air_temp",
        "cloud_opacity",
    ],
    "start": "2026-01-01",
    "duration": "P1D",
}

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/solar-irradiance-pv-forecast-api").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 '{
  "locations": [
    "-33.8567,151.2152"
  ],
  "outputParameters": [
    "ghi",
    "dni",
    "dhi",
    "air_temp",
    "cloud_opacity"
  ],
  "start": "2026-01-01",
  "duration": "P1D"
}' |
apify call nabeelbaghoor/solar-irradiance-pv-forecast-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nabeelbaghoor/solar-irradiance-pv-forecast-api"
        }
    }
}
```

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/LHsxFohfHjT24dYdJ/builds/51gsGc2nY3dlOjwfZ/openapi.json
