PVWatts API
Overview
PVWatts is a NREL (National Renewable Energy Laboratory) API that estimates the energy production of grid-connected photovoltaic (solar panel) systems anywhere in the world. It requires a free API key from developer.nrel.gov and accepts system parameters like capacity, tilt, and azimuth to return annual and monthly energy output estimates. It is widely used by solar installers, researchers, and green energy app developers.
Beginner Tip
Get a free API key instantly at developer.nrel.gov — no approval needed. The minimum required parameters are system_capacity (kW), azimuth, tilt, array_type, module_type, losses, and a lat/lon location; start with default tilt and azimuth values for your latitude and the API will return estimated kWh per year.
Available Data
Example Response
{
"id": "Dwu85P9SOIk",
"urls": {
"full": "https://images.unsplash.com/photo-...",
"regular": "https://images.unsplash.com/photo-...?w=1080",
"thumb": "https://images.unsplash.com/photo-...?w=200"
},
"width": 4000,
"height": 3000,
"user": {
"name": "John Doe",
"username": "johndoe"
}
} Field Reference
outputs.ac_annual Estimated annual AC energy production in kilowatt-hours (kWh) for the specified solar system outputs.ac_monthly Array of 12 monthly AC energy production values in kWh, from January to December outputs.solrad_annual Annual average solar irradiance in kWh/m²/day for the specified location outputs.capacity_factor Ratio of actual energy output to theoretical maximum output, expressed as a percentage station_info.lat Latitude of the weather station used for solar resource data in the calculation errors List of validation error messages if any input parameters are invalid; empty array means no errors Implementation Example
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://developer.nrel.gov/docs/solar/pvwatts/v6/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →BreezoMeter Pollen
BreezoMeter Pollen API (now part of Google Maps Platform) provides daily pollen forecast data including pollen type, index values, and risk levels for a specific geographic location.
Carbon Interface
Carbon Interface API calculates estimated CO2 emissions for common activities such as electricity usage, flights, vehicle travel, and shipping.
Climatiq
Climatiq is an API for calculating carbon emissions and environmental footprint across a wide range of activities including travel, energy use, and shipping.
Cloverly
Cloverly provides programmatic access to api calculates the impact of common carbon-intensive activities in real time via REST API.
IQAir
⭐ Beginner's PickIQAir API provides real-time air quality index (AQI) data and weather conditions for cities and stations worldwide, powered by the IQAir sensor network.