Web API
PVGIS provides a FastAPI-based web service for programmatic access to solar calculations and photovoltaic performance analysis. If you wish to run and test the Web API server, you can follow the following instructions
Quick Start¶
Visit http://127.0.0.1:8000 for the interactive API documentation.
What You Can Do¶
The Web API exposes almost the same calculations available through the CLI and the core Python API:
- Performance Analysis - System efficiency and energy yield
- PV Power - Photovoltaic system output calculations
- Optimal Solar Surface Positioning - Sun angles at any location and time
Architecture¶
The Web API is a thin REST layer over PVGIS' core calculation engine, ensuring consistency across all interfaces.
Documentation Sections¶
- Install - Set up FastAPI and uvicorn
- Run - Launch and configure the server
- Examples - Sample requests and responses
Interactive Documentation¶
When running, FastAPI automatically generates interactive docs:
- Swagger UI: http://127.0.0.1:8000/docs
- ReDoc: http://127.0.0.1:8000/redoc
These interfaces let you test endpoints directly in your browser.
For Developers¶
See Web API Source Code for implementation details.