Premium APIGET /v1/solar

Solar Data API

Precision solar radiation data — GHI, DNI, and diffuse irradiance — for any location and date.

Our Solar Data API delivers hourly Global Horizontal Irradiance (GHI), Direct Normal Irradiance (DNI), and diffuse radiation values calibrated against satellite and ground-station measurements. Whether you're sizing a rooftop installation, building an energy management system, or running a yield simulation, our data gives you the solar resource intelligence you need.

What You Get with the Solar Data API

GHI, DNI & diffuse irradiance

All three key irradiance components in a single response, enabling accurate energy-yield modelling for flat, tilted, and tracking panels.

Hourly time resolution

Irradiance values for every hour of the day — granular enough for intraday dispatch planning and battery sizing.

Global coverage

Data available for any latitude and longitude on Earth, including rooftop sites in remote or emerging markets.

AI-enhanced cloud cover analysis

Our ML layer refines satellite-derived cloud cover estimates to improve irradiance accuracy, especially under partially cloudy skies.

Historical & forecast data

Query past dates for performance verification or future dates for prospective energy assessments.

Clean JSON output

Responses integrate directly with Python (pvlib), MATLAB, and BI tools without preprocessing.

Who Uses This API

From startups to enterprise teams, the Solar Data API powers a wide range of real-world applications.

Solar panel sizing & yield modelling

Calculate expected annual energy output for residential and utility-scale installations using real hourly irradiance profiles.

Energy management systems

Feed intraday GHI forecasts into smart inverters and battery controllers to optimise charge/discharge cycles.

Grid integration & dispatch

Support network operators with hour-ahead solar generation forecasts to balance supply and demand.

Solar farm site selection

Compare irradiance potential across candidate sites before committing to development costs.

Request Parameters

ParameterTypeRequiredDescriptionExample
qstringRequiredLocation — city, lat/lon, or postcodePhoenix, AZ
dtstringRequiredDate in YYYY-MM-DD format2024-06-21

Authenticate every request with the X-API-Key header.

Code Example

Request

cURL
curl "https://api.weatherai.io/v1/solar?q=Phoenix,AZ&dt=2024-06-21" \
  -H "X-API-Key: your-api-key"

Response

200 OKapplication/json
{
  "location": { "name": "Phoenix", "region": "Arizona", "country": "USA" },
  "forecast": {
    "forecastday": [{
      "date": "2024-06-21",
      "hour": [
        { "time": "2024-06-21 06:00", "ghi": 180.5, "dni": 620.2, "diffuse": 85.3, "cloud_pct": 5 },
        { "time": "2024-06-21 12:00", "ghi": 980.1, "dni": 890.4, "diffuse": 120.7, "cloud_pct": 3 }
      ]
    }]
  }
}

Response Fields

FieldTypeDescription
locationobjectName, country, coordinates, timezone
forecast.forecastday[]arrayDaily forecast (one entry for the requested date)
forecast.forecastday[].hour[]array24 hourly irradiance records
hour[].timestringLocal time of the reading
hour[].ghinumberGlobal Horizontal Irradiance (W/m²)
hour[].dninumberDirect Normal Irradiance (W/m²)
hour[].diffusenumberDiffuse Horizontal Irradiance (W/m²)
hour[].cloud_pctnumberCloud cover percentage

Start Using the Solar Data API Today

Create a free account and get your API key in under a minute. 50 free Premium calls per day. No credit card required.

Get Your Free API Key