# NREL PVWatts Solar Production Calculator (`compute-edge/nrel-pvwatts-scraper`) Actor

Calculate solar PV system energy production for any US location using NREL's PVWatts v8 API. Models monthly and annual AC output (kWh) for grid-connected photovoltaic systems based on system size, tilt, azimuth, and array type.

- **URL**: https://apify.com/compute-edge/nrel-pvwatts-scraper.md
- **Developed by:** [Compute Edge](https://apify.com/compute-edge) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## NREL PVWatts Solar Production Calculator

Estimate solar PV system energy production for any US location using the National Renewable Energy Laboratory's **PVWatts v8** API. Inputs latitude, longitude, system capacity, tilt, and azimuth. Outputs monthly and annual AC kWh, capacity factor, and the nearest weather station used for solar resource modeling.

### Why this Actor

Solar installers, energy developers, and ESG analysts need quick PV output estimates for hundreds of sites. PVWatts is the industry-standard NREL model — this Actor wraps it for bulk runs, multi-site portfolios, and dashboards, returning structured JSON that drops into CSV/RAG pipelines without a single API call from your team.

### Features

- Bulk multi-site mode: feed many lat/lon/capacity rows in one run.
- Annual + monthly AC and DC kWh output.
- Capacity factor (computed).
- Solar resource (kWh/m²/day) annual and monthly.
- Nearest weather station metadata (name, distance, elevation).
- Works with NREL's free DEMO_KEY (rate-limited) — or a free user key for unlimited use.

### Output fields

| Field | Description |
|---|---|
| latitude, longitude, label | Site identity |
| systemCapacityKW | DC nameplate |
| annualAcOutputKWh | Annual AC energy |
| capacityFactorPct | Computed capacity factor |
| monthlyAcKWh | 12-month AC output array |
| monthlyDcKWh | 12-month DC output array |
| solradAnnual / monthlySolarResource | NREL TMY solar resource (kWh/m²/day) |
| stationName, stationCity, stationState | NSRDB weather station used |
| stationDistanceMeters | Distance from site to weather station |

### Tutorial — How to estimate solar production

1. (Recommended) Get a free NREL API key at https://developer.nrel.gov/signup/. Paste it into **NREL API Key**.
2. Paste one site per line into **Sites**, formatted as `latitude,longitude,capacity_kW`. Example:
````

33.4484,-112.0740,10
34.0522,-118.2437,8
40.7128,-74.0060,12

````
3. Choose **Tilt**, **Azimuth**, **Array Type** (fixed roof, 1-axis tracker, etc.), **Module Type** (standard/premium/thin-film) and **System Losses %**.
4. **Run**. Each site returns one record with annual + monthly output.

Leave **Sites** blank to estimate output for 10 sample US cities — useful for testing.

### Pricing

Per-result. Each site = 1 result. Compute is minimal (single HTTPS request per site).

### Use cases

- Solar installer lead qualification (rough output for proposed sites)
- ESG / RE100 corporate site modeling
- Real estate / commercial roof-leasing assessments
- Academic / consulting analyses of regional solar potential

### FAQ

**Q: Do I have to get an API key?** No — DEMO_KEY works for small runs, but is rate-limited and shared. The free NREL key is instant.

**Q: Is this PVWatts v6, v7, or v8?** v8 — the current released version.

**Q: What's the model accuracy?** ±10% versus measured production for most US locations; NREL publishes uncertainty docs at https://pvwatts.nrel.gov/.

### Legal

This Actor calls NREL's public PVWatts API. NREL data is public-domain US Government data. Respect NREL rate limits (free key = 1,000 req/hr by default).

# Actor input Schema

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

Free NREL API key (https://developer.nrel.gov/signup/). Leave blank to use DEMO_KEY (rate-limited).
## `sites` (type: `string`):

One site per line: 'latitude,longitude,system_capacity_kW'. Example: '40.0,-105.0,4'. Leave blank for default sample sites.
## `moduleType` (type: `integer`):

0 = Standard, 1 = Premium, 2 = Thin Film.
## `arrayType` (type: `integer`):

0 = Fixed open rack, 1 = Fixed roof mount, 2 = 1-axis, 3 = 1-axis backtracking, 4 = 2-axis.
## `losses` (type: `integer`):

System losses percent (default 14).
## `tilt` (type: `integer`):

Array tilt from horizontal.
## `azimuth` (type: `integer`):

Array azimuth (180 = south).

## Actor input object example

```json
{
"apiKey": "",
"sites": "",
"moduleType": 1,
"arrayType": 1,
"losses": 14,
"tilt": 20,
"azimuth": 180
}
````

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("compute-edge/nrel-pvwatts-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("compute-edge/nrel-pvwatts-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call compute-edge/nrel-pvwatts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=compute-edge/nrel-pvwatts-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NREL PVWatts Solar Production Calculator",
        "description": "Calculate solar PV system energy production for any US location using NREL's PVWatts v8 API. Models monthly and annual AC output (kWh) for grid-connected photovoltaic systems based on system size, tilt, azimuth, and array type.",
        "version": "0.1",
        "x-build-id": "I0aiJD3lJgpqE4LZT"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/compute-edge~nrel-pvwatts-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-compute-edge-nrel-pvwatts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/compute-edge~nrel-pvwatts-scraper/runs": {
            "post": {
                "operationId": "runs-sync-compute-edge-nrel-pvwatts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/compute-edge~nrel-pvwatts-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-compute-edge-nrel-pvwatts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "apiKey": {
                        "title": "NREL API Key",
                        "type": "string",
                        "description": "Free NREL API key (https://developer.nrel.gov/signup/). Leave blank to use DEMO_KEY (rate-limited).",
                        "default": ""
                    },
                    "sites": {
                        "title": "Sites (lat,lon,capacity_kW per line)",
                        "type": "string",
                        "description": "One site per line: 'latitude,longitude,system_capacity_kW'. Example: '40.0,-105.0,4'. Leave blank for default sample sites.",
                        "default": ""
                    },
                    "moduleType": {
                        "title": "Module Type",
                        "minimum": 0,
                        "maximum": 2,
                        "type": "integer",
                        "description": "0 = Standard, 1 = Premium, 2 = Thin Film.",
                        "default": 1
                    },
                    "arrayType": {
                        "title": "Array Type",
                        "minimum": 0,
                        "maximum": 4,
                        "type": "integer",
                        "description": "0 = Fixed open rack, 1 = Fixed roof mount, 2 = 1-axis, 3 = 1-axis backtracking, 4 = 2-axis.",
                        "default": 1
                    },
                    "losses": {
                        "title": "System Losses (%)",
                        "minimum": 0,
                        "maximum": 99,
                        "type": "integer",
                        "description": "System losses percent (default 14).",
                        "default": 14
                    },
                    "tilt": {
                        "title": "Tilt (degrees)",
                        "minimum": 0,
                        "maximum": 90,
                        "type": "integer",
                        "description": "Array tilt from horizontal.",
                        "default": 20
                    },
                    "azimuth": {
                        "title": "Azimuth (degrees)",
                        "minimum": 0,
                        "maximum": 360,
                        "type": "integer",
                        "description": "Array azimuth (180 = south).",
                        "default": 180
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
