# Solar Resource API
> Solar irradiance and agroclimatology for any location on Earth — as an API over NASA POWER (Prediction Of Worldwide Energy Resources), derived from NASA satellite and reanalysis data. Get the solar resource needed to size and assess PV and CSP systems: global (GHI), direct-normal (DNI) and diffuse horizontal irradiance, clear-sky irradiance and the clearness index — either as long-term monthly climatology normals for quick site assessment, or as a daily time series for a date range (1981-present). The same call also serves meteorology — temperature, wind speed, relative humidity and precipitation — making it ideal for solar energy, agriculture, building-energy modelling and climate work. From cloudy Berlin to the Sahara, it turns a coordinate into bankable solar and climate data. A solar-resource / agroclimatology data source — distinct from PV-system energy simulation (PVGIS) and historical-weather records. Open data from NASA POWER.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/solar-api/..."
```

## Pricing
- **Free** (Free) — 2,320 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 46,500 calls/Mo, 8 req/s
- **Pro** ($21/Mo) — 233,000 calls/Mo, 20 req/s
- **Mega** ($58/Mo) — 840,000 calls/Mo, 50 req/s

## Endpoints

### Solar

#### `GET /v1/climatology` — Long-term monthly solar & climate normals

**Parameters:**
- `lat` (query, optional, string) — Latitude Example: `52.52`
- `lon` (query, optional, string) — Longitude Example: `13.41`
- `params` (query, optional, string) — Parameters (comma-separated)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/solar-api/v1/climatology?lat=52.52&lon=13.41"
```

**Response:**
```json
{
    "data": {
        "type": "climatology",
        "location": {
            "lat": 52.52,
            "lon": 13.41
        },
        "parameters": {
            "T2M": {
                "name": "Temperature at 2 m",
                "units": "C",
                "monthly": {
                    "ANN": 9.68,
                    "APR": 9.13,
                    "AUG": 19.92,
                    "DEC": 0.86,
                    "FEB": 0.4,
                    "JAN": -0.73,
                    "JUL": 20.47,
                    "JUN": 18.26,
                    "MAR": 3.74,
                    "MAY": 14.05,
                    "NOV": 4.56,
                    "OCT": 9.66,
                    "SEP": 15.28
                }
            },
            "RH2M": {
                "name": "Relative humidity 2 m",
                "units": "%",
                "monthly": {
                    "ANN": 79.79,
                    "APR": 77.46,
                    "AUG": 66.18,
                    "DEC": 94.15,
                    "FEB": 90.48,
                    "JAN": 93.7,
                    "JUL": 65,
                    "JUN": 65.98,
                    "MAR": 85.08,
                    "MAY": 72.78,
                    "NOV": 92.16,
                    "OCT": 83.25,
                    "SEP": 71.83
                }
            },
            "WS10M": {
                "name": "Wind speed at 10 m",
                "units": "m/s",
                "monthly": {
                    "AN
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/solar` — Daily solar irradiance over a date range

**Parameters:**
- `lat` (query, optional, string) — Latitude Example: `52.52`
- `lon` (query, optional, string) — Longitude Example: `13.41`
- `start` (query, optional, string) — Start date YYYYMMDD (1981+) Example: `20230601`
- `end` (query, optional, string) — End date YYYYMMDD (<=366 days) Example: `20230831`
- `params` (query, optional, string) — Parameters (comma-separated)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/solar-api/v1/solar?lat=52.52&lon=13.41&start=20230601&end=20230831"
```

**Response:**
```json
{
    "data": {
        "end": "20230831",
        "start": "20230601",
        "location": {
            "lat": 52.52,
            "lon": 13.41
        },
        "parameters": {
            "ALLSKY_KT": {
                "name": "Clearness index",
                "daily": {
                    "20230601": 0.64,
                    "20230602": 0.57,
                    "20230603": 0.72,
                    "20230604": 0.68,
                    "20230605": 0.64,
                    "20230606": 0.38,
                    "20230607": 0.48,
                    "20230608": 0.48,
                    "20230609": 0.58,
                    "20230610": 0.53,
                    "20230611": 0.63,
                    "20230612": 0.61,
                    "20230613": 0.57,
                    "20230614": 0.44,
                    "20230615": 0.4,
                    "20230616": 0.27,
                    "20230617": 0.39,
                    "20230618": 0.56,
                    "20230619": 0.31,
                    "20230620": 0.31,
                    "20230621": 0.49,
                    "20230622": 0.48,
                    "20230623": 0.08,
                    "20230624": 0.64,
                    "20230625": 0.4,
                    "20230626": 0.49,
                    "20230627": 0.48,
                    "20230628": 0.52,
                    "20230629": 0.39,
                    "20230630": 0.15,
                    "20230701": 0.4,
                    "20230702": 0.47,
          
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Parameters, units & notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/solar-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "NASA POWER provides solar-resource and meteorological data for any point on Earth, derived from NASA satellite and reanalysis data. /v1/climatology?lat=52.5&lon=13.4 returns long-term monthly climatology normals (and an annual value) — by default GHI (solar irradiance), temperature, wind, humidity and precipitation — ideal for solar-site assessment and agroclimatology; choose parameters with params=ALLSKY_SFC_SW_DWN,T2M,WS10M,… /v1/solar?lat=52.5&lon=13.4&start=20230601&end=20230831 returns the daily series over a range (up to 366 days), defaulting to the solar-resource set: global (GHI), direct-normal (DNI) and diffuse irradiance, clear-sky GHI and the clearness index — the raw resource data for sizing PV and CSP systems. Values are kWh/m²/day for irradiance, °C for temperature, m/s for wind, % for humidity and mm/day for precipitation; missing values are null. Daily data spans 1981-present. Data from NASA POWER (freely available). A solar-resource / agroclimatology data source — distinct from PV-system energy simulation (PVGIS) and historical-weather records. Ideal for solar energy, agriculture, building-energy and climate applications.",
        "source": "NASA POWER — Prediction Of Worldwide Energy Resources (power.larc.nasa.gov)",
        "endpoints": [
            "/v1/climatology",
            "/v1/solar",
            "/v1/meta"
        ],
        "parameters": {
            "T2M": "Temperature at 2 m",
            "RH2M":
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/solar-api
OpenAPI spec: https://www.oanor.com/api/solar-api/openapi.json
