{
  "openapi": "3.0.1",
  "info": {
    "title": "Solar Installer Scraper - EnergySage",
    "description": "Choose one public EnergySage view per run: state solar costs, solar panel rankings, solar news, or installer profiles. Get structured fields and source links for solar research, cost comparisons, and installer lists.",
    "version": "1.0",
    "x-build-id": "1WuqoIRO6r3Zq8pVO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~energysage/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-energysage",
        "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/maximedupre~energysage/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-energysage",
        "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/maximedupre~energysage/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-energysage",
        "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": [
          "target"
        ],
        "properties": {
          "target": {
            "title": "Result type",
            "enum": [
              "stateSolarCosts",
              "solarPanelRankings",
              "solarNews",
              "installerDirectory",
              "customerReviews"
            ],
            "type": "string",
            "description": "Choose the kind of EnergySage result this run collects. Customer reviews are not available yet. If you choose them, the run stops without reading EnergySage or charging you, and it returns no results."
          },
          "panelCategory": {
            "title": "Panel category",
            "enum": [
              "all",
              "bestOverall",
              "bestValue",
              "mostEfficient",
              "bestWarranty"
            ],
            "type": "string",
            "description": "For Solar panel rankings, choose a ranking category. Best overall, Most affordable, Most efficient, and Best warranty each return the panels that EnergySage labels with that name. All panels returns every panel in the complete ranking. This field is ignored for the other result types.",
            "default": "all"
          },
          "installerDiscovery": {
            "title": "Find installers by",
            "enum": [
              "directorySearch",
              "rankedByLocation",
              "profileLinksOrIds"
            ],
            "type": "string",
            "description": "For Installer directory, choose where installers come from. Directory search checks the EnergySage directory. Leave the filters below empty to cover every installer. Ranked by location uses installers that EnergySage ranks in the States or Cities you enter. If both are empty, it uses all 46 states and the District of Columbia. Profile links or IDs uses only the installers you list. This field is ignored for the other result types.",
            "default": "directorySearch"
          },
          "installerProfiles": {
            "title": "Installer profile links or IDs",
            "type": "array",
            "description": "For Profile links or IDs, add one EnergySage installer profile link or profile ID per item. Service type, EnergySage Approved only, States, and Cities do not apply to these installers. This field is ignored for Directory search, Ranked by location, and the other result types.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "serviceType": {
            "title": "Service type",
            "type": "string",
            "description": "Optional. Enter one service type, such as installation, financing, or repair. Use it with Installer directory when Find installers by is Directory search or Ranked by location. Only installers whose listed services include this text are kept. This field is ignored for Profile links or IDs and the other result types.",
            "default": ""
          },
          "approvedOnly": {
            "title": "EnergySage Approved only",
            "type": "boolean",
            "description": "Keeps only installers marked EnergySage Approved. Use it with Installer directory when Find installers by is Directory search or Ranked by location. This field is ignored for Profile links or IDs and the other result types.",
            "default": false
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Optional. Choose one or more listed states. Leave States and Cities empty to use all 46 states and the District of Columbia for State and city solar costs and Ranked by location. For State and city solar costs, the run collects these states. For Installer directory with Directory search, the run returns installers that list any of these states as served. Directory search checks only the states each installer lists as served. Some states may have no installers that list them. An installer may not appear under the state where it is based. Ranked by location uses installers that EnergySage ranks in these states. With Directory search, leave States empty to cover every installer. Alaska (AK), Nebraska (NE), North Dakota (ND), and South Dakota (SD) are not listed because EnergySage does not publish solar cost data for these states. This field is ignored for Solar panel rankings, Solar news, Customer reviews, and Profile links or IDs.",
            "items": {
              "type": "string",
              "enum": [
                "AL",
                "DC",
                "AZ",
                "AR",
                "CA",
                "CO",
                "CT",
                "DE",
                "FL",
                "GA",
                "HI",
                "ID",
                "IL",
                "IN",
                "IA",
                "KS",
                "KY",
                "LA",
                "ME",
                "MD",
                "MA",
                "MI",
                "MN",
                "MS",
                "MO",
                "MT",
                "NV",
                "NH",
                "NJ",
                "NM",
                "NY",
                "NC",
                "OH",
                "OK",
                "OR",
                "PA",
                "RI",
                "SC",
                "TN",
                "TX",
                "UT",
                "VT",
                "VA",
                "WA",
                "WV",
                "WI",
                "WY"
              ],
              "enumTitles": [
                "Alabama",
                "District of Columbia",
                "Arizona",
                "Arkansas",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware",
                "Florida",
                "Georgia",
                "Hawaii",
                "Idaho",
                "Illinois",
                "Indiana",
                "Iowa",
                "Kansas",
                "Kentucky",
                "Louisiana",
                "Maine",
                "Maryland",
                "Massachusetts",
                "Michigan",
                "Minnesota",
                "Mississippi",
                "Missouri",
                "Montana",
                "Nevada",
                "New Hampshire",
                "New Jersey",
                "New Mexico",
                "New York",
                "North Carolina",
                "Ohio",
                "Oklahoma",
                "Oregon",
                "Pennsylvania",
                "Rhode Island",
                "South Carolina",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "West Virginia",
                "Wisconsin",
                "Wyoming"
              ]
            },
            "default": []
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Optional. Add one city and its two-letter state code per item, with a comma between them. For State and city solar costs, the run collects cost rows for these cities. A city name can match more than one county page, and each matching page gives its own cost row. For Ranked by location, it uses installers that EnergySage ranks in these cities. If you enter both States and Cities, the run includes results for both. This field is ignored for Solar panel rankings, Solar news, Directory search, Customer reviews, and Profile links or IDs.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Stop after this many results. Leave it empty to return all available results until the selected source is exhausted."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}