{
  "openapi": "3.0.1",
  "info": {
    "title": "Solar Yield Estimator",
    "description": "Turn coordinates into a complete solar business case. Monthly production, hourly self-consumption, payback, NPV, IRR and Monte Carlo risk. Models each roof face separately and worldwide. No API keys, free data sources only.",
    "version": "0.0",
    "x-build-id": "OfNlqPfAIyA3RQPgg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ernestmarza~solar-yield-estimator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ernestmarza-solar-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/ernestmarza~solar-yield-estimator/runs": {
      "post": {
        "operationId": "runs-sync-ernestmarza-solar-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/ernestmarza~solar-yield-estimator/run-sync": {
      "post": {
        "operationId": "run-sync-ernestmarza-solar-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": [
          "latitude",
          "longitude"
        ],
        "properties": {
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Decimal degrees, north positive. Example: 37.3891 for Seville, Spain."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Decimal degrees, east positive. Example: -5.9845 for Seville, Spain."
          },
          "arrays": {
            "title": "Sub-arrays (multi-string systems)",
            "type": "array",
            "description": "Use this when the installation is split across roof faces with different tilts or orientations. Each entry accepts label, panelCount, panelWattPeak, tilt, azimuth, systemLoss, mountingType and moduleTechnology; anything omitted falls back to the single-array fields below. Each sub-array is modelled separately and the results are summed, so the combined daily shape reflects the real mix of orientations. Leave empty for a single-orientation system. Maximum 20 sub-arrays."
          },
          "panelCount": {
            "title": "Number of panels",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many modules the array has. Ignored when sub-arrays are supplied."
          },
          "panelWattPeak": {
            "title": "Panel peak power (Wp)",
            "minimum": 1,
            "maximum": 5000,
            "type": "number",
            "description": "Nameplate DC power of a single module at STC. Typical residential modules today are 400-500 Wp."
          },
          "tilt": {
            "title": "Tilt / inclination (degrees)",
            "minimum": 0,
            "maximum": 90,
            "type": "number",
            "description": "0 = flat on the ground, 90 = vertical. Ignored when 'Use optimal angles' is on."
          },
          "azimuth": {
            "title": "Azimuth (degrees, 0 = North, 180 = South)",
            "minimum": 0,
            "maximum": 360,
            "type": "number",
            "description": "Compass bearing the panels face: 90 = East, 180 = South, 270 = West. Use 0 (North) in the southern hemisphere. Ignored when 'Use optimal angles' is on."
          },
          "useOptimalAngles": {
            "title": "Use optimal angles",
            "type": "boolean",
            "description": "Let the model pick the tilt and azimuth that maximise annual yield, instead of the values above. Applies to single-orientation systems only.",
            "default": false
          },
          "systemLoss": {
            "title": "System losses (%)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Cabling, inverter, soiling, mismatch and availability losses. 14% is the standard default for a new, well-built system; for an existing array a few years old, 18-20% is closer. Does NOT include temperature or angle-of-incidence losses, which are modelled separately."
          },
          "mountingType": {
            "title": "Mounting type",
            "enum": [
              "free",
              "building"
            ],
            "type": "string",
            "description": "Free-standing racks cool better than modules mounted flush against a roof or facade, so they lose less to heat.",
            "default": "free"
          },
          "moduleTechnology": {
            "title": "Module technology",
            "enum": [
              "crystSi",
              "CIS",
              "CdTe",
              "Unknown"
            ],
            "type": "string",
            "description": "Crystalline silicon covers almost every modern panel.",
            "default": "crystSi"
          },
          "annualDegradation": {
            "title": "Annual degradation (%/year)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "How much output the modules lose each year. Modern warranties imply 0.4-0.6%."
          },
          "inverterAcKw": {
            "title": "Inverter AC rating (kW)",
            "minimum": 0,
            "type": "number",
            "description": "AC power ceiling of the inverter. Production above this is clipped and never reaches the meter. Leave empty and set a DC/AC ratio instead, or leave both empty to skip clipping entirely."
          },
          "dcToAcRatio": {
            "title": "DC/AC ratio (used if no inverter rating)",
            "minimum": 0.5,
            "maximum": 3,
            "type": "number",
            "description": "How much the array is oversized against the inverter. 1.1-1.3 is normal practice: the extra morning and evening energy outweighs the clipped midday peak. Ignored when an inverter rating is given."
          },
          "firstYearDegradation": {
            "title": "First-year degradation (%)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Light-induced degradation, a one-off drop in the first weeks of operation that annual ageing does not cover. Around 2% for crystalline silicon. PVGIS does not model it."
          },
          "annualConsumptionKwh": {
            "title": "Annual electricity consumption (kWh)",
            "minimum": 0,
            "type": "number",
            "description": "Leave empty to skip self-consumption and financial analysis and get production only. A Spanish household typically uses 3500-5000 kWh/year; a villa with a pool, 8000-15000."
          },
          "loadProfile": {
            "title": "Consumption pattern",
            "enum": [
              "residentialEvening",
              "residentialDaytime",
              "residentialFlat",
              "office",
              "industrialShift",
              "poolVilla",
              "agricultural"
            ],
            "type": "string",
            "description": "Shape of the demand across the day and year. This drives how much of your production you actually self-consume.",
            "default": "residentialEvening"
          },
          "batteryCapacityKwh": {
            "title": "Battery capacity (kWh)",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Usable-plus-reserve nameplate capacity. Set 0 for no storage."
          },
          "batteryRoundTripEfficiency": {
            "title": "Battery round-trip efficiency (%)",
            "minimum": 50,
            "maximum": 100,
            "type": "number",
            "description": "Energy retained across one charge/discharge cycle. Lithium systems are typically 90%."
          },
          "batteryDepthOfDischarge": {
            "title": "Battery usable depth of discharge (%)",
            "minimum": 10,
            "maximum": 100,
            "type": "number",
            "description": "Share of nameplate capacity you are allowed to cycle."
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "EUR",
              "USD",
              "GBP",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "AUD",
              "CAD",
              "JPY",
              "BRL",
              "MXN",
              "INR",
              "ZAR"
            ],
            "type": "string",
            "description": "All monetary output is reported in this currency. Prices you enter below must be in the same currency. Rates are fetched live from the European Central Bank.",
            "default": "EUR"
          },
          "electricityPricePerKwh": {
            "title": "Grid electricity price (per kWh)",
            "minimum": 0,
            "type": "number",
            "description": "All-in price you pay for imported energy, in the currency selected above. Every kWh you self-consume saves exactly this."
          },
          "feedInTariffPerKwh": {
            "title": "Export / feed-in price (per kWh)",
            "minimum": 0,
            "type": "number",
            "description": "What you are paid for surplus sent to the grid. Set 0 if exports are unpaid."
          },
          "systemCost": {
            "title": "Total installed cost",
            "minimum": 0,
            "type": "number",
            "description": "Turnkey cost of the system. Leave empty to estimate it from the cost per Wp below."
          },
          "costPerWattPeak": {
            "title": "Cost per Wp (used only if total cost is empty)",
            "minimum": 0,
            "type": "number",
            "description": "Installed cost per watt-peak, batteries excluded."
          },
          "batteryCostPerKwh": {
            "title": "Battery cost per kWh (used only if total cost is empty)",
            "minimum": 0,
            "type": "number",
            "description": "Installed cost per kWh of storage."
          },
          "upfrontSubsidy": {
            "title": "Upfront grant / subsidy",
            "minimum": 0,
            "type": "number",
            "description": "Deducted from the capital cost before payback is computed."
          },
          "annualOpexPercent": {
            "title": "Annual O&M cost (% of capex)",
            "minimum": 0,
            "maximum": 20,
            "type": "number",
            "description": "Maintenance, insurance and monitoring, as a share of capital cost per year."
          },
          "electricityPriceInflation": {
            "title": "Electricity price inflation (%/year)",
            "minimum": -10,
            "maximum": 30,
            "type": "number",
            "description": "Assumed annual rise in the grid tariff. This is usually the single most sensitive assumption in the whole model."
          },
          "discountRate": {
            "title": "Discount rate (%/year)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Your cost of capital, used for NPV, discounted payback and LCOE."
          },
          "analysisPeriodYears": {
            "title": "Analysis period (years)",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Investment horizon. 25 years matches a typical module performance warranty."
          },
          "includeHourlySeries": {
            "title": "Include the 8760-hour series",
            "type": "boolean",
            "description": "Saves a full typical year of hourly production, load, self-consumption and grid flows to the key-value store as JSON and CSV, and returns download links.",
            "default": false
          },
          "sensitivityAnalysis": {
            "title": "Tilt / azimuth sensitivity sweep",
            "type": "boolean",
            "description": "Runs a grid of tilt and azimuth combinations so you can see how much yield each degree of misalignment actually costs. Adds roughly 30 seconds. Single-orientation systems only.",
            "default": false
          },
          "batterySizing": {
            "title": "Battery sizing sweep",
            "type": "boolean",
            "description": "Simulates a range of battery sizes and reports the marginal value of each extra kWh, so you can see where storage stops paying for itself. Requires annual consumption.",
            "default": false
          },
          "sizingSweep": {
            "title": "System size sweep",
            "type": "boolean",
            "description": "Models a range of system sizes and reports NPV, payback and self-sufficiency for each, answering how many panels are actually worth installing. Needs annual consumption.",
            "default": false
          },
          "riskAnalysis": {
            "title": "Monte Carlo risk analysis",
            "type": "boolean",
            "description": "Resamples electricity price inflation, annual yield and degradation thousands of times and reports the spread: NPV P10/P50/P90 and the probability of paying back within 10 and 15 years. Needs annual consumption. Seeded, so identical input always gives identical output.",
            "default": false
          },
          "includeHorizonProfile": {
            "title": "Terrain horizon profile",
            "type": "boolean",
            "description": "Returns the elevation of the surrounding terrain all around the compass, from the digital elevation model. Already included in the production figures; useful to sanity-check them against the real site. Covers terrain only, not trees or buildings.",
            "default": false
          },
          "co2GridIntensity": {
            "title": "Grid carbon intensity (gCO2eq/kWh)",
            "minimum": 0,
            "maximum": 2000,
            "type": "number",
            "description": "Used to report avoided emissions. Spain is around 150, Germany around 350, Poland around 650."
          },
          "dataSource": {
            "title": "Radiation data source",
            "enum": [
              "auto",
              "pvgis",
              "nasa"
            ],
            "type": "string",
            "description": "Auto uses PVGIS (satellite-derived, terrain shading, 2005-2023) and falls back to NASA POWER only if PVGIS cannot serve the location.",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}