{
  "openapi": "3.0.1",
  "info": {
    "title": "US Grid Capacity & Interconnection Monitor",
    "description": "Monitor US grid hosting capacity and interconnection queues. Track new and changing solar, BESS, wind, and generation projects across public energy datasets.",
    "version": "0.0",
    "x-build-id": "J8KvjkzUJe9KtBgNg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/huykenny~us-grid-capacity-interconnection-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-huykenny-us-grid-capacity-interconnection-monitor",
        "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/huykenny~us-grid-capacity-interconnection-monitor/runs": {
      "post": {
        "operationId": "runs-sync-huykenny-us-grid-capacity-interconnection-monitor",
        "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/huykenny~us-grid-capacity-interconnection-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-huykenny-us-grid-capacity-interconnection-monitor",
        "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",
        "properties": {
          "sourceIds": {
            "title": "Data sources",
            "type": "array",
            "description": "Pick one or more datasets, or leave empty to run all of them.",
            "items": {
              "type": "string",
              "enum": [
                "lbnl-queued-up",
                "caiso-public-queue",
                "nyiso-interconnection-queue",
                "nyseg-rge-hosting-capacity",
                "psco-colorado-hosting-capacity"
              ],
              "enumTitles": [
                "LBNL Queued Up — national interconnection queue dataset",
                "CAISO Public Queue — California interconnection queue",
                "NYISO Interconnection Queue — New York interconnection queue",
                "NYSEG / RG&E Hosting Capacity — New York hosting capacity",
                "PSCo / Xcel Colorado Hosting Capacity — Colorado hosting capacity"
              ]
            }
          },
          "deltaMode": {
            "title": "What to return",
            "enum": [
              "all",
              "changes-only",
              "new-only"
            ],
            "type": "string",
            "description": "\"Full current snapshot\": every current record, tagged NEW/UPDATED/UNCHANGED. \"New + updated + removed\": skip unchanged records. \"New records only\": the cleanest feed for scheduled lead alerts.",
            "default": "all"
          },
          "stateStoreName": {
            "title": "Monitoring name",
            "type": "string",
            "description": "Identifies this monitor so the Actor remembers what it saw last time. Use the exact same value on every scheduled run for the same purpose; use a different value to start a separate, independent monitor.",
            "default": "grid-capacity-monitor-state"
          },
          "initializeStateOnly": {
            "title": "Baseline-only first run (no output)",
            "type": "boolean",
            "description": "Turn this on for your very first run of a new monitoring name: it quietly saves the current data as your baseline and returns no dataset items, so your next real run starts clean instead of showing thousands of \"NEW\" records at once.",
            "default": false
          },
          "emitRemovedRecords": {
            "title": "Include removed records",
            "type": "boolean",
            "description": "Include records that safely disappeared from a source since the last run. Only applies where the Actor can confirm a full, unfiltered fetch — see the README's \"Removal safety\" section.",
            "default": true
          },
          "states": {
            "title": "US states",
            "type": "array",
            "description": "Two-letter US state codes, e.g. \"CA\", \"NY\". Leave empty for no state filter.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "County names, matched exactly as the source publishes them (usually uppercase, e.g. \"SAN DIEGO\"). Leave empty for no county filter.",
            "items": {
              "type": "string"
            }
          },
          "projectTypes": {
            "title": "Project types",
            "type": "array",
            "description": "Only include these technology types. Paired solar/wind + storage projects normalize to \"hybrid\"; storage-only projects normalize to \"battery-storage\".",
            "items": {
              "type": "string",
              "enum": [
                "solar",
                "wind",
                "battery-storage",
                "natural-gas",
                "data-center",
                "large-load",
                "hybrid",
                "other",
                "unknown"
              ],
              "enumTitles": [
                "Solar",
                "Wind",
                "Battery storage / BESS",
                "Natural gas",
                "Data center",
                "Large load",
                "Hybrid (multiple technologies)",
                "Other",
                "Unknown / not specified by source"
              ]
            }
          },
          "statuses": {
            "title": "Project statuses",
            "type": "array",
            "description": "Only include records with these normalized interconnection statuses. The original source-specific status text is always preserved in the output's rawStatus field.",
            "items": {
              "type": "string",
              "enum": [
                "proposed",
                "active",
                "study",
                "approved",
                "operational",
                "withdrawn",
                "cancelled",
                "unknown"
              ],
              "enumTitles": [
                "Proposed",
                "Active",
                "In study",
                "Approved",
                "Operational",
                "Withdrawn",
                "Cancelled",
                "Unknown / not specified by source"
              ]
            }
          },
          "minCapacityMw": {
            "title": "Minimum project capacity (MW)",
            "type": "integer",
            "description": "Only include records with a total capacity at or above this many megawatts."
          },
          "maxCapacityMw": {
            "title": "Maximum project capacity (MW)",
            "type": "integer",
            "description": "Only include records with a total capacity at or below this many megawatts."
          },
          "minAvailableCapacityMw": {
            "title": "Minimum available hosting capacity (MW)",
            "type": "integer",
            "description": "For hosting-capacity sources (NYSEG/RG&E, PSCo/Xcel Colorado): only include feeders/circuits with at least this much available headroom for new interconnections."
          },
          "maxItems": {
            "title": "Max records per source",
            "minimum": 1,
            "type": "integer",
            "description": "Caps how many records each source returns, to bound run time and cost — useful for a quick test. Leave empty for full source coverage. Setting this disables removed-record detection for the run, since the fetch becomes intentionally partial."
          },
          "debug": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Enable verbose debug-level logs for troubleshooting.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}