{
  "openapi": "3.0.1",
  "info": {
    "title": "Solar PV Yield Estimator (PVGIS)",
    "description": "Estimate annual and monthly solar PV output for a list of sites with the official EU PVGIS v5.3 model: kWh/year, kWh/kWp, monthly kWh, optimal tilt and azimuth, loss breakdown, year-to-year variability and an optional value estimate.",
    "version": "0.1",
    "x-build-id": "XzmJcfMtrGVIyBS2v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~solar-pv-yield-estimator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-solar-pv-yield-estimator",
        "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/cliqtomedia~solar-pv-yield-estimator/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-solar-pv-yield-estimator",
        "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/cliqtomedia~solar-pv-yield-estimator/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-solar-pv-yield-estimator",
        "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",
        "required": [
          "sites"
        ],
        "properties": {
          "sites": {
            "title": "Sites",
            "maxItems": 100,
            "type": "array",
            "description": "Up to 100 sites per run. Each site: <code>lat</code> and <code>lon</code> (required, decimal degrees), optional <code>name</code>, <code>peakPowerKw</code> (installed peak power in kWp, default 1), <code>lossPercent</code> (system losses: cables, inverter, dirt; 0-99, default 14), <code>angle</code> (tilt from horizontal, 0-90), <code>azimuth</code> (orientation, see Azimuth convention) and <code>mounting</code> (<code>free</code> = free-standing rack, <code>building</code> = building-integrated). Leave out angle/azimuth to let PVGIS find the optimal values."
          },
          "optimizeAngles": {
            "title": "Optimize missing angles",
            "type": "boolean",
            "description": "When a site has no angle (and no azimuth), PVGIS calculates the optimal tilt and azimuth. When only the azimuth is given, PVGIS optimizes the tilt. Turn off to treat a missing angle as a flat (0°) array facing the equator.",
            "default": true
          },
          "azimuthConvention": {
            "title": "Azimuth convention",
            "enum": [
              "pvgis",
              "compass"
            ],
            "type": "string",
            "description": "How to read each site's azimuth. Output always includes both conventions.",
            "default": "pvgis"
          },
          "radiationDatabase": {
            "title": "Radiation database",
            "enum": [
              "auto",
              "PVGIS-SARAH3",
              "PVGIS-ERA5"
            ],
            "type": "string",
            "description": "Solar radiation data used by PVGIS. Auto picks SARAH3 where available, otherwise ERA5. A fixed choice outside its coverage returns a not_found row.",
            "default": "auto"
          },
          "pvTechnology": {
            "title": "PV module technology",
            "enum": [
              "crystSi",
              "CIS",
              "CdTe",
              "Unknown"
            ],
            "type": "string",
            "description": "Module type for PVGIS temperature and spectral corrections.",
            "default": "crystSi"
          },
          "useHorizon": {
            "title": "Include horizon shading",
            "type": "boolean",
            "description": "Use PVGIS terrain horizon (mountains, hills) for shading. Does not include nearby buildings or trees.",
            "default": true
          },
          "tariffPerKwh": {
            "title": "Electricity value per kWh (optional)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Your own price per kWh (tariff, PPA or avoided cost). If set, each site gets estimatedAnnualValue = annual kWh × this price. Simple model: no tariffs, taxes, degradation or self-consumption are applied."
          },
          "currency": {
            "title": "Currency code",
            "maxLength": 3,
            "type": "string",
            "description": "3-letter currency code shown next to the value estimate, e.g. EUR, GBP, USD.",
            "default": "EUR"
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}